Adding correct fix for Ticket #2775

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5316 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-06-20 07:59:41 +00:00
parent dac1bd0913
commit 6b02b375d9

View file

@ -161,7 +161,7 @@ class Dispatcher extends Object {
if (defined('CAKE_ADMIN')) { if (defined('CAKE_ADMIN')) {
if (isset($params[CAKE_ADMIN])) { if (isset($params[CAKE_ADMIN])) {
$this->admin = '/'.CAKE_ADMIN ; $this->admin = '/'.CAKE_ADMIN ;
$url = preg_replace('/'.CAKE_ADMIN.'\/?/', '', $url); $url = preg_replace('/'.CAKE_ADMIN.'(\/|$)/', '', $url);
$params['action'] = CAKE_ADMIN.'_'.$params['action']; $params['action'] = CAKE_ADMIN.'_'.$params['action'];
} elseif (strpos($params['action'], CAKE_ADMIN) === 0) { } elseif (strpos($params['action'], CAKE_ADMIN) === 0) {
$privateAction = true; $privateAction = true;