Remove "wtf" $_GET hacks ;)
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 8 Apr 2008 20:51:19 +0000 (20:51 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 8 Apr 2008 20:51:19 +0000 (20:51 +0000)
includes/LogEventsList.php
includes/SpecialContributions.php

index e8b7b2e..69e54da 100644 (file)
@@ -386,8 +386,12 @@ class LogPager extends ReverseChronologicalPager {
                $this->limitType( $type );
                $this->limitUser( $user );
                $this->limitTitle( $title, $pattern );
-               # Hack to recognize subpage parameter
-               $_GET['type'] = $type;
+       }
+       
+       function getDefaultQuery() {
+               $query = parent::getDefaultQuery();
+               $query['type'] = $this->type;
+               return $query;
        }
        
        /**
index 63e14c5..44df343 100644 (file)
@@ -30,6 +30,8 @@ class ContribsPager extends ReverseChronologicalPager {
        function getDefaultQuery() {
                $query = parent::getDefaultQuery();
                $query['target'] = $this->target;
+               $query['month'] = $this->month;
+               $query['year'] = $this->year;
                return $query;
        }
 
@@ -279,9 +281,7 @@ function wfSpecialContributions( $par = null ) {
        wfRunHooks( 'SpecialContributionsBeforeMainOutput', $id );
 
        $wgOut->addHTML( contributionsForm( $options ) );
-       # Show original selected options, don't apply them so as to allow paging
-       $_GET['year'] = ''; // hack for Pager
-       $_GET['month'] = ''; // hack for Pager
+       
        if( $skip ) {
                $options['year'] = '';
                $options['month'] = '';