Merge "Made LocalFile move/delete/restore handle network partitions better"
[lhc/web/wiklou.git] / includes / specials / SpecialWantedpages.php
index 9f5d52d..38f1808 100644 (file)
  * @ingroup SpecialPage
  */
 class WantedPagesPage extends WantedQueryPage {
-       
+
        function __construct( $name = 'Wantedpages' ) {
                parent::__construct( $name );
-               $this->mIncludable = true;
+       }
+
+       function isIncludable() {
+               return true;
        }
 
        function execute( $par ) {
@@ -51,8 +54,7 @@ class WantedPagesPage extends WantedQueryPage {
        }
 
        function getQueryInfo() {
-               global $wgWantedPagesThreshold;
-               $count = $wgWantedPagesThreshold - 1;
+               $count = $this->getConfig()->get( 'WantedPagesThreshold' ) - 1;
                $query = array(
                        'tables' => array(
                                'pagelinks',
@@ -60,14 +62,13 @@ class WantedPagesPage extends WantedQueryPage {
                                'pg2' => 'page'
                        ),
                        'fields' => array(
-                               'pl_namespace AS namespace',
-                               'pl_title AS title',
-                               'COUNT(*) AS value'
+                               'namespace' => 'pl_namespace',
+                               'title' => 'pl_title',
+                               'value' => 'COUNT(*)'
                        ),
                        'conds' => array(
                                'pg1.page_namespace IS NULL',
-                               "pl_namespace NOT IN ( '" . NS_USER .
-                                       "', '" . NS_USER_TALK . "' )",
+                               "pl_namespace NOT IN ( '" . NS_USER . "', '" . NS_USER_TALK . "' )",
                                "pg2.page_namespace != '" . NS_MEDIAWIKI . "'"
                        ),
                        'options' => array(
@@ -86,6 +87,11 @@ class WantedPagesPage extends WantedQueryPage {
                );
                // Replacement for the WantedPages::getSQL hook
                wfRunHooks( 'WantedPages::getQueryInfo', array( &$this, &$query ) );
+
                return $query;
        }
+
+       protected function getGroupName() {
+               return 'maintenance';
+       }
 }