Skip to content

Commit

Permalink
when installing ignore other routes
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jan 30, 2010
1 parent 78e878f commit d01b77e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
if (!file_exists(APP . 'config' . DS . 'database.php')) {
Router::connect('/', array('plugin' => 'installer', 'controller' => 'install', 'action' => 'index'));
}
else{
$routes = Cache::read('routes', 'core');

$routes = Cache::read('routes', 'core');

if (!$routes) {
$routes = Classregistry::init('Management.Route')->getRoutes();
if (empty($routes)) {
//something is broken
// @todo -c Implement .some error message or something
if (!$routes) {
$routes = Classregistry::init('Management.Route')->getRoutes();
if (empty($routes)) {
//something is broken
// @todo -c Implement .some error message or something
}
}
}

foreach($routes as $route ){
Router::connect($route['Route']['url'], $route['Route']['values'], $route['Route']['regex'] );
foreach($routes as $route ){
Router::connect($route['Route']['url'], $route['Route']['values'], $route['Route']['regex'] );
}
}
?>

0 comments on commit d01b77e

Please sign in to comment.