Skip to content

Commit

Permalink
支持控制器完善,支持文件控制器中 action_index() 调用,比如 /test/abc/ 可直接调用
Browse files Browse the repository at this point in the history
test/abc.controller.php 中的 action_index() 方法,但 /test/abc/123/ 则不会触发
action_index()
  • Loading branch information
breath-co2 committed Sep 11, 2013
1 parent 9cf73d1 commit e762ec2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/classes/core.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,10 @@ public static function execute($uri)
{
$action_name = 'action_default';
}
elseif ($action_name!='' && (!$arguments || $arguments===array('')) && method_exists($controller, 'action_index'))
{
$action_name = 'action_index';
}
elseif (method_exists($controller, '__call'))
{
$controller->__call($action_name, $arguments);
Expand Down

0 comments on commit e762ec2

Please sign in to comment.