rdbms: remove leading table name space hack in Database
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 15 Feb 2018 10:30:12 +0000 (02:30 -0800)
committerKrinkle <krinklemail@gmail.com>
Thu, 15 Feb 2018 22:53:50 +0000 (22:53 +0000)
This was added in r19879 (3de6fd8c8) with no provided use case.
There also appears to be nothing exploiting this.

Change-Id: I1641d4ed16d612ab6f08ee1eeca1580af73888bf

includes/libs/rdbms/database/Database.php

index d1814e1..b24b8cb 100644 (file)
@@ -1405,13 +1405,9 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                                $this->tableNamesWithIndexClauseOrJOIN(
                                        $table, $useIndexes, $ignoreIndexes, $join_conds );
                } elseif ( $table != '' ) {
-                       if ( $table[0] == ' ' ) {
-                               $from = ' FROM ' . $table;
-                       } else {
-                               $from = ' FROM ' .
-                                       $this->tableNamesWithIndexClauseOrJOIN(
-                                               [ $table ], $useIndexes, $ignoreIndexes, [] );
-                       }
+                       $from = ' FROM ' .
+                               $this->tableNamesWithIndexClauseOrJOIN(
+                                       [ $table ], $useIndexes, $ignoreIndexes, [] );
                } else {
                        $from = '';
                }