Skip to content
Permalink
Browse files

Unifying case for single-letter interactive shell input, most notably…

… SchemaShell, which previously failed on uppercase interactive input.
  • Loading branch information...
jperras committed Aug 10, 2009
1 parent b6d0670 commit 9363a61c3226ff91454fadf2f9360b4277f2a1c1
Showing with 8 additions and 8 deletions.
  1. +1 −1 cake/console/libs/api.php
  2. +5 −5 cake/console/libs/i18n.php
  3. +2 −2 cake/console/libs/schema.php
@@ -117,7 +117,7 @@ function main() {
$this->out($list);
$methods = array_keys($parsed);
while ($number = $this->in(__('Select a number to see the more information about a specific method. q to quit. l to list.', true), null, 'q')) {
while ($number = strtolower($this->in(__('Select a number to see the more information about a specific method. q to quit. l to list.', true), null, 'q'))) {
if ($number === 'q') {
$this->out(__('Done', true));
$this->_stop();
@@ -76,18 +76,18 @@ function main() {
$this->out(__('[H]elp', true));
$this->out(__('[Q]uit', true));
$choice = strtoupper($this->in(__('What would you like to do?', true), array('E', 'I', 'H', 'Q')));
$choice = strtolower($this->in(__('What would you like to do?', true), array('E', 'I', 'H', 'Q')));
switch ($choice) {
case 'E':
case 'e':
$this->Extract->execute();
break;
case 'I':
case 'i':
$this->initdb();
break;
case 'H':
case 'h':
$this->help();
break;
case 'Q':
case 'q':
exit(0);
break;
default:
@@ -129,7 +129,7 @@ function generate() {
if (!$snapshot && file_exists($this->Schema->path . DS . $this->params['file'])) {
$snapshot = true;
$result = $this->in("Schema file exists.\n [O]verwrite\n [S]napshot\n [Q]uit\nWould you like to do?", array('o', 's', 'q'), 's');
$result = strtolower($this->in("Schema file exists.\n [O]verwrite\n [S]napshot\n [Q]uit\nWould you like to do?", array('o', 's', 'q'), 's'));
if ($result === 'q') {
$this->_stop();
}
@@ -426,4 +426,4 @@ function help() {
$this->_stop();
}
}
?>
?>

0 comments on commit 9363a61

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.