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:
@@ -37,5 +37,14 @@ App::import('Core', 'Helper');
|
|||||||
* @subpackage cake.cake
|
* @subpackage cake.cake
|
||||||
*/
|
*/
|
||||||
class AppHelper extends Helper {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -32,6 +32,20 @@
|
|||||||
* It's hardcoded to map #1, but at some point we'll implement
|
* 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.
|
* 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)
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user