Changeset 2569
- Timestamp:
- 04/24/2008 10:38:16 PM (6 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Router.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Router.php
r2567 r2569 34 34 public static function setup() 35 35 { 36 if ( ! empty($_SERVER['QUERY_STRING'])) 37 { 38 // Set the query string to the current query string 39 self::$query_string = '?'.trim($_SERVER['QUERY_STRING'], '&'); 40 } 41 42 // Load routing configuration 36 43 self::$routes = Config::item('routes'); 37 38 // Make sure the default route is set39 if ( ! isset(self::$routes['_default']))40 throw new Kohana_Exception('core.no_default_route');41 44 42 45 // Default route status … … 45 48 if (self::$current_uri === '') 46 49 { 50 // Make sure the default route is set 51 if ( ! isset(self::$routes['_default'])) 52 throw new Kohana_Exception('core.no_default_route'); 53 47 54 // Use the default route when no segments exist 48 55 self::$current_uri = self::$routes['_default']; … … 54 61 // Make sure the URL is not tainted with HTML characters 55 62 self::$current_uri = html::specialchars(self::$current_uri, FALSE); 56 57 if ( ! empty($_SERVER['QUERY_STRING']))58 {59 // Set the query string to the current query string60 self::$query_string = '?'.trim($_SERVER['QUERY_STRING'], '&');61 }62 63 63 64 // At this point segments, rsegments, and current URI are all the same
