From 4f32cb8a1cfec9f9457c95a12e711f08d749a460 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Mon, 21 Feb 2022 10:30:38 +0800 Subject: [PATCH] + Add xuan extension. --- .gitignore | 3 ++- extension/custom/.gitkeep | 0 framework/base/router.class.php | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 extension/custom/.gitkeep diff --git a/.gitignore b/.gitignore index 8473d464a0..47603db43b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,9 +15,9 @@ tmp/extension/* extension/pro/* extension/biz/* extension/max/* +extension/xuan/* extension/custom/* test/data/sql/ -.gitkeep .bak .idea .vscode @@ -31,3 +31,4 @@ composer.lock CodeSniffer.conf test/runtime/* test/www +!/**/.gitkeep diff --git a/extension/custom/.gitkeep b/extension/custom/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 2edcc0d071..fc6d9824c7 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1418,6 +1418,7 @@ class baseRouter /* When extensionLevel == 1. */ $paths['common'] = $this->config->edition != 'open' ? $this->getExtensionRoot() . $this->config->edition . DS . $moduleName . DS . 'ext' . DS . $ext . DS : ''; + $paths['xuan'] = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS . 'ext' . DS . $ext . DS; $paths['vision'] = $this->config->vision == 'rnd' ? '' : $this->basePath . 'extension' . DS . $this->config->vision . DS . $moduleName . DS . 'ext' . DS . $ext . DS; $paths['custom'] = $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS . 'ext' . DS . $ext . DS; if($this->config->framework->extensionLevel == 1) return $paths; @@ -1487,7 +1488,11 @@ class baseRouter if($moduleExtPaths['vision']) $this->extActionFile = $moduleExtPaths['vision'] . $this->methodName . '.php'; if(file_exists($this->extActionFile)) return true;; - /* 4. 最后尝试寻找公共扩展文件。Finally, try to find the common extension file. */ + /* 4. 在喧喧目录中查找扩展文件。Then try to find the xuan extension file. */ + if($moduleExtPaths['xuan']) $this->extActionFile = $moduleExtPaths['xuan'] . $this->methodName . '.php'; + if(file_exists($this->extActionFile)) return true;; + + /* 5. 最后尝试寻找公共扩展文件。Finally, try to find the common extension file. */ $this->extActionFile = $moduleExtPaths['common'] . $this->methodName . '.php'; if(empty($moduleExtPaths['common'])) return false; return file_exists($this->extActionFile);