Skip to content

Commit

Permalink
Removing getAdmin from Shell.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 1, 2009
1 parent 198511f commit 90b7f7f
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions cake/console/libs/shell.php
Expand Up @@ -491,35 +491,6 @@ function shortPath($file) {
$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
*
Expand Down

0 comments on commit 90b7f7f

Please sign in to comment.