summaryrefslogtreecommitdiff
path: root/poc
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2012-08-05 11:27:53 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2012-08-05 11:27:53 +0000
commitc6bd897bee3854f99a74cc14c7d20f2f1467f3de (patch)
treeeb46855a5471fdbec78c8fce6e4386afdd144730 /poc
parent537fb688fe12b04df433da95e8a68f0b89d70ebd (diff)
download2012-php-weave-origin/trunk.tar.gz
2012-php-weave-origin/trunk.tar.bz2
2012-php-weave-origin/trunk.zip
Modification de l'outil bake en ligne de commande pour "Routes show". Bug soumis, premier patch un peu pourri soumis aussi, et appliqué par dév principal sur le master git dans la journée !origin/trunk
git-svn-id: file:///var/svn/2012-php-weave/trunk@15 d972a294-176a-4cf9-8ea1-fcd5b0c30f5c
Diffstat (limited to 'poc')
-rw-r--r--poc/poc02-compiling-cake/src/vendor/cakephp-2.2.1-0-gcc44130/lib/Cake/Console/Command/ConsoleShell.php8
-rw-r--r--poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php1
2 files changed, 6 insertions, 3 deletions
diff --git a/poc/poc02-compiling-cake/src/vendor/cakephp-2.2.1-0-gcc44130/lib/Cake/Console/Command/ConsoleShell.php b/poc/poc02-compiling-cake/src/vendor/cakephp-2.2.1-0-gcc44130/lib/Cake/Console/Command/ConsoleShell.php
index ee8f07d..222ee33 100644
--- a/poc/poc02-compiling-cake/src/vendor/cakephp-2.2.1-0-gcc44130/lib/Cake/Console/Command/ConsoleShell.php
+++ b/poc/poc02-compiling-cake/src/vendor/cakephp-2.2.1-0-gcc44130/lib/Cake/Console/Command/ConsoleShell.php
@@ -64,7 +64,9 @@ class ConsoleShell extends AppShell {
foreach ($this->models as $model) {
$this->out(" - {$model}");
}
- $this->_loadRoutes();
+ if (!$this->_loadRoutes()) {
+ $this->out(__d('cake_console', "There was an error loading the routes config. Please check that the file exists and is free of parse errors."));
+ }
}
/**
@@ -299,8 +301,8 @@ class ConsoleShell extends AppShell {
$this->out(__d('cake_console', "Routes configuration reloaded, %d routes connected", count($router->routes)));
break;
case (preg_match("/^routes\s+show/i", $command, $tmp) == true):
- $router = Router::getInstance();
- $this->out(implode("\n", Hash::extract($router->routes, '{n}.0')));
+ //$router = Router::getInstance();
+ $this->out(print_r(Hash::combine(Router::$routes, '{n}.template', '{n}.defaults')));
break;
case (preg_match("/^route\s+(\(.*\))$/i", $command, $tmp) == true):
if ($url = eval('return array' . $tmp[1] . ';')) {
diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php b/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php
index 38d6f39..ad311e2 100644
--- a/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php
+++ b/poc/poc02-compiling-cake/src/workdir/in/app/Config/routes.php
@@ -32,6 +32,7 @@
*/
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
+ Router::connect('/lpo/test/', array('controller' => 'lpoCtrl', 'action' => 'testaction'));
/**
* Load all plugin routes. See the CakePlugin documentation on
* how to customize the loading of plugin routes.