From f2e3487a2c16c4003d7de12658611528aa69ef94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 16 Oct 2024 22:19:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=89=AB=E6=89=BE=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/NodeService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/NodeService.php b/src/service/NodeService.php index 315bbfcd..ae83860f 100644 --- a/src/service/NodeService.php +++ b/src/service/NodeService.php @@ -119,7 +119,7 @@ public static function getMethods(bool $force = false): array $ignoreMethods = get_class_methods('\think\admin\Controller'); $ignoreAppNames = Library::$sapp->config->get('app.rbac_ignore', []); // 扫描所有代码控制器节点,更新节点缓存 - foreach (ToolsExtend::scanDirectory(Library::$sapp->getBasePath(), 'php') as $name) { + foreach (ToolsExtend::scanDirectory(Library::$sapp->getBasePath(), null, 'php') as $name) { if (preg_match("|^(\w+)/controller/(.+)\.php$|i", strtr($name, '\\', '/'), $matches)) { [, $appName, $className] = $matches; if (in_array($appName, $ignoreAppNames)) continue; @@ -130,7 +130,7 @@ public static function getMethods(bool $force = false): array foreach (Plugin::get() as $appName => $plugin) { if (in_array($appName, $ignoreAppNames)) continue; [$appPath, $appSpace] = [$plugin['path'], $plugin['space']]; - foreach (ToolsExtend::scanDirectory($appPath, 'php') as $name) { + foreach (ToolsExtend::scanDirectory($appPath, null, 'php') as $name) { if (preg_match("|^.*?controller/(.+)\.php$|i", strtr($name, '\\', '/'), $matches)) { static::_parseClass($appName, $appSpace, $matches[1], $ignoreMethods, $data); }