From e1c1f12593034ae1fc0bfcbd17bf2cf908cac3bf Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Mon, 11 Mar 2019 14:26:37 +0100 Subject: Make it possible to define joins for log tables using `getWaysToJoinToOtherLogTables` (#14062) * Make it possible to define joins for log tables using getWaysToJoinToOtherLogTables * Adds some tests for custom log table joins * add missing log tables joined using getWaysToJoinToOtherLogTables * automatically add log tables up the hierarchy * code improvements * Adds new ExampleLogTables plugin giving a showcase for custom log tables * specifiy table name in userid archiver to fix query if custom log table joins on user_id column * fix tests * Adds log table that does only indirectly join with log_visit * Allow defining joins on visit and action * update ui files --- plugins/UserId/Archiver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/UserId') diff --git a/plugins/UserId/Archiver.php b/plugins/UserId/Archiver.php index 28c32bf3c6..584f364d3c 100644 --- a/plugins/UserId/Archiver.php +++ b/plugins/UserId/Archiver.php @@ -80,7 +80,7 @@ class Archiver extends \Piwik\Plugin\Archiver /** @var \Zend_Db_Statement $query */ $query = $this->getLogAggregator()->queryVisitsByDimension( array(self::USER_ID_FIELD), - "$userIdFieldName IS NOT NULL AND $userIdFieldName != ''", + "log_visit.$userIdFieldName IS NOT NULL AND log_visit.$userIdFieldName != ''", array("LOWER(HEX($visitorIdFieldName)) as $visitorIdFieldName") ); -- cgit v1.2.3