From: Domas Mituzas Date: Sun, 11 Feb 2007 11:29:33 +0000 (+0000) Subject: If 'tables' is a string that starts with a space, treat it as user-enforced FROM... X-Git-Tag: 1.31.0-rc.0~54060 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=3de6fd8c8;p=lhc%2Fweb%2Fwiklou.git If 'tables' is a string that starts with a space, treat it as user-enforced FROM definition. Development sponsored by: Dirty Hacks Inc. --- diff --git a/includes/Database.php b/includes/Database.php index 2678e1c9c1..5ad073d3e3 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -1045,7 +1045,11 @@ class Database { else $from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) ); } elseif ($table!='') { - $from = ' FROM ' . $this->tableName( $table ); + if ($table{0}==' ') { + $from = ' FROM ' . $table; + } else { + $from = ' FROM ' . $this->tableName( $table ); + } } else { $from = ''; }