diff options
author | mattab <matthieu.aubry@gmail.com> | 2016-03-10 18:59:43 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2016-03-10 18:59:43 +0300 |
commit | 379dbcea60a373fc955beac8e87ce9cba29f4ad9 (patch) | |
tree | e318684a0fd6e148f73affe8b5226c4907e7bb17 | |
parent | 94f3a97f5688054f2e305d44ad51681152aeee7d (diff) |
Use sprintf instead of str_replace for consistency
-rw-r--r-- | plugins/Transitions/API.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php index 89823d89c9..4304e2a281 100644 --- a/plugins/Transitions/API.php +++ b/plugins/Transitions/API.php @@ -222,8 +222,8 @@ class API extends \Piwik\Plugin\API if ($actionType != 'title') { // specific setup for page urls $types[Action::TYPE_PAGE_URL] = 'followingPages'; - $dimension = 'if ( %s.idaction_url IS NULL, %s.idaction_name, %s.idaction_url )'; - $dimension = str_replace('%s', 'log_link_visit_action', $dimension ); + $dimension = 'if ( %1$s.idaction_url IS NULL, %1$s.idaction_name, %1$s.idaction_url )'; + $dimension = sprintf($dimension, 'log_link_visit_action' ); // site search referrers are logged with url=NULL // when we find one, we have to join on name $joinLogActionColumn = $dimension; @@ -406,8 +406,8 @@ class API extends \Piwik\Plugin\API if ($dimension == 'idaction_url_ref') { // site search referrers are logged with url_ref=NULL // when we find one, we have to join on name_ref - $dimension = 'if ( %s.idaction_url_ref IS NULL, %s.idaction_name_ref, %s.idaction_url_ref )'; - $dimension = str_replace('%s', 'log_link_visit_action', $dimension ); + $dimension = 'if ( %1$s.idaction_url_ref IS NULL, %1$s.idaction_name_ref, %1$s.idaction_url_ref )'; + $dimension = sprintf($dimension, 'log_link_visit_action'); $joinLogActionOn = $dimension; } else { $joinLogActionOn = $dimension; |