Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/DataAccess/LogQueryBuilder/JoinGenerator.php')
-rw-r--r--core/DataAccess/LogQueryBuilder/JoinGenerator.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/DataAccess/LogQueryBuilder/JoinGenerator.php b/core/DataAccess/LogQueryBuilder/JoinGenerator.php
index 1bd3ab3912..7b69184f0b 100644
--- a/core/DataAccess/LogQueryBuilder/JoinGenerator.php
+++ b/core/DataAccess/LogQueryBuilder/JoinGenerator.php
@@ -228,6 +228,13 @@ class JoinGenerator
);
if (is_array($tA) && is_array($tB)) {
+ if (isset($tB['tableAlias']) && isset($tA['joinOn']) && strpos($tA['joinOn'], $tB['tableAlias']) !== false) {
+ return 1;
+ }
+ if (isset($tA['tableAlias']) && isset($tB['joinOn']) && strpos($tB['joinOn'], $tA['tableAlias']) !== false) {
+ return -1;
+ }
+
return 0;
}