Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -2,18 +2,17 @@
/**
* Internationalization Management Shell
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since CakePHP(tm) v 1.2.0.5669
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('AppShell', 'Console/Command');
@ -52,7 +51,7 @@ class I18nShell extends AppShell {
if ($this->command && !in_array($this->command, array('help'))) {
if (!config('database')) {
$this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'), true);
$this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'));
return $this->DbConfig->execute();
}
}
@ -75,16 +74,15 @@ class I18nShell extends AppShell {
switch ($choice) {
case 'e':
$this->Extract->execute();
break;
break;
case 'i':
$this->initdb();
break;
break;
case 'h':
$this->out($this->OptionParser->help());
break;
break;
case 'q':
exit(0);
break;
return $this->_stop();
default:
$this->out(__d('cake_console', 'You have made an invalid selection. Please choose a command to execute by entering E, I, H, or Q.'));
}
@ -102,20 +100,23 @@ class I18nShell extends AppShell {
}
/**
* Get and configure the Option parser
* Gets the option parser instance and configures it.
*
* @return ConsoleOptionParser
*/
public function getOptionParser() {
$parser = parent::getOptionParser();
return $parser->description(
$parser->description(
__d('cake_console', 'I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.')
)->addSubcommand('initdb', array(
'help' => __d('cake_console', 'Initialize the i18n table.')
))->addSubcommand('extract', array(
'help' => __d('cake_console', 'Extract the po translations from your application'),
'parser' => $this->Extract->getOptionParser()
));
)->addSubcommand('initdb', array(
'help' => __d('cake_console', 'Initialize the i18n table.')
))->addSubcommand('extract', array(
'help' => __d('cake_console', 'Extract the po translations from your application'),
'parser' => $this->Extract->getOptionParser()
));
return $parser;
}
}