mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updating ControllerTask, fixes #3487
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5937 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5df0a571dc
commit
00db8647f5
1 changed files with 4 additions and 4 deletions
|
@ -236,16 +236,16 @@ class ControllerTask extends Shell {
|
|||
function __bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
|
||||
$currentModelName = $this->_modelName($controllerName);
|
||||
if (!loadModel($currentModelName)) {
|
||||
$this->out('You must have a model for this class to build scaffold methods. Please try again.');
|
||||
$this->err('You must have a model for this class to build scaffold methods. Please try again.');
|
||||
exit;
|
||||
}
|
||||
$actions = null;
|
||||
$modelObj =& new $currentModelName();
|
||||
$controllerPath = $this->_controllerPath($controllerName);
|
||||
$pluralName = $this->_pluralName($currentModelName);
|
||||
$singularName = $this->_singularName($currentModelName);
|
||||
$singularHumanName = $this->_singularHumanName($currentModelName);
|
||||
$pluralHumanName = $this->_pluralHumanName($controllerName);
|
||||
$singularName = Inflector::variable($currentModelName);
|
||||
$singularHumanName = Inflector::humanize($currentModelName);
|
||||
$pluralHumanName = Inflector::humanize($controllerName);
|
||||
$actions .= "\n";
|
||||
$actions .= "\tfunction {$admin}index() {\n";
|
||||
$actions .= "\t\t\$this->{$currentModelName}->recursive = 0;\n";
|
||||
|
|
Loading…
Reference in a new issue