raylu 14 роки тому
батько
коміт
b24488ae40

+ 3 - 8
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}');
 
-?>
+?>

+ 2 - 2
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 {
 	}
 }
 
-?>
+?>

+ 0 - 52
views/layouts/default.html copy.php

@@ -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>