Merge pull request #411 from fitorec/2.0

Check the logic in the Shell::in($prompt, $options = null, $default = null)
This commit is contained in:
Mark Story 2012-01-17 18:53:00 -08:00
commit e080bb27b9
2 changed files with 2 additions and 2 deletions

View file

@ -87,7 +87,7 @@ class DbConfigTask extends AppShell {
*/
protected function _interactive() {
$this->hr();
$this->out('Database Configuration:');
$this->out(__d('cake_console', 'Database Configuration:'));
$this->hr();
$done = false;
$dbConfigs = array();

View file

@ -465,7 +465,7 @@ class Shell extends Object {
}
}
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);
}
}