去除 MODULE_NAME CONTROLLER_NAME ACTION_NAME 常量

This commit is contained in:
thinkphp
2016-06-01 18:34:36 +08:00
parent 4a4c53bf6b
commit ac0cb9be42
11 changed files with 123 additions and 59 deletions

View File

@@ -69,14 +69,14 @@ class Controller
if (is_string($options['only'])) {
$options['only'] = explode(',', $options['only']);
}
if (!in_array(ACTION_NAME, $options['only'])) {
if (!in_array($this->request->action(), $options['only'])) {
return;
}
} elseif (isset($options['except'])) {
if (is_string($options['except'])) {
$options['except'] = explode(',', $options['except']);
}
if (in_array(ACTION_NAME, $options['except'])) {
if (in_array($this->request->action(), $options['except'])) {
return;
}
}