diff options
Diffstat (limited to 'core/DataAccess/LogQueryBuilder/JoinTables.php')
-rw-r--r-- | core/DataAccess/LogQueryBuilder/JoinTables.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/DataAccess/LogQueryBuilder/JoinTables.php b/core/DataAccess/LogQueryBuilder/JoinTables.php index c773750155..c05a333d1d 100644 --- a/core/DataAccess/LogQueryBuilder/JoinTables.php +++ b/core/DataAccess/LogQueryBuilder/JoinTables.php @@ -48,7 +48,22 @@ class JoinTables extends \ArrayObject public function hasJoinedTable($tableName) { - return in_array($tableName, $this->getTables()); + $tables = in_array($tableName, $this->getTables()); + if ($tables) { + return true; + } + + foreach ($this as $table) { + if (is_array($table)) { + if (!isset($table['tableAlias']) && $table['table'] === $table) { + return true; + } elseif (isset($table['tableAlias']) && $table['tableAlias'] === $table) { + return true; + } + } + } + + return false; } public function hasJoinedTableManually($tableToFind, $joinToFind) |