r86675 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86674‎ | r86675 | r86676 >
Date:22:19, 21 April 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added space to table name to re-enable table aliases (e.g. "users u")
Modified paths:
  • /trunk/extensions/ExternalData/ED_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExternalData/ED_Utils.php
@@ -225,6 +225,10 @@
226226 }
227227
228228 static function searchDB( $db, $table, $vars, $conds, $options ) {
 229+ // Add on a space at the beginning of $table so that
 230+ // $db->select() will treat it as a literal, instead of
 231+ // putting quotes around it or otherwise trying to parse it.
 232+ $table = ' ' . $table;
229233 $result = $db->select( $table, $vars, $conds, 'EDUtils::searchDB', $options );
230234 if ( !$result ) {
231235 echo ( wfMsgExt( "externaldata-db-invalid-query", array( 'parse', 'escape' ) ) );

Status & tagging log