From e5db16a4df3c8bc176fc2c93c2d6d42baaaf4203 Mon Sep 17 00:00:00 2001 From: mattab Date: Tue, 22 Oct 2013 17:41:12 +1300 Subject: [PATCH] Minor --- core/Tracker/Action.php | 6 +- piwik.php | 1 + ...Urls_lastN__API.getProcessedReport_day.xml | 10 +-- ..._CustomEvents__Actions.getPageUrls_day.xml | 25 +++---- ...ustomEvents__Actions.getPageUrls_month.xml | 25 +++---- .../test_CustomEvents__Actions.get_day.xml | 4 +- .../test_CustomEvents__Actions.get_month.xml | 4 +- ...mEvents__Live.getLastVisitsDetails_day.xml | 68 +++++++++---------- ...vents__Live.getLastVisitsDetails_month.xml | 68 +++++++++---------- ...Reports.generateReport_month.original.html | 2 +- 10 files changed, 103 insertions(+), 110 deletions(-) diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php index a537c34a590..43c96910c8a 100644 --- a/core/Tracker/Action.php +++ b/core/Tracker/Action.php @@ -291,20 +291,22 @@ public function record($idVisit, $visitorIdCookie, $idReferrerActionUrl, $idRefe 'time_spent_ref_action' => $timeSpentReferrerAction ); + foreach($this->actionIdsCached as $field => $idAction) { + $insert[$field] = $idAction; + } + $customValue = $this->getCustomFloatValue(); if (!empty($customValue)) { $insert[self::DB_COLUMN_CUSTOM_FLOAT] = $customValue; } $customVariables = $this->getCustomVariables(); - if (!empty($customVariables)) { Common::printDebug("Page level Custom Variables: "); Common::printDebug($customVariables); } $insert = array_merge($insert, $customVariables); - $fields = implode(", ", array_keys($insert)); $bind = array_values($insert); $values = Common::getSqlStringFieldsArray($insert); diff --git a/piwik.php b/piwik.php index f805fee9d3f..a55d41a795d 100644 --- a/piwik.php +++ b/piwik.php @@ -59,6 +59,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Tracker/TableLogAction.php'; require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Action.php'; require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionClickUrl.php'; +require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionEvent.php'; require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionPageview.php'; require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionSiteSearch.php'; require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Request.php'; diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents_Actions.getPageUrls_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents_Actions.getPageUrls_lastN__API.getProcessedReport_day.xml index e2f0dac23e4..3592b74be5c 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents_Actions.getPageUrls_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents_Actions.getPageUrls_lastN__API.getProcessedReport_day.xml @@ -43,9 +43,9 @@ - 4 - 20 - 00:38:00 + 2 + 2 + 00:00:00 0% 100% 0s @@ -53,8 +53,8 @@ 2 - 14 - 00:29:00 + 2 + 00:24:59 0% 0% 0s diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_day.xml index 9852ba7c180..1b54b1e03d6 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_day.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_day.xml @@ -2,18 +2,13 @@ - 4 + 2 2 - 20 - 9120 - 2 - 2 - 8 - 5522 - 0 + 2 + 0 2 - 4 - 2280 + 2 + 0 0% 100% http://example.org/movies @@ -22,14 +17,14 @@ 2 2 - 14 - 3480 + 2 + 2998 2 2 - 26 - 7082 + 30 + 7202 0 - 1740 + 1499 0% 0% http://example.org/webradio diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_month.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_month.xml index b575bcaac45..2db3c76eaa6 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_month.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.getPageUrls_month.xml @@ -2,18 +2,13 @@ - 4 - 20 - 9120 - 2 - 8 - 5522 - 0 - 4 + 2 + 2 + 0 + 2 2 - 2 2 - 2280 + 0 0% 100% http://example.org/movies @@ -21,15 +16,15 @@ 2 - 14 - 3480 + 2 + 2998 2 - 26 - 7082 + 30 + 7202 0 2 2 - 1740 + 1499 0% 0% http://example.org/webradio diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_day.xml index ed299b9781f..210a13e4f33 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_day.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_day.xml @@ -1,7 +1,7 @@ - 34 - 6 + 4 + 4 0 0 0 diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_month.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_month.xml index ed299b9781f..210a13e4f33 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents__Actions.get_month.xml @@ -1,7 +1,7 @@ - 34 - 6 + 4 + 4 0 0 0 diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml index 12eab4ba0d9..13bb1e069fc 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml @@ -17,7 +17,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 16 @@ -28,7 +28,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 17 @@ -39,7 +39,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 18 @@ -50,7 +50,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 19 @@ -161,7 +161,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 2 @@ -178,7 +178,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 3 @@ -195,7 +195,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 4 @@ -212,7 +212,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 5 @@ -229,7 +229,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 6 @@ -246,7 +246,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 7 @@ -264,7 +264,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 8 @@ -293,7 +293,7 @@ action http://example.org/movies - + Princess Mononoke (もののけ姫) 12 10 @@ -304,7 +304,7 @@ action http://example.org/movies - + Ponyo (崖の上のポニョ) 12 11 @@ -315,7 +315,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 12 @@ -326,7 +326,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 13 @@ -337,7 +337,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 14 @@ -348,7 +348,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 15 @@ -447,7 +447,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 35 @@ -458,7 +458,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 36 @@ -469,7 +469,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 37 @@ -480,7 +480,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 38 @@ -587,7 +587,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 21 @@ -604,7 +604,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 22 @@ -621,7 +621,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 23 @@ -638,7 +638,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 24 @@ -655,7 +655,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 25 @@ -672,7 +672,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 26 @@ -690,7 +690,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 27 @@ -719,7 +719,7 @@ action http://example.org/movies - + Princess Mononoke (もののけ姫) 12 29 @@ -730,7 +730,7 @@ action http://example.org/movies - + Ponyo (崖の上のポニョ) 12 30 @@ -741,7 +741,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 31 @@ -752,7 +752,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 32 @@ -763,7 +763,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 33 @@ -774,7 +774,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 34 diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml index 12eab4ba0d9..13bb1e069fc 100644 --- a/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml +++ b/tests/PHPUnit/Integration/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml @@ -17,7 +17,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 16 @@ -28,7 +28,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 17 @@ -39,7 +39,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 18 @@ -50,7 +50,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 19 @@ -161,7 +161,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 2 @@ -178,7 +178,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 3 @@ -195,7 +195,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 4 @@ -212,7 +212,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 5 @@ -229,7 +229,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 6 @@ -246,7 +246,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 7 @@ -264,7 +264,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 8 @@ -293,7 +293,7 @@ action http://example.org/movies - + Princess Mononoke (もののけ姫) 12 10 @@ -304,7 +304,7 @@ action http://example.org/movies - + Ponyo (崖の上のポニョ) 12 11 @@ -315,7 +315,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 12 @@ -326,7 +326,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 13 @@ -337,7 +337,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 14 @@ -348,7 +348,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 15 @@ -447,7 +447,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 35 @@ -458,7 +458,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 36 @@ -469,7 +469,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 37 @@ -480,7 +480,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 38 @@ -587,7 +587,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 21 @@ -604,7 +604,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 22 @@ -621,7 +621,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 23 @@ -638,7 +638,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 24 @@ -655,7 +655,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 25 @@ -672,7 +672,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 26 @@ -690,7 +690,7 @@ action http://example.org/webradio - + La fiancée de l'eau 2 27 @@ -719,7 +719,7 @@ action http://example.org/movies - + Princess Mononoke (もののけ姫) 12 29 @@ -730,7 +730,7 @@ action http://example.org/movies - + Ponyo (崖の上のポニョ) 12 30 @@ -741,7 +741,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 31 @@ -752,7 +752,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 32 @@ -763,7 +763,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 33 @@ -774,7 +774,7 @@ action http://example.org/movies - + Spirited Away (千と千尋の神隠し) 12 34 diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html index c5d62ec03d5..a8d5257894a 100644 --- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html +++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html @@ -18,7 +18,7 @@

Report list

-