If 'tables' is a string that starts with a space, treat it as user-enforced FROM...
[lhc/web/wiklou.git] / includes / Database.php
index 2678e1c..5ad073d 100644 (file)
@@ -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 = '';
                }