r65471 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65470‎ | r65471 | r65472 >
Date:18:17, 23 April 2010
Author:catrope
Status:deferred
Tags:
Comment:
Remove optional "AS" keyword from table aliases, unbreaks installs with table prefixes
Modified paths:
  • /branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php (modified) (history)
  • /branches/querypage-work2/phase3/includes/specials/SpecialDoubleRedirects.php (modified) (history)
  • /branches/querypage-work2/phase3/includes/specials/SpecialListredirects.php (modified) (history)

Diff [purge]

Index: branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php
@@ -27,7 +27,7 @@
2828
2929 function getQueryInfo() {
3030 return array(
31 - 'tables' => array( 'redirect', 'page AS p1', 'page AS p2' ),
 31+ 'tables' => array( 'redirect', 'page p1', 'page p2' ),
3232 'fields' => array( 'p1.page_namespace AS namespace',
3333 'p1.page_title AS title',
3434 'rd_namespace',
@@ -36,10 +36,10 @@
3737 'conds' => array( 'rd_namespace >= 0',
3838 'p2.page_namespace IS NULL'
3939 ),
40 - 'join_conds' => array( 'page AS p1' => array( 'LEFT JOIN', array(
 40+ 'join_conds' => array( 'page p1' => array( 'LEFT JOIN', array(
4141 'rd_from=p1.page_id',
4242 ) ),
43 - 'page AS p2' => array( 'LEFT JOIN', array(
 43+ 'page p2' => array( 'LEFT JOIN', array(
4444 'rd_namespace=p2.page_namespace',
4545 'rd_title=p2.page_title'
4646 ) )
Index: branches/querypage-work2/phase3/includes/specials/SpecialDoubleRedirects.php
@@ -27,9 +27,9 @@
2828 function reallyGetQueryInfo( $namespace = null, $title = null ) {
2929 $limitToTitle = !( $namespace === null && $title === null );
3030 $retval = array (
31 - 'tables' => array ( 'redirect AS ra', 'redirect AS rb',
32 - 'page AS pa', 'page AS pb',
33 - 'page AS pc' ),
 31+ 'tables' => array ( 'redirect ra', 'redirect rb',
 32+ 'page pa', 'page pb',
 33+ 'page pc' ),
3434 'fields' => array ( 'pa.page_namespace AS namespace',
3535 'pa.page_title AS title',
3636 'pb.page_namespace AS nsb',
Index: branches/querypage-work2/phase3/includes/specials/SpecialListredirects.php
@@ -25,7 +25,7 @@
2626
2727 function getQueryInfo() {
2828 return array(
29 - 'tables' => array( 'page AS p1', 'redirect', 'page AS p2' ),
 29+ 'tables' => array( 'page p1', 'redirect', 'page p2' ),
3030 'fields' => array( 'p1.page_namespace AS namespace',
3131 'p1.page_title AS title',
3232 'rd_namespace',
@@ -34,7 +34,7 @@
3535 'conds' => array( 'p1.page_is_redirect' => 1 ),
3636 'join_conds' => array( 'redirect' => array(
3737 'LEFT JOIN', 'rd_from=p1.page_id' ),
38 - 'page AS p2' => array( 'LEFT JOIN', array(
 38+ 'page p2' => array( 'LEFT JOIN', array(
3939 'p2.page_namespace=rd_namespace',
4040 'p2.page_title=rd_title' ) ) )
4141 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r65475* querypage-work2: Tweak DB backend so stuff like 'tables' => array( 'alias' ...catrope19:06, 23 April 2010

Status & tagging log