Changeset 2462

Show
Ignore:
Timestamp:
04/09/2008 07:58:34 PM (6 months ago)
Author:
Shadowhand
Message:

Changed Router to use parse_str() instead of manually building $_GET. (duh)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Router.php

    r2390 r2462  
    201201                                if (($query = strpos(self::$current_uri, '?')) !== FALSE) 
    202202                                { 
    203                                         list (self::$current_uri, $query) = explode('?', self::$segments, 2); 
    204  
    205                                         // Insert query into GET array 
    206                                         foreach(explode('&', $query) as $pair) 
    207                                         { 
    208                                                 list ($key, $val) = array_pad(explode('=', $pair), 1, ''); 
    209  
    210                                                 $_GET[utf8::clean($key)] = utf8::clean($val); 
    211                                         } 
     203                                        list (self::$current_uri, $query) = explode('?', self::$current_uri, 2); 
     204 
     205                                        // Parse the query string into $_GET 
     206                                        parse_str($query, $_GET); 
     207 
     208                                        // Convert $_GET to UTF-8 
     209                                        $_GET = utf8::clean($_GET); 
    212210                                } 
    213211                        }