From b24488ae40a5b503c1c9662af887d39d5868456c Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 3 Jul 2011 04:29:55 -0700 Subject: pointless little fixes --- config/routes.php | 11 +++----- controllers/PagesController.php | 4 +-- views/layouts/default.html copy.php | 52 ------------------------------------- 3 files changed, 5 insertions(+), 62 deletions(-) delete mode 100644 views/layouts/default.html copy.php diff --git a/config/routes.php b/config/routes.php index 7ac2567..66ff03a 100644 --- a/config/routes.php +++ b/config/routes.php @@ -36,7 +36,6 @@ Router::connect('/', 'Pages::view'); */ Router::connect('/pages/{:args}', 'Pages::view'); - /** * Add the testing routes. These routes are only connected in non-production environments, and allow * browser-based access to the test suite for running unit and integration tests for the Lithium @@ -48,15 +47,13 @@ if (!Environment::is('production')) { Router::connect('/test', array('controller' => 'lithium\test\Controller')); } - -/* This is the login and logout routes */ +/* These are the login and logout routes */ Router::connect('/login', array('controller' => 'users', 'action' => 'login')); Router::connect('/logout', array('controller' => 'users', 'action' => 'logout')); //Pagination route Router::connect('/{:controller}/{:action}/page:{:page:[0-9]+}'); - /** * Define an anonymous function that we will pass to the router instead of linking to a controller action * The logic is quite simple: @@ -92,7 +89,7 @@ The regex is quite simple even if it looks complex: (?P) is for setting up a named capture group. This equals doing {:foo:{pattern}} in Lithium. So we have 1 capture group named {id} that have to match by 24 signs (mongoid), and an optional part "_{width}x{height}" and finally the filtype. -Im unsure if the keys array can be handled some other way, but it failed for me without it. +I'm unsure if the keys array can be handled some other way, but it failed for me without it. */ $imageHandlingOptions = array( 'handler' => $imageSizer, @@ -105,8 +102,6 @@ Finally we connect this as a route. The regex sent as the first param here is ov */ Router::connect('/image/{:id:[0-9a-f]{24}}.jpg', array(), $imageHandlingOptions); - - /** * ### Database object routes * @@ -142,4 +137,4 @@ Router::connect('/{:controller}/{:action}/{:id:[0-9a-f]{24}}'); */ Router::connect('/{:controller}/{:action}/{:args}'); -?> \ No newline at end of file +?> diff --git a/controllers/PagesController.php b/controllers/PagesController.php index 47b88d2..6babfaf 100644 --- a/controllers/PagesController.php +++ b/controllers/PagesController.php @@ -24,7 +24,7 @@ namespace app\controllers; * `/views/pages/about/company.html.php`. */ class PagesController extends \lithium\action\Controller { - // !--Waring--! this makes all pages accessibe to non-logged in uses. + // !--Warning--! this makes all pages accessibe to non-logged in users. // :TODO: Fix this. public $publicActions = array('view'); public function view() { @@ -33,4 +33,4 @@ class PagesController extends \lithium\action\Controller { } } -?> \ No newline at end of file +?> diff --git a/views/layouts/default.html copy.php b/views/layouts/default.html copy.php deleted file mode 100644 index bad2fe4..0000000 --- a/views/layouts/default.html copy.php +++ /dev/null @@ -1,52 +0,0 @@ - - - - - html->charset();?> - OtakuHub > <?php echo $this->title(); ?> - html->style(array('debug', 'lithium')); ?> - scripts(); ?> - - - - - - html->link('Icon', null, array('type' => 'icon')); ?> - - -
- -
- content(); ?> -
-
- - -- cgit v1.2.3