Permalink
Browse files

Removing dead options.

  • Loading branch information...
1 parent 68a858b commit b1de3166e948684b30acd3659f6a5801f5677bfc @markstory markstory committed May 15, 2009
Showing with 10 additions and 10 deletions.
  1. +10 −10 cake/console/libs/tasks/controller.php
@@ -149,29 +149,29 @@ function __interactive($controllerName = false) {
}
$doItInteractive = $this->in(join("\n", $question), array('y','n'), 'y');
- if (low($doItInteractive) == 'y' || low($doItInteractive) == 'yes') {
+ if (strtolower($doItInteractive) == 'y') {
$this->interactive = true;
$wannaUseScaffold = $this->in(__("Would you like to use scaffolding?", true), array('y','n'), 'n');
- if (low($wannaUseScaffold) == 'n' || low($wannaUseScaffold) == 'no') {
+ if (strtolower($wannaUseScaffold) == 'n') {
$wannaDoScaffolding = $this->in(__("Would you like to include some basic class methods (index(), add(), view(), edit())?", true), array('y','n'), 'n');
- if (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') {
+ if (strtolower($wannaDoScaffolding) == 'y') {
$wannaDoAdmin = $this->in(__("Would you like to create the methods for admin routing?", true), array('y','n'), 'n');
}
$wannaDoHelpers = $this->in(__("Would you like this controller to use other helpers besides HtmlHelper and FormHelper?", true), array('y','n'), 'n');
- if (low($wannaDoHelpers) == 'y' || low($wannaDoHelpers) == 'yes') {
+ if (strtolower($wannaDoHelpers) == 'y') {
$helpersList = $this->in(__("Please provide a comma separated list of the other helper names you'd like to use.\nExample: 'Ajax, Javascript, Time'", true));
$helpersListTrimmed = str_replace(' ', '', $helpersList);
$helpers = explode(',', $helpersListTrimmed);
}
$wannaDoComponents = $this->in(__("Would you like this controller to use any components?", true), array('y','n'), 'n');
- if (low($wannaDoComponents) == 'y' || low($wannaDoComponents) == 'yes') {
+ if (strtolower($wannaDoComponents) == 'y') {
$componentsList = $this->in(__("Please provide a comma separated list of the component names you'd like to use.\nExample: 'Acl, Security, RequestHandler'", true));
$componentsListTrimmed = str_replace(' ', '', $componentsList);
$components = explode(',', $componentsListTrimmed);
@@ -184,17 +184,17 @@ function __interactive($controllerName = false) {
} else {
$wannaDoScaffolding = $this->in(__("Would you like to include some basic class methods (index(), add(), view(), edit())?", true), array('y','n'), 'y');
- if (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') {
+ if (strtolower($wannaDoScaffolding) == 'y') {
$wannaDoAdmin = $this->in(__("Would you like to create the methods for admin routing?", true), array('y','n'), 'y');
}
}
$admin = false;
- if ((low($wannaDoAdmin) == 'y' || low($wannaDoAdmin) == 'yes')) {
+ if (strtolower($wannaDoAdmin) == 'y') {
$admin = $this->getAdmin();
}
- if (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') {
+ if (strtolower($wannaDoScaffolding) == 'y') {
$actions = $this->bakeActions($controllerName, null, in_array(low($wannaUseSession), array('y', 'yes')));
if ($admin) {
$actions .= $this->bakeActions($controllerName, $admin, in_array(low($wannaUseSession), array('y', 'yes')));
@@ -208,7 +208,7 @@ function __interactive($controllerName = false) {
$this->hr();
$this->out("Controller Name: $controllerName");
- if (low($wannaUseScaffold) == 'y' || low($wannaUseScaffold) == 'yes') {
+ if (strtolower($wannaUseScaffold) == 'y') {
$this->out(" var \$scaffold;");
$actions = 'scaffold';
}
@@ -239,7 +239,7 @@ function __interactive($controllerName = false) {
$this->hr();
$looksGood = $this->in(__('Look okay?', true), array('y','n'), 'y');
- if (low($looksGood) == 'y' || low($looksGood) == 'yes') {
+ if (strtolower($looksGood) == 'y') {
$baked = $this->bake($controllerName, $actions, $helpers, $components, $uses);
if ($baked && $this->_checkUnitTest()) {
$this->bakeTest($controllerName);

0 comments on commit b1de316

Please sign in to comment.