* Fixed unclosed <p> tag
[lhc/web/wiklou.git] / includes / QueryPage.php
index 90d6eb9..8c6e110 100644 (file)
@@ -24,7 +24,6 @@ $wgQueryPages = array(
     array( 'LonelyPagesPage',           'Lonelypages'       ),
     array( 'LongPagesPage',             'Longpages'         ),
     array( 'NewPagesPage',              'Newpages'          ),
-    array( 'PopularPagesPage',          'Popularpages'      ),
     array( 'ShortPagesPage',            'Shortpages'        ),
     array( 'UncategorizedCategoriesPage','Uncategorizedcategories'),
     array( 'UncategorizedPagesPage',    'Uncategorizedpages'),
@@ -32,7 +31,10 @@ $wgQueryPages = array(
     array( 'WantedPagesPage',           'Wantedpages'       ),
 );
     
-
+global $wgDisableCounters;
+if( !$wgDisableCounters ) {
+       $wgQueryPages[] = array( 'PopularPagesPage',          'Popularpages'      );
+}
 
 /**
  * This is a class for doing query pages; since they're almost all the same,
@@ -112,11 +114,21 @@ class QueryPage {
 
        /**
         * The content returned by this function will be output before any result
-       */
+        */
        function getPageHeader( ) {
                return '';
        }
        
+       /**
+        * If using extra form wheely-dealies, return a set of parameters here
+        * as an associative array. They will be encoded and added to the paging
+        * links (prev/next/lengths).
+        * @return array
+        */
+       function linkParameters() {
+               return array();
+       }
+       
        /**
         * Some special pages (for example SpecialListusers) might not return the
         * current object formatted, but return the previous one instead.
@@ -239,7 +251,9 @@ class QueryPage {
                        # often disable 'next' link when we reach the end
                        if($num < $limit) { $atend = true; } else { $atend = false; }
                        
-                       $sl = wfViewPrevNext( $offset, $limit , $wgContLang->specialPage( $sname ), "" ,$atend );
+                       $sl = wfViewPrevNext( $offset, $limit ,
+                               $wgContLang->specialPage( $sname ),
+                               wfArrayToCGI( $this->linkParameters() ), $atend );
                        $wgOut->addHTML( "<br />{$sl}</p>\n" );
                }
                if ( $num > 0 ) {