Skip to content

Commit

Permalink
Reviewing the logic in the Shell::in($prompt, $options = null, $defau…
Browse files Browse the repository at this point in the history
…lt = null)
  • Loading branch information
fitorec committed Jan 16, 2012
1 parent c832646 commit ddbaa66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/DbConfigTask.php
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Shell.php
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit ddbaa66

Please sign in to comment.