APP_MULTI_MODULE常量改为app_multi_module配置参数

This commit is contained in:
thinkphp
2016-06-14 08:12:14 +08:00
parent eb026e02a6
commit 87a3c5577c
9 changed files with 18 additions and 17 deletions

View File

@@ -1004,7 +1004,7 @@ class Route
if (isset($path)) {
if ($reverse) {
// 解析模块
$module = APP_MULTI_MODULE ? array_shift($path) : null;
$module = Config::get('app_multi_module') ? array_shift($path) : null;
if ($autoSearch) {
// 自动搜索控制器
$dir = APP_PATH . ($module ? $module . DS : '') . 'controller';
@@ -1038,7 +1038,7 @@ class Route
} else {
$action = array_pop($path);
$controller = !empty($path) ? array_pop($path) : null;
$module = APP_MULTI_MODULE && !empty($path) ? array_pop($path) : null;
$module = Config::get('app_multi_module') && !empty($path) ? array_pop($path) : null;
$method = Request::instance()->method();
// REST 操作方法支持
if ('[rest]' == $action) {