Skip to content

Commit

Permalink
Fixing more shells, and updating code in home.ctp
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 8, 2010
1 parent 7828f7d commit 02ad049
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
17 changes: 8 additions & 9 deletions lib/Cake/Console/Command/ConsoleShell.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/SchemaShell.php
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Console/ConsoleOptionParser.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/HelpFormatter.php
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lib/Cake/Model/CakeSchema.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/File.php
Expand Up @@ -22,7 +22,7 @@
* Included libraries.
*
*/
App::uses('File', 'Utility');
App::uses('Folder', 'Utility');

/**
* Convenience class for reading, writing and appending to files.
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/View/pages/home.ctp
Expand Up @@ -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;
?>
<h2><?php echo __('Release Notes for CakePHP %s.', Configure::version()); ?></h2>
<a href="http://cakephp.org/changelogs/1.3.6"><?php __('Read the changelog'); ?> </a>
<?php
if (Configure::read() > 0):
if (Configure::read('debug') > 0):
Debugger::checkSecurityKeys();
endif;
?>
Expand Down

0 comments on commit 02ad049

Please sign in to comment.