Merge "TemplateParser: Use context makeKey() instead of wfMemcKey()"
[lhc/web/wiklou.git] / includes / specials / SpecialWantedpages.php
index 38f1808..02a1f73 100644 (file)
@@ -43,10 +43,10 @@ class WantedPagesPage extends WantedQueryPage {
                        $parts = explode( '/', $par, 2 );
                        $this->limit = (int)$parts[0];
                        // @todo FIXME: nlinks is ignored
-                       //$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
+                       // $nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
                        $this->offset = 0;
                } else {
-                       //$nlinks = true;
+                       // $nlinks = true;
                }
                $this->setListoutput( $inc );
                $this->shownavigation = !$inc;
@@ -72,7 +72,10 @@ class WantedPagesPage extends WantedQueryPage {
                                "pg2.page_namespace != '" . NS_MEDIAWIKI . "'"
                        ),
                        'options' => array(
-                               'HAVING' => "COUNT(*) > $count",
+                               'HAVING' => array(
+                                       "COUNT(*) > $count",
+                                       "COUNT(*) > SUM(pg2.page_is_redirect)"
+                               ),
                                'GROUP BY' => array( 'pl_namespace', 'pl_title' )
                        ),
                        'join_conds' => array(
@@ -86,7 +89,7 @@ class WantedPagesPage extends WantedQueryPage {
                        )
                );
                // Replacement for the WantedPages::getSQL hook
-               wfRunHooks( 'WantedPages::getQueryInfo', array( &$this, &$query ) );
+               Hooks::run( 'WantedPages::getQueryInfo', array( &$this, &$query ) );
 
                return $query;
        }