Index: trunk/extensions/ExternalData/ED_Utils.php |
— | — | @@ -225,6 +225,10 @@ |
226 | 226 | } |
227 | 227 | |
228 | 228 | 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; |
229 | 233 | $result = $db->select( $table, $vars, $conds, 'EDUtils::searchDB', $options ); |
230 | 234 | if ( !$result ) { |
231 | 235 | echo ( wfMsgExt( "externaldata-db-invalid-query", array( 'parse', 'escape' ) ) ); |