修改
This commit is contained in:
@@ -120,8 +120,8 @@ if (!function_exists('get_route_remark')) {
|
||||
*/
|
||||
function get_route_remark(): string
|
||||
{
|
||||
$controllerName = request()->controller(true);
|
||||
$actionName = request()->action(true);
|
||||
$controllerName = request()->controller;
|
||||
$actionName = request()->action;
|
||||
$path = str_replace('.', '/', $controllerName);
|
||||
|
||||
$remark = Db::name('admin_rule')
|
||||
@@ -268,7 +268,7 @@ if (!function_exists('action_in_arr')) {
|
||||
return false;
|
||||
}
|
||||
$arr = array_map('strtolower', $arr);
|
||||
if (in_array(strtolower(request()->action()), $arr) || in_array('*', $arr)) {
|
||||
if (in_array(strtolower(request()->action), $arr) || in_array('*', $arr)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -390,7 +390,7 @@ if (!function_exists('ip_check')) {
|
||||
*/
|
||||
function ip_check($ip = null): void
|
||||
{
|
||||
$ip = is_null($ip) ? request()->ip() : $ip;
|
||||
$ip = is_null($ip) ? request()->ip : $ip;
|
||||
$noAccess = get_sys_config('no_access_ip');
|
||||
$noAccess = !$noAccess ? [] : array_filter(explode("\n", str_replace("\r\n", "\n", $noAccess)));
|
||||
if ($noAccess && IpUtils::checkIp($ip, $noAccess)) {
|
||||
|
||||
Reference in New Issue
Block a user