From 47161ba7a6a2c552a53438d1643cb27dfaf8b0f1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 12 Jan 2016 13:39:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=20=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=9A=84URL=E8=AE=BF=E9=97=AE=E5=8F=96=E6=B6=88=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E8=BD=AC=E6=8D=A2=20=E4=BF=AE=E6=AD=A3Build=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 8 ++++---- library/think/Build.php | 2 +- tpl/default_index.tpl | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index 7470a2cb..4739a56e 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -102,8 +102,8 @@ class App $callable = self::$dispatch['callable']; if (is_callable($callable)) { $data = is_array($callable) ? - self::reflectionInvoke(new $callable[0], $callable[1]) : // 数组定义需要实例化的对象和方法 - call_user_func_array($callable, self::$dispatch['params']); // 静态方法或者函数 + self::reflectionInvoke(new $callable[0], $callable[1]) : // 数组定义需要实例化的对象和方法 + call_user_func_array($callable, self::$dispatch['params']); // 静态方法或者函数 } else { throw new Exception('not callable : ' . (is_array($callable) ? implode('->', $callable) : $callable), 10009); } @@ -166,7 +166,7 @@ class App { if (APP_MULTI_MODULE) { // 多模块部署 - $module = strtolower($result[0] ?: $config['default_module']); + $module = $result[0] ?: $config['default_module']; if ($maps = $config['url_module_map']) { if (isset($maps[$module])) { // 记录当前别名 @@ -204,7 +204,7 @@ class App define('CONTROLLER_NAME', defined('BIND_CONTROLLER') ? BIND_CONTROLLER : $controller); // 获取操作名 - $action = strip_tags(strtolower($result[2] ?: Config::get('default_action'))); + $action = strip_tags($result[2] ?: Config::get('default_action')); define('ACTION_NAME', defined('BIND_ACTION') ? BIND_ACTION : $action); // 执行操作 diff --git a/library/think/Build.php b/library/think/Build.php index 62f88a14..6d977652 100644 --- a/library/think/Build.php +++ b/library/think/Build.php @@ -133,7 +133,7 @@ class Build $filename = APP_PATH . ($module ? $module . DS : '') . CONTROLLER_LAYER . DS . Config::get('default_controller') . EXT; if (!is_file($filename)) { $content = file_get_contents(THINK_PATH . 'tpl' . DS . 'default_index.tpl'); - $content = str_replace(['{$app}', '{$module}'], [APP_NAMESPACE, $module ? $module . '\\' : ''], $content); + $content = str_replace(['{$app}', '{$module}', '{layer}'], [APP_NAMESPACE, $module ? $module . '\\' : '', CONTROLLER_LAYER], $content); if (!is_dir(dirname($filename))) { mkdir(dirname($filename), 0777, true); } diff --git a/tpl/default_index.tpl b/tpl/default_index.tpl index 6ec0d303..ad74ac02 100644 --- a/tpl/default_index.tpl +++ b/tpl/default_index.tpl @@ -1,5 +1,5 @@