Added admin and development routes, which should help while in transition to user security.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@544 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-13 16:09:45 +00:00
parent b741bb6b01
commit 4be4224742
2 changed files with 24 additions and 1 deletions

View File

@@ -37,5 +37,14 @@ App::import('Core', 'Helper');
* @subpackage cake.cake
*/
class AppHelper extends Helper {
function url($url = null, $full = false) {
foreach(array('admin', 'dev') AS $mod) {
if (isset($this->params[$mod]) && is_array($url) && !isset($url[$mod]))
$url[$mod] = $this->params[$mod];
}
return parent::url($url, $full);
}
}
?>

View File

@@ -32,6 +32,20 @@
* It's hardcoded to map #1, but at some point we'll implement
* a login mechanism and the default path will be to log on instead.
*/
Router::connect('/', array('controller' => 'maps', 'action' => 'view', '1'));
Router::connect('/', array('controller' => 'maps', 'action' => 'view', '1'));
/*
* Route for admin functionality
*/
Router::connect('/admin/:controller/:action/*',
array('action' => null, 'admin' => true)
);
/*
* Route for development functionality
*/
Router::connect('/dev/:controller/:action/*',
array('action' => null, 'dev' => true)
);
?>