From b8e6cdb8e59d64a1a41d13c3e84ed602fcd4da7b Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 22 Dec 2010 15:20:10 +0000 Subject: [PATCH] Followup r78786, fix special wanted pages. Aliasing pages in left join doesn't work Trim some trailing whitespace too --- includes/specials/SpecialWantedpages.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialWantedpages.php b/includes/specials/SpecialWantedpages.php index 2610069f46..8878d27397 100644 --- a/includes/specials/SpecialWantedpages.php +++ b/includes/specials/SpecialWantedpages.php @@ -30,7 +30,7 @@ class WantedPagesPage extends WantedQueryPage { function __construct( $name = 'Wantedpages' ) { parent::__construct( $name ); } - + function execute( $par ) { $inc = $this->including(); @@ -64,16 +64,16 @@ class WantedPagesPage extends WantedQueryPage { NS_MEDIAWIKI . "'" ), 'options' => array ( 'HAVING' => "COUNT(*) > $count", 'GROUP BY' => 'pl_namespace, pl_title' ), - 'join_conds' => array ( 'page AS pg1' => array ( + 'join_conds' => array ( 'pg1' => array ( 'LEFT JOIN', array ( 'pg1.page_namespace = pl_namespace', 'pg1.page_title = pl_title' ) ), - 'page AS pg2' => array ( 'LEFT JOIN', + 'pg2' => array ( 'LEFT JOIN', 'pg2.page_id = pl_from' ) ) ); // Replacement WantedPages::getSQL wfRunHooks( 'WantedPages::getQueryInfo', array( &$this, &$query ) ); return $query; - } + } } -- 2.20.1