Remove raw $_GET usage held over from days before WebRequest existed, was introduced...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 11 Aug 2010 12:15:16 +0000 (12:15 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 11 Aug 2010 12:15:16 +0000 (12:15 +0000)
includes/Wiki.php

index d9a8e73..9e16535 100644 (file)
@@ -5,14 +5,10 @@
  * @internal documentation reviewed 15 Mar 2010
  */
 class MediaWiki {
-
-       var $GET; /* Stores the $_GET variables at time of creation, can be changed */
        var $params = array();
 
-       /** Constructor. It just save the $_GET variable */
-       function __construct() {
-               $this->GET = $_GET;
-       }
+       /** Constructor */
+       function __construct() {}
 
        /**
         * Stores key/value pairs to circumvent global variables
@@ -214,11 +210,11 @@ class MediaWiki {
                        }
                // Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant
                } else if( $action == 'view' && !$request->wasPosted() &&
-                       ( ( !isset($this->GET['title']) || $title->getPrefixedDBKey() != $this->GET['title'] ) ||
+                       ( ( !$request->getVal( 'title' ) || $title->getPrefixedDBKey() != $request->getText( 'title' ) ) ||
                          // No valid variant in URL (if the main-language has multi-variants), to ensure
                          // anonymous access would always be redirect to a URL with 'variant' parameter
-                         ( !isset($this->GET['variant']) && $wgContLang->hasVariants() && !$wgUser->isLoggedIn() ) ) &&
-                       !count( array_diff( array_keys( $this->GET ), array( 'action', 'title' ) ) ) )
+                         ( !$request->getVal( 'variant' ) && $wgContLang->hasVariants() && !$wgUser->isLoggedIn() ) ) &&
+                       !count( array_diff( array_keys( $request->getValues() ), array( 'action', 'title' ) ) ) )
                {
                        if( !$wgUser->isLoggedIn() ) {
                                $pref = $wgContLang->getPreferredVariant( false, $fromHeader = true );