diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php index 20ab1615dc4..404c348ed7e 100644 --- a/lib/Cake/Console/Command/ConsoleShell.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -53,7 +53,7 @@ class ConsoleShell extends Shell { * */ public function initialize() { - require_once CAKE . 'dispatcher.php'; + App::uses('Dispatcher', 'Routing'); $this->Dispatcher = new Dispatcher(); $this->models = App::objects('model'); App::import('Model', $this->models); @@ -335,21 +335,20 @@ protected function _isValidModel($modelToCheck) { * @return boolean True if config reload was a success, otherwise false */ protected function _loadRoutes() { - $router = Router::getInstance(); - - $router->reload(); - extract($router->getNamedExpressions()); + Router::reload(); + extract(Router::getNamedExpressions()); if (!@include(CONFIGS . 'routes.php')) { return false; } - $router->parse('/'); + Router::parse('/'); - foreach (array_keys($router->getNamedExpressions()) as $var) { + foreach (array_keys(Router::getNamedExpressions()) as $var) { unset(${$var}); } - for ($i = 0, $len = count($router->routes); $i < $len; $i++) { - $router->routes[$i]->compile(); + + foreach (Router::$routes as $route) { + $route->compile(); } return true; } diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 969fad12a82..280a86c69ff 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -20,8 +20,8 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File', false); -App::import('Model', 'CakeSchema', false); +App::uses('File', 'Utility'); +App::uses('CakeSchema', 'Model'); /** * Schema is a command-line database management utility for automating programmer chores. diff --git a/lib/Cake/Console/ConsoleOptionParser.php b/lib/Cake/Console/ConsoleOptionParser.php index 179999a1b5e..fabad4c5ba8 100644 --- a/lib/Cake/Console/ConsoleOptionParser.php +++ b/lib/Cake/Console/ConsoleOptionParser.php @@ -23,6 +23,7 @@ App::uses('ConsoleInputOption', 'Console'); App::uses('ConsoleInputArgument', 'Console'); App::uses('ConsoleOptionParser', 'Console'); +App::uses('HelpFormatter', 'Console'); /** * Handles parsing the ARGV in the command line and provides support diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index 0b7add61d83..40f3b3cc883 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('String', 'Utility'); +App::uses('String', 'Utility'); /** * HelpFormatter formats help for console shells. Can format to either diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index bfe7c3ffe95..17bc19f84b7 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Model', 'Core'); -App::uses('ConnectionManager', 'Core'); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('ConnectionManager', 'Model'); /** * Base Class for Schema management diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index 2d9e268d752..a7778ceda3a 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -22,7 +22,7 @@ * Included libraries. * */ -App::uses('File', 'Utility'); +App::uses('Folder', 'Utility'); /** * Convenience class for reading, writing and appending to files. diff --git a/lib/Cake/View/pages/home.ctp b/lib/Cake/View/pages/home.ctp index 81a6d58181d..d861c5c12a9 100644 --- a/lib/Cake/View/pages/home.ctp +++ b/lib/Cake/View/pages/home.ctp @@ -16,14 +16,14 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (Configure::read() == 0): +if (Configure::read('debug') == 0): throw new NotFoundException(); endif; ?>

0): +if (Configure::read('debug') > 0): Debugger::checkSecurityKeys(); endif; ?>