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:
authorBeezyT <timo@ezdesign.de>2012-11-08 15:02:14 +0400
committerBeezyT <timo@ezdesign.de>2012-11-08 15:02:14 +0400
commit8a0fcbb4d1eb47a6634a9fd1cd0c351242454a25 (patch)
tree8573029d931af86c8853be21f39ff572f471050e /plugins/Transitions
parentbe0df1214bd5808e23e3f39abe5687e26876ce4a (diff)
refs #2465 Insight
* links to the current url get a bubble as well * limit for the number of pages loaded from the API can be configured * ready for translation * url normalizer doesn't remove the hash part anymore (which corresponds to the latest behavior of the tracker) git-svn-id: http://dev.piwik.org/svn/trunk@7405 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Transitions')
-rw-r--r--plugins/Transitions/API.php8
-rw-r--r--plugins/Transitions/Transitions.php11
2 files changed, 12 insertions, 7 deletions
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index 1810cf5b17..4d1a0aea8b 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -92,8 +92,9 @@ class Piwik_Transitions_API
}
if ($parts == 'all' || in_array('followingActions', $partsArray))
{
+ $includeLoops = $parts != 'all' && !in_array('internalReferrers', $partsArray);
$this->addFollowingActions($transitionsArchiving, $archiveProcessing, $report, $idaction,
- $actionType, $limitBeforeGrouping);
+ $actionType, $limitBeforeGrouping, $includeLoops);
}
if ($parts == 'all' || in_array('externalReferrers', $partsArray))
{
@@ -205,12 +206,13 @@ class Piwik_Transitions_API
* @param $idaction
* @param string $actionType
* @param $limitBeforeGrouping
+ * @param boolean $includeLoops
*/
private function addFollowingActions($transitionsArchiving, $archiveProcessing, &$report,
- $idaction, $actionType, $limitBeforeGrouping) {
+ $idaction, $actionType, $limitBeforeGrouping, $includeLoops=false) {
$data = $transitionsArchiving->queryFollowingActions(
- $idaction, $actionType, $archiveProcessing, $limitBeforeGrouping);
+ $idaction, $actionType, $archiveProcessing, $limitBeforeGrouping, $includeLoops);
foreach ($data as $tableName => $table)
{
diff --git a/plugins/Transitions/Transitions.php b/plugins/Transitions/Transitions.php
index 6a2e6cc1cd..6b7cea5349 100644
--- a/plugins/Transitions/Transitions.php
+++ b/plugins/Transitions/Transitions.php
@@ -285,10 +285,11 @@ class Piwik_Transitions extends Piwik_Plugin
* @param $actionType
* @param Piwik_ArchiveProcessing_Day $archiveProcessing
* @param $limitBeforeGrouping
+ * @param $includeLoops
* @return array(followingPages:Piwik_DataTable, outlinks:Piwik_DataTable, downloads:Piwik_DataTable)
*/
public function queryFollowingActions($idaction, $actionType, Piwik_ArchiveProcessing_Day $archiveProcessing,
- $limitBeforeGrouping = false)
+ $limitBeforeGrouping = false, $includeLoops = false)
{
$types = array();
@@ -348,9 +349,11 @@ class Piwik_Transitions extends Piwik_Plugin
$rankingQuery->partitionResultIntoMultipleGroups('type', array_keys($types));
$type = $this->getColumnTypeSuffix($actionType);
- $where = 'log_link_visit_action.idaction_'.$type.'_ref = '.intval($idaction).' AND '
- . '(log_link_visit_action.idaction_'.$type.' IS NULL OR '
- . 'log_link_visit_action.idaction_'.$type.' != '.intval($idaction).')';
+ $where = 'log_link_visit_action.idaction_'.$type.'_ref = '.intval($idaction);
+ if (!$includeLoops) {
+ $where .= ' AND (log_link_visit_action.idaction_'.$type.' IS NULL OR '
+ . 'log_link_visit_action.idaction_'.$type.' != '.intval($idaction).')';
+ }
$orderBy = '`'.Piwik_Archive::INDEX_NB_ACTIONS.'` DESC';