Changeset 2789
- Timestamp:
- 11/11/08 14:09:27 (2 months ago)
- Location:
- branches/sginput
- Files:
-
- 3 modified
- 3 copied
-
. (copied) (copied from trunk)
-
LICENSE (copied) (copied from branches/postgres/LICENSE)
-
docs (copied) (copied from branches/postgres/docs)
-
htdocs/index.php (modified) (1 diff)
-
htdocs/system/classes/controller.php (modified) (2 diffs)
-
htdocs/system/classes/utils.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/sginput/htdocs/index.php
r2764 r2789 112 112 Error::handle_errors(); 113 113 114 // Replace all of the $_GET, $_POST, and $_COOKIE superglobals with object 115 // representations of each. Unset $_REQUEST, which is evil. 116 SuperGlobal::process_gpc(); 117 114 118 /* Initiate install verifications */ 115 119 -
branches/sginput/htdocs/system/classes/controller.php
r2592 r2789 119 119 $start_url = trim($start_url, '/'); 120 120 121 /* Remove the querystring from the URL */122 if ( strpos($start_url, '?') !== FALSE ) {123 list($start_url, $query_string)= explode('?', $start_url);124 }125 126 /* Return $_GET values to their proper place */127 if( !empty($query_string) ) {128 parse_str($query_string, $_GET);129 }130 131 /* Undo what magic_quotes_gpc might have wrought */132 Utils::revert_magic_quotes_gpc();133 134 121 /* Allow plugins to rewrite the stub before it's passed through the rules */ 135 122 $start_url = Plugins::filter('rewrite_request', $start_url); … … 154 141 155 142 /* Also, we musn't forget to add the GET and POST vars into the action's settings array */ 156 $controller->handler->handler_vars = array_merge($controller->handler->handler_vars, $_GET, $_POST); 143 $handler_vars = new SuperGlobal($controller->handler->handler_vars); 144 $handler_vars->merge($_GET, $_POST); 145 $controller->handler->handler_vars = $handler_vars; 157 146 return true; 158 147 } -
branches/sginput/htdocs/system/classes/utils.php
r2651 r2789 169 169 public static function revert_magic_quotes_gpc() 170 170 { 171 /* We should only revert the magic quotes once per page hit */172 static $revert = true;173 if ( get_magic_quotes_gpc() && $revert) {174 $_GET = self::stripslashes($_GET);175 $_POST = self::stripslashes($_POST);176 $_COOKIE = self::stripslashes($_COOKIE);177 $revert = false;178 }171 /* We should only revert the magic quotes once per page hit */ 172 static $revert = true; 173 if ( get_magic_quotes_gpc() && $revert) { 174 $_GET = self::stripslashes($_GET); 175 $_POST = self::stripslashes($_POST); 176 $_COOKIE = self::stripslashes($_COOKIE); 177 $revert = false; 178 } 179 179 } 180 180 … … 840 840 finfo_close($finfo); 841 841 } 842 842 843 843 if( empty( $mimetype ) ) { 844 844 $pi = pathinfo($filename);
