From 3de6fd8c819d21bb3814a6f97d429c1912f5c048 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sun, 11 Feb 2007 11:29:33 +0000 Subject: [PATCH] If 'tables' is a string that starts with a space, treat it as user-enforced FROM definition. Development sponsored by: Dirty Hacks Inc. --- includes/Database.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = ''; } -- 2.20.1