Removing getAdmin from Shell.

This commit is contained in:
mark_story 2009-06-30 20:19:00 -04:00
parent 198511f639
commit 90b7f7f0ee

View file

@ -491,35 +491,6 @@ class Shell extends Object {
$shortPath = str_replace('..'.DS, '', $shortPath);
return r(DS.DS, DS, $shortPath);
}
/**
* Checks for Configure::read('Routing.admin') and forces user to input it if not enabled
*
* @return string Admin route to use
* @access public
*/
function getAdmin() {
$admin = '';
$cakeAdmin = null;
$adminRoute = Configure::read('Routing.admin');
if (!empty($adminRoute)) {
$cakeAdmin = $adminRoute . '_';
} else {
$this->out('You need to enable Configure::write(\'Routing.admin\',\'admin\') in /app/config/core.php to use admin routing.');
$this->out('What would you like the admin route to be?');
$this->out('Example: www.example.com/admin/controller');
while ($admin == '') {
$admin = $this->in("What would you like the admin route to be?", null, 'admin');
}
if ($this->Project->cakeAdmin($admin) !== true) {
$this->out('Unable to write to /app/config/core.php.');
$this->out('You need to enable Configure::write(\'Routing.admin\',\'admin\') in /app/config/core.php to use admin routing.');
$this->_stop();
} else {
$cakeAdmin = $admin . '_';
}
}
return $cakeAdmin;
}
/**
* Creates the proper controller path for the specified controller class name
*