From d1e3d3a788c6eedf3678914e091e82b94ceedb8c Mon Sep 17 00:00:00 2001 From: phpnut Date: Sun, 17 Jun 2007 01:04:28 +0000 Subject: [PATCH] Adding fix for Ticket #2775, fixes $this->here shows incorrect value for admin route git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5289 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/dispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 9426d3c06..626eb47db 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -146,7 +146,7 @@ class Dispatcher extends Object { if(defined('CAKE_ADMIN')) { if(isset($params[CAKE_ADMIN])) { $this->admin = '/'.CAKE_ADMIN ; - $url = preg_replace('/'.CAKE_ADMIN.'\//', '', $url); + $url = preg_replace('/'.CAKE_ADMIN.'\/?/', '', $url); $params['action'] = CAKE_ADMIN.'_'.$params['action']; } elseif (strpos($params['action'], CAKE_ADMIN) === 0) { $privateAction = true;