r19879 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19878‎ | r19879 | r19880 >
Date:11:29, 11 February 2007
Author:midom
Status:old
Tags:
Comment:
If 'tables' is a string that starts with a space, treat it as user-enforced FROM definition.
Development sponsored by: Dirty Hacks Inc.
Modified paths:
  • /trunk/phase3/includes/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Database.php
@@ -1045,7 +1045,11 @@
10461046 else
10471047 $from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) );
10481048 } elseif ($table!='') {
1049 - $from = ' FROM ' . $this->tableName( $table );
 1049+ if ($table{0}==' ') {
 1050+ $from = ' FROM ' . $table;
 1051+ } else {
 1052+ $from = ' FROM ' . $this->tableName( $table );
 1053+ }
10501054 } else {
10511055 $from = '';
10521056 }