Permalink
Browse files

Reviewing the logic in the Shell::in($prompt, $options = null, $defau…

…lt = null)
  • Loading branch information...
1 parent c832646 commit ddbaa66997a251e0ceb77654e81abe83ef6c56b4 @fitorec fitorec committed Jan 16, 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
@@ -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();
@@ -456,7 +456,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 ddbaa66

Please sign in to comment.