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
This commit is contained in:
phpnut 2007-06-17 01:04:28 +00:00
parent 52d99340bb
commit d1e3d3a788

View file

@ -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;