Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -5,14 +5,10 @@ |
6 | 6 | * @internal documentation reviewed 15 Mar 2010 |
7 | 7 | */ |
8 | 8 | class MediaWiki { |
9 | | - |
10 | | - var $GET; /* Stores the $_GET variables at time of creation, can be changed */ |
11 | 9 | var $params = array(); |
12 | 10 | |
13 | | - /** Constructor. It just save the $_GET variable */ |
14 | | - function __construct() { |
15 | | - $this->GET = $_GET; |
16 | | - } |
| 11 | + /** Constructor */ |
| 12 | + function __construct() {} |
17 | 13 | |
18 | 14 | /** |
19 | 15 | * Stores key/value pairs to circumvent global variables |
— | — | @@ -214,11 +210,11 @@ |
215 | 211 | } |
216 | 212 | // Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant |
217 | 213 | } else if( $action == 'view' && !$request->wasPosted() && |
218 | | - ( ( !isset($this->GET['title']) || $title->getPrefixedDBKey() != $this->GET['title'] ) || |
| 214 | + ( ( !$request->getVal( 'title' ) || $title->getPrefixedDBKey() != $request->getText( 'title' ) ) || |
219 | 215 | // No valid variant in URL (if the main-language has multi-variants), to ensure |
220 | 216 | // anonymous access would always be redirect to a URL with 'variant' parameter |
221 | | - ( !isset($this->GET['variant']) && $wgContLang->hasVariants() && !$wgUser->isLoggedIn() ) ) && |
222 | | - !count( array_diff( array_keys( $this->GET ), array( 'action', 'title' ) ) ) ) |
| 217 | + ( !$request->getVal( 'variant' ) && $wgContLang->hasVariants() && !$wgUser->isLoggedIn() ) ) && |
| 218 | + !count( array_diff( array_keys( $request->getValues() ), array( 'action', 'title' ) ) ) ) |
223 | 219 | { |
224 | 220 | if( !$wgUser->isLoggedIn() ) { |
225 | 221 | $pref = $wgContLang->getPreferredVariant( false, $fromHeader = true ); |