Permalink
Browse files

Merge pull request #411 from fitorec/2.0

Check the logic in the Shell::in($prompt, $options = null, $default = null)
  • Loading branch information...
2 parents 8608caa + ddbaa66 commit e080bb27b993de0a64932dc7005c5835cd37aad1 @markstory markstory committed Jan 18, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Cake/Console/Command/Task/DbConfigTask.php
  2. +1 −1 lib/Cake/Console/Shell.php
View
2 lib/Cake/Console/Command/Task/DbConfigTask.php
@@ -87,7 +87,7 @@ public function execute() {
*/
protected function _interactive() {
$this->hr();
- $this->out('Database Configuration:');
+ $this->out(__d('cake_console', 'Database Configuration:'));
$this->hr();
$done = false;
$dbConfigs = array();
View
2 lib/Cake/Console/Shell.php
@@ -465,7 +465,7 @@ public function in($prompt, $options = null, $default = null) {
}
}
if (is_array($options)) {
- while ($in === '' || ($in !== '' && (!in_array(strtolower($in), $options) && !in_array(strtoupper($in), $options)) && !in_array($in, $options))) {
+ while ($in === '' || !(in_array(strtolower($in), $options) || in_array(strtoupper($in), $options) || in_array($in, $options))) {
$in = $this->_getInput($prompt, $options, $default);
}
}

0 comments on commit e080bb2

Please sign in to comment.