summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/routes.php11
-rw-r--r--controllers/PagesController.php4
-rw-r--r--views/layouts/default.html copy.php52
3 files changed, 5 insertions, 62 deletions
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<foo>) 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 @@
-<?php
-/**
- * Lithium: the most rad php framework
- *
- * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org)
- * @license http://opensource.org/licenses/bsd-license.php The BSD License
- */
-?>
-<!doctype html>
-<html>
-<head>
- <?php echo $this->html->charset();?>
- <title>OtakuHub > <?php echo $this->title(); ?></title>
- <?php echo $this->html->style(array('debug', 'lithium')); ?>
- <?php echo $this->scripts(); ?>
-
-
- <script src = https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js></script>
- <style type="text/css">
- .flash-message{
- width:759px;
- padding-top:8px;
- padding-bottom:8px;
- background-color: #bebebe;
- font-weight:bold;
- font-size:20px;-moz-border-radius: 6px;-webkit-border-radius: 6px;
- }
- </style>
- <script type="text/javascript">
- $(document).ready(function(){
- setTimeout(function(){
- $(".flash-message").fadeOut("slow", function () {
- $(".flash-message").remove();
- }); }, 2000);
- });
- </script>
- <?php echo $this->html->link('Icon', null, array('type' => 'icon')); ?>
-</head>
-<body class="app">
- <div id="container">
- <div id="header">
- <h1>OtakuHub</h1>
- <h2>
- Powered by <?php echo $this->html->link('Lithium', 'http://lithify.me/'); ?>.
- </h2>
- </div>
- <div id="content">
- <?php echo $this->content(); ?>
- </div>
- </div>
-</body>
-</html>