http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65471
Revision: 65471 Author: catrope Date: 2010-04-23 18:17:11 +0000 (Fri, 23 Apr 2010) Log Message: ----------- Remove optional "AS" keyword from table aliases, unbreaks installs with table prefixes Modified Paths: -------------- branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php branches/querypage-work2/phase3/includes/specials/SpecialDoubleRedirects.php branches/querypage-work2/phase3/includes/specials/SpecialListredirects.php Modified: branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php =================================================================== --- branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php 2010-04-23 18:00:07 UTC (rev 65470) +++ branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php 2010-04-23 18:17:11 UTC (rev 65471) @@ -27,7 +27,7 @@ function getQueryInfo() { return array( - 'tables' => array( 'redirect', 'page AS p1', 'page AS p2' ), + 'tables' => array( 'redirect', 'page p1', 'page p2' ), 'fields' => array( 'p1.page_namespace AS namespace', 'p1.page_title AS title', 'rd_namespace', @@ -36,10 +36,10 @@ 'conds' => array( 'rd_namespace >= 0', 'p2.page_namespace IS NULL' ), - 'join_conds' => array( 'page AS p1' => array( 'LEFT JOIN', array( + 'join_conds' => array( 'page p1' => array( 'LEFT JOIN', array( 'rd_from=p1.page_id', ) ), - 'page AS p2' => array( 'LEFT JOIN', array( + 'page p2' => array( 'LEFT JOIN', array( 'rd_namespace=p2.page_namespace', 'rd_title=p2.page_title' ) ) Modified: branches/querypage-work2/phase3/includes/specials/SpecialDoubleRedirects.php =================================================================== --- branches/querypage-work2/phase3/includes/specials/SpecialDoubleRedirects.php 2010-04-23 18:00:07 UTC (rev 65470) +++ branches/querypage-work2/phase3/includes/specials/SpecialDoubleRedirects.php 2010-04-23 18:17:11 UTC (rev 65471) @@ -27,9 +27,9 @@ function reallyGetQueryInfo( $namespace = null, $title = null ) { $limitToTitle = !( $namespace === null && $title === null ); $retval = array ( - 'tables' => array ( 'redirect AS ra', 'redirect AS rb', - 'page AS pa', 'page AS pb', - 'page AS pc' ), + 'tables' => array ( 'redirect ra', 'redirect rb', + 'page pa', 'page pb', + 'page pc' ), 'fields' => array ( 'pa.page_namespace AS namespace', 'pa.page_title AS title', 'pb.page_namespace AS nsb', Modified: branches/querypage-work2/phase3/includes/specials/SpecialListredirects.php =================================================================== --- branches/querypage-work2/phase3/includes/specials/SpecialListredirects.php 2010-04-23 18:00:07 UTC (rev 65470) +++ branches/querypage-work2/phase3/includes/specials/SpecialListredirects.php 2010-04-23 18:17:11 UTC (rev 65471) @@ -25,7 +25,7 @@ function getQueryInfo() { return array( - 'tables' => array( 'page AS p1', 'redirect', 'page AS p2' ), + 'tables' => array( 'page p1', 'redirect', 'page p2' ), 'fields' => array( 'p1.page_namespace AS namespace', 'p1.page_title AS title', 'rd_namespace', @@ -34,7 +34,7 @@ 'conds' => array( 'p1.page_is_redirect' => 1 ), 'join_conds' => array( 'redirect' => array( 'LEFT JOIN', 'rd_from=p1.page_id' ), - 'page AS p2' => array( 'LEFT JOIN', array( + 'page p2' => array( 'LEFT JOIN', array( 'p2.page_namespace=rd_namespace', 'p2.page_title=rd_title' ) ) ) ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs