Revert r70418, r70959: direct use of $_GET is not needed anymore since we no longer...
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 20 Jan 2011 06:42:45 +0000 (06:42 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 20 Jan 2011 06:42:45 +0000 (06:42 +0000)
includes/CategoryPage.php

index 86c2717..bbd3c43 100644 (file)
@@ -68,18 +68,15 @@ class CategoryPage extends Article {
        }
 
        function closeShowCategory() {
-               global $wgOut;
+               global $wgOut, $wgRequest;
 
                $from = $until = array();
                foreach ( array( 'page', 'subcat', 'file' ) as $type ) {
-                       # Use $_GET instead of $wgRequest, because the latter helpfully
-                       # normalizes Unicode, which removes nulls.  TODO: do something
-                       # smarter than passing nulls in URLs.  :/
-                       $from[$type] = isset( $_GET["{$type}from"] ) ? $_GET["{$type}from"] : null;
-                       $until[$type] = isset( $_GET["{$type}until"] ) ? $_GET["{$type}until"] : null;
+                       $from[$type] = $wgRequest->getVal( "{$type}from" );
+                       $until[$type] = $wgRequest->getVal( "{$type}until" );
                }
 
-               $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $_GET );
+               $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $wgRequest->getValues() );
                $wgOut->addHTML( $viewer->getHTML() );
        }
 }