Commit 2758b4c1 by Taylor Otwell

some small refactoring and bug fixing.

parent 04f76612
...@@ -192,4 +192,4 @@ class Auth { ...@@ -192,4 +192,4 @@ class Auth {
IoC::core('session')->forget(Auth::user_key); IoC::core('session')->forget(Auth::user_key);
} }
} }
\ No newline at end of file
...@@ -114,7 +114,7 @@ class Cookie { ...@@ -114,7 +114,7 @@ class Cookie {
*/ */
protected static function hash($name, $value) protected static function hash($name, $value)
{ {
return sha1($name.$value.Config::get('application.key')); return sha1($name.$value.Config::$items['application']['key']);
} }
/** /**
......
...@@ -387,7 +387,7 @@ class Form { ...@@ -387,7 +387,7 @@ class Form {
*/ */
protected static function option($value, $display, $selected) protected static function option($value, $display, $selected)
{ {
$selected = ($value === $selected) ? 'selected' : null; $selected = ($value == $selected) ? 'selected' : null;
$attributes = array('value' => HTML::entities($value), 'selected' => $selected); $attributes = array('value' => HTML::entities($value), 'selected' => $selected);
......
...@@ -177,15 +177,13 @@ Input::$input = $input; ...@@ -177,15 +177,13 @@ Input::$input = $input;
*/ */
Routing\Filter::register(require APP_PATH.'filters'.EXT); Routing\Filter::register(require APP_PATH.'filters'.EXT);
list($uri, $method) = array(Request::uri(), Request::method());
$loader = new Routing\Loader(APP_PATH, ROUTE_PATH); $loader = new Routing\Loader(APP_PATH, ROUTE_PATH);
$router = new Routing\Router($loader, CONTROLLER_PATH); $router = new Routing\Router($loader, CONTROLLER_PATH);
IoC::instance('laravel.routing.router', $router); IoC::instance('laravel.routing.router', $router);
Request::$route = $router->route($method, $uri); Request::$route = $router->route(Request::method(), Request::uri());
if ( ! is_null(Request::$route)) if ( ! is_null(Request::$route))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment