diff options
author | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-06-03 21:46:05 +0400 |
---|---|---|
committer | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-06-03 21:46:05 +0400 |
commit | 1bb3d0e36d4516265632a4c395cfbc19b6fc8111 (patch) | |
tree | 3c470c0278e4d688582da4b9ac019c53346fd198 /plugins/Live | |
parent | 9d53d56ed5ba98841597b90afe014661a1b42c87 (diff) |
refs #1368 - Piwik::prefixTable() is deprecated
Diffstat (limited to 'plugins/Live')
-rw-r--r-- | plugins/Live/API.php | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/plugins/Live/API.php b/plugins/Live/API.php index a395e2592e..136b350380 100644 --- a/plugins/Live/API.php +++ b/plugins/Live/API.php @@ -139,21 +139,21 @@ class Piwik_Live_API $idvisit = $visitorDetailsArray['idVisit']; $sql = " - SELECT DISTINCT " .Piwik::prefixTable('log_action').".name AS pageUrl - FROM " .Piwik::prefixTable('log_link_visit_action')." - INNER JOIN " .Piwik::prefixTable('log_action')." - ON " .Piwik::prefixTable('log_link_visit_action').".idaction_url = " .Piwik::prefixTable('log_action').".idaction - WHERE " .Piwik::prefixTable('log_link_visit_action').".idvisit = $idvisit; + SELECT DISTINCT " .Piwik_Common::prefixTable('log_action').".name AS pageUrl + FROM " .Piwik_Common::prefixTable('log_link_visit_action')." + INNER JOIN " .Piwik_Common::prefixTable('log_action')." + ON " .Piwik_Common::prefixTable('log_link_visit_action').".idaction_url = " .Piwik_Common::prefixTable('log_action').".idaction + WHERE " .Piwik_Common::prefixTable('log_link_visit_action').".idvisit = $idvisit; "; $visitorDetailsArray['actionDetails'] = Piwik_FetchAll($sql); $sql = " - SELECT DISTINCT " .Piwik::prefixTable('log_action').".name AS pageUrl - FROM " .Piwik::prefixTable('log_link_visit_action')." - INNER JOIN " .Piwik::prefixTable('log_action')." - ON " .Piwik::prefixTable('log_link_visit_action').".idaction_name = " .Piwik::prefixTable('log_action').".idaction - WHERE " .Piwik::prefixTable('log_link_visit_action').".idvisit = $idvisit; + SELECT DISTINCT " .Piwik_Common::prefixTable('log_action').".name AS pageUrl + FROM " .Piwik_Common::prefixTable('log_link_visit_action')." + INNER JOIN " .Piwik_Common::prefixTable('log_action')." + ON " .Piwik_Common::prefixTable('log_link_visit_action').".idaction_name = " .Piwik_Common::prefixTable('log_action').".idaction + WHERE " .Piwik_Common::prefixTable('log_link_visit_action').".idvisit = $idvisit; "; $visitorDetailsArray['actionDetailsTitle'] = Piwik_FetchAll($sql); @@ -170,18 +170,18 @@ class Piwik_Live_API { $where = $whereBind = array(); - $where[] = Piwik::prefixTable('log_visit') . ".idsite = ? "; + $where[] = Piwik_Common::prefixTable('log_visit') . ".idsite = ? "; $whereBind[] = $idSite; if(!empty($visitorId)) { - $where[] = Piwik::prefixTable('log_visit') . ".visitor_idcookie = ? "; + $where[] = Piwik_Common::prefixTable('log_visit') . ".visitor_idcookie = ? "; $whereBind[] = $visitorId; } if(!empty($minIdVisit)) { - $where[] = Piwik::prefixTable('log_visit') . ".idvisit > ? "; + $where[] = Piwik_Common::prefixTable('log_visit') . ".idvisit > ? "; $whereBind[] = $minIdVisit; } @@ -191,15 +191,15 @@ class Piwik_Live_API $sqlWhere = " WHERE " . join(' AND ', $where); } - $sql = "SELECT " . Piwik::prefixTable('log_visit') . ".* , - " . Piwik::prefixTable ( 'goal' ) . ".match_attribute - FROM " . Piwik::prefixTable('log_visit') . " - LEFT JOIN ".Piwik::prefixTable('log_conversion')." - ON " . Piwik::prefixTable('log_visit') . ".idvisit = " . Piwik::prefixTable('log_conversion') . ".idvisit - LEFT JOIN ".Piwik::prefixTable('goal')." - ON (" . Piwik::prefixTable('goal') . ".idsite = " . Piwik::prefixTable('log_visit') . ".idsite - AND " . Piwik::prefixTable('goal') . ".idgoal = " . Piwik::prefixTable('log_conversion') . ".idgoal) - AND " . Piwik::prefixTable('goal') . ".deleted = 0 + $sql = "SELECT " . Piwik_Common::prefixTable('log_visit') . ".* , + " . Piwik_Common::prefixTable ( 'goal' ) . ".match_attribute + FROM " . Piwik_Common::prefixTable('log_visit') . " + LEFT JOIN ".Piwik_Common::prefixTable('log_conversion')." + ON " . Piwik_Common::prefixTable('log_visit') . ".idvisit = " . Piwik_Common::prefixTable('log_conversion') . ".idvisit + LEFT JOIN ".Piwik_Common::prefixTable('goal')." + ON (" . Piwik_Common::prefixTable('goal') . ".idsite = " . Piwik_Common::prefixTable('log_visit') . ".idsite + AND " . Piwik_Common::prefixTable('goal') . ".idgoal = " . Piwik_Common::prefixTable('log_conversion') . ".idgoal) + AND " . Piwik_Common::prefixTable('goal') . ".deleted = 0 $sqlWhere ORDER BY idsite,idvisit DESC LIMIT $limit"; @@ -221,7 +221,7 @@ class Piwik_Live_API { $where = $whereBind = array(); - $where[] = " " . Piwik::prefixTable('log_visit') . ".idsite = ? "; + $where[] = " " . Piwik_Common::prefixTable('log_visit') . ".idsite = ? "; $whereBind[] = $idSite; if($minutes != 0) @@ -245,18 +245,18 @@ class Piwik_Live_API // Details if($type == self::TYPE_FETCH_VISITS) { - $sql = "SELECT " . Piwik::prefixTable('log_visit') . ".idvisit - FROM " . Piwik::prefixTable('log_visit') . " + $sql = "SELECT " . Piwik_Common::prefixTable('log_visit') . ".idvisit + FROM " . Piwik_Common::prefixTable('log_visit') . " $sqlWhere ORDER BY idsite,idvisit DESC"; } // Pages elseif($type == self::TYPE_FETCH_PAGEVIEWS) { - $sql = "SELECT " . Piwik::prefixTable('log_link_visit_action') . ".idaction_url - FROM " . Piwik::prefixTable('log_link_visit_action') . " - INNER JOIN " . Piwik::prefixTable('log_visit') . " - ON " . Piwik::prefixTable('log_visit') . ".idvisit = " . Piwik::prefixTable('log_link_visit_action') . ".idvisit + $sql = "SELECT " . Piwik_Common::prefixTable('log_link_visit_action') . ".idaction_url + FROM " . Piwik_Common::prefixTable('log_link_visit_action') . " + INNER JOIN " . Piwik_Common::prefixTable('log_visit') . " + ON " . Piwik_Common::prefixTable('log_visit') . ".idvisit = " . Piwik_Common::prefixTable('log_link_visit_action') . ".idvisit $sqlWhere"; } else |