From 2758b4c16d3ed879be1f9e2b9ac0ad1ab8582774 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 13 Nov 2011 15:23:48 -0600 Subject: [PATCH] some small refactoring and bug fixing. --- laravel/auth.php | 2 +- laravel/cookie.php | 2 +- laravel/form.php | 2 +- laravel/laravel.php | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/laravel/auth.php b/laravel/auth.php index b48af281..d9f1dac6 100644 --- a/laravel/auth.php +++ b/laravel/auth.php @@ -192,4 +192,4 @@ public static function logout() IoC::core('session')->forget(Auth::user_key); } -} +} \ No newline at end of file diff --git a/laravel/cookie.php b/laravel/cookie.php index 799f5eb5..24a9b0b9 100644 --- a/laravel/cookie.php +++ b/laravel/cookie.php @@ -114,7 +114,7 @@ public static function put($name, $value, $minutes = 0, $path = '/', $domain = n */ protected static function hash($name, $value) { - return sha1($name.$value.Config::get('application.key')); + return sha1($name.$value.Config::$items['application']['key']); } /** diff --git a/laravel/form.php b/laravel/form.php index 0207ee35..5c21bfaf 100644 --- a/laravel/form.php +++ b/laravel/form.php @@ -387,7 +387,7 @@ public static function select($name, $options = array(), $selected = null, $attr */ 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); diff --git a/laravel/laravel.php b/laravel/laravel.php index 3659d86f..5f771d15 100644 --- a/laravel/laravel.php +++ b/laravel/laravel.php @@ -177,15 +177,13 @@ */ Routing\Filter::register(require APP_PATH.'filters'.EXT); -list($uri, $method) = array(Request::uri(), Request::method()); - $loader = new Routing\Loader(APP_PATH, ROUTE_PATH); $router = new Routing\Router($loader, CONTROLLER_PATH); 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)) {