From 4dc7d4ab8cc8d1ab9f1675c36f3001dd13b90d7b Mon Sep 17 00:00:00 2001 From: dho Date: Sat, 26 May 2007 12:13:00 +0000 Subject: [PATCH] Formatting git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5198 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/libs/tasks/controller.php | 41 +++++++++++++------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index 171427e0d..ecded4a09 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -225,10 +225,10 @@ class ControllerTask extends Shell { $actions .= "\tfunction {$admin}view(\$id = null) {\n"; $actions .= "\t\tif(!\$id) {\n"; if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { - $actions .= "\t\t\t\$this->Session->setFlash('Invalid {$singularHumanName}.');\n"; - $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; + $actions .= "\t\t\t\$this->Session->setFlash('Invalid {$singularHumanName}.');\n"; + $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { - $actions .= "\t\t\t\$this->flash('Invalid {$singularHumanName}', array('action'=>'index'));\n"; + $actions .= "\t\t\t\$this->flash('Invalid {$singularHumanName}', array('action'=>'index'));\n"; } $actions .= "\t\t}\n"; $actions .= "\t\t\$this->set('".$singularName."', \$this->{$currentModelName}->read(null, \$id));\n"; @@ -243,11 +243,11 @@ class ControllerTask extends Shell { $actions .= "\t\t\t\$this->{$currentModelName}->create();\n"; $actions .= "\t\t\tif(\$this->{$currentModelName}->save(\$this->data)) {\n"; if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { - $actions .= "\t\t\t\t\$this->Session->setFlash('The ".$singularHumanName." has been saved');\n"; - $actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; + $actions .= "\t\t\t\t\$this->Session->setFlash('The ".$singularHumanName." has been saved');\n"; + $actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { - $actions .= "\t\t\t\t\$this->flash('{$currentModelName} saved.', array('action'=>'index'));\n"; - $actions .= "\t\t\t\texit();\n"; + $actions .= "\t\t\t\t\$this->flash('{$currentModelName} saved.', array('action'=>'index'));\n"; + $actions .= "\t\t\t\texit();\n"; } $actions .= "\t\t\t} else {\n"; if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { @@ -335,10 +335,10 @@ class ControllerTask extends Shell { $actions .= "\tfunction {$admin}delete(\$id = null) {\n"; $actions .= "\t\tif(!\$id) {\n"; if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { - $actions .= "\t\t\t\$this->Session->setFlash('Invalid id for {$singularHumanName}');\n"; - $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; + $actions .= "\t\t\t\$this->Session->setFlash('Invalid id for {$singularHumanName}');\n"; + $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { - $actions .= "\t\t\t\$this->flash('Invalid {$singularHumanName}', array('action'=>'index'));\n"; + $actions .= "\t\t\t\$this->flash('Invalid {$singularHumanName}', array('action'=>'index'));\n"; } $actions .= "\t\t}\n"; $actions .= "\t\tif(\$this->{$currentModelName}->del(\$id)) {\n"; @@ -368,8 +368,9 @@ class ControllerTask extends Shell { $out = "