diff -u -r cake_1.1.7.3363/app/config/core.php cake/app/config/core.php --- cake_1.1.7.3363/app/config/core.php 2006-05-25 17:12:00.000000000 +0900 +++ cake/app/config/core.php 2006-09-14 12:33:28.109375000 +0900 @@ -117,6 +117,11 @@ */ // define('CAKE_ADMIN', 'admin'); /** + * Action method prefix + * For example: action_index, action_edit + */ +define('CAKE_ACTION_PREFIX', 'action_'); +/** * The define below is used to turn cake built webservices * on or off. Default setting is off. */ diff -u -r cake_1.1.7.3363/cake/dispatcher.php cake/cake/dispatcher.php --- cake_1.1.7.3363/cake/dispatcher.php 2006-08-05 18:15:00.000000000 +0900 +++ cake/cake/dispatcher.php 2006-09-14 12:34:22.828125000 +0900 @@ -168,15 +168,17 @@ $params['action'] = 'index'; } - if((in_array($params['action'], $classMethods) || in_array(strtolower($params['action']), $classMethods)) && strpos($params['action'], '_', 0) === 0) { + $params['action_method'] = CAKE_ACTION_PREFIX . $params['action']; + + if((in_array($params['action_method'], $classMethods) || in_array(strtolower($params['action_method']), $classMethods)) && strpos($params['action_method'], '_', 0) === 0) { $privateAction = true; } - if(!in_array($params['action'], $classMethods) && !in_array(strtolower($params['action']), $classMethods)) { + if(!in_array($params['action_method'], $classMethods) && !in_array(strtolower($params['action_method']), $classMethods)) { $missingAction = true; } - if (in_array(strtolower($params['action']), array('beforefilter', 'beforerender', 'afterfilter'))) { + if (in_array(strtolower($params['action_method']), array('beforefilter', 'beforerender', 'afterfilter'))) { $missingAction = true; } @@ -229,7 +231,7 @@ if ($missingAction && !in_array('scaffold', array_keys($classVars))) { return $this->cakeError('missingAction', array( array('className' => Inflector::camelize($params['controller']."Controller"), - 'action' => $params['action'], + 'action' => $params['action_method'], 'webroot' => $this->webroot, 'url' => $url, 'base' => $this->base))); @@ -238,7 +240,7 @@ if ($privateAction) { return $this->cakeError('privateAction', array( array('className' => Inflector::camelize($params['controller']."Controller"), - 'action' => $params['action'], + 'action' => $params['action_method'], 'webroot' => $this->webroot, 'url' => $url, 'base' => $this->base))); @@ -261,7 +263,7 @@ uses(DS.'controller'.DS.'scaffold'); return new Scaffold($controller, $params); } else { - $output = call_user_func_array(array(&$controller, $params['action']), empty($params['pass'])? null: $params['pass']); + $output = call_user_func_array(array(&$controller, $params['action_method']), empty($params['pass'])? null: $params['pass']); } if ($controller->autoRender) { $output = $controller->render(); diff -u -r cake_1.1.7.3363/cake/libs/controller/controller.php cake/cake/libs/controller/controller.php --- cake_1.1.7.3363/cake/libs/controller/controller.php 2006-07-29 13:42:00.000000000 +0900 +++ cake/cake/libs/controller/controller.php 2006-09-14 12:33:24.078125000 +0900 @@ -428,7 +428,7 @@ $this->action = $action; $args = func_get_args(); unset($args[0]); - call_user_func_array(array(&$this, $action), $args); + call_user_func_array(array(&$this, CAKE_ACTION_PREFIX . $action), $args); } /** * Returns number of errors in a submitted FORM.