Fix 2714 : backlink from special:whatlinkshere was hard set as 'existing'
[lhc/web/wiklou.git] / includes / QueryPage.php
index 7dc4740..9488751 100644 (file)
@@ -27,6 +27,7 @@ $wgQueryPages = array(
        array( 'LongPagesPage',                 'Longpages'                     ),
        array( 'MostcategoriesPage',            'Mostcategories'                ),
        array( 'MostimagesPage',                'Mostimages'                    ),
+       array( 'MostlinkedCategoriesPage',      'Mostlinkedcategories'          ),
        array( 'MostlinkedPage',                'Mostlinked'                    ),
        array( 'MostrevisionsPage',             'Mostrevisions'                 ),
        array( 'NewPagesPage',                  'Newpages'                      ),
@@ -35,6 +36,7 @@ $wgQueryPages = array(
        array( 'UncategorizedPagesPage',        'Uncategorizedpages'            ),
        array( 'UnusedCategoriesPage',          'Unusedcategories'              ),
        array( 'UnusedimagesPage',              'Unusedimages'                  ),
+       array( 'WantedCategoriesPage',          'Wantedcategories'              ),
        array( 'WantedPagesPage',               'Wantedpages'                   ),
 );
 wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
@@ -255,13 +257,12 @@ class QueryPage {
         * @param $shownavigation show navigation like "next 200"?
         */
        function doQuery( $offset, $limit, $shownavigation=true ) {
-               global $wgUser, $wgOut, $wgLang, $wgRequest, $wgContLang;
+               global $wgUser, $wgOut, $wgContLang;
                
                $sname = $this->getName();
                $fname = get_class($this) . '::doQuery';
                $sql = $this->getSQL();
                $dbr =& wfGetDB( DB_SLAVE );
-               $dbw =& wfGetDB( DB_MASTER );
                $querycache = $dbr->tableName( 'querycache' );
 
                $wgOut->setSyndicated( $this->isSyndicated() );
@@ -336,9 +337,10 @@ class QueryPage {
        }
 
        /**
-        * Do any necessary preprocessing of the result object
+        * Do any necessary preprocessing of the result object.
+        * You should pass this by reference: &$db , &$res
         */
-       function preprocessResults( &$db, &$res ) {}
+       function preprocessResults( $db, $res ) {}
 
        /**
         * Similar to above, but packaging in a syndicated feed instead of a web page