mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Removing getAdmin from Shell.
This commit is contained in:
parent
198511f639
commit
90b7f7f0ee
1 changed files with 0 additions and 29 deletions
|
@ -491,35 +491,6 @@ class Shell extends Object {
|
||||||
$shortPath = str_replace('..'.DS, '', $shortPath);
|
$shortPath = str_replace('..'.DS, '', $shortPath);
|
||||||
return r(DS.DS, 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
|
* Creates the proper controller path for the specified controller class name
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue