If 'tables' is a string that starts with a space, treat it as user-enforced FROM...
authorDomas Mituzas <midom@users.mediawiki.org>
Sun, 11 Feb 2007 11:29:33 +0000 (11:29 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Sun, 11 Feb 2007 11:29:33 +0000 (11:29 +0000)
Development sponsored by: Dirty Hacks Inc.

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 = '';
                }