From 33a43a50d4d66de3409cb4ac4ed62a656179e58c Mon Sep 17 00:00:00 2001 From: Christian Raue Date: Tue, 15 Jul 2014 15:29:46 +0200 Subject: removed unused variables and dead code --- misc/others/geoipUpdateRows.php | 2 +- misc/others/test_generateLotsVisitsWebsites.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'misc/others') diff --git a/misc/others/geoipUpdateRows.php b/misc/others/geoipUpdateRows.php index fa43c5d6c4..df480d395d 100755 --- a/misc/others/geoipUpdateRows.php +++ b/misc/others/geoipUpdateRows.php @@ -172,7 +172,7 @@ for (; $start < $end; $start += $limit) { continue; } - foreach ($rows as $i => $row) { + foreach ($rows as $row) { $fieldsToSet = array(); foreach ($logVisitFieldsToUpdate as $field => $ignore) { if (empty($fieldsToSet[$field])) { diff --git a/misc/others/test_generateLotsVisitsWebsites.php b/misc/others/test_generateLotsVisitsWebsites.php index 4dd23c5f51..33f050fc77 100644 --- a/misc/others/test_generateLotsVisitsWebsites.php +++ b/misc/others/test_generateLotsVisitsWebsites.php @@ -58,7 +58,7 @@ class Piwik_StressTests_CopyLogs SELECT `idsite`, `idvisitor`, `visitor_localtime`, `visitor_returning`, `visitor_count_visits`, CONCAT(CURRENT_DATE() , \" \", FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), CONCAT(CURRENT_DATE() , \" \", FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `visit_exit_idaction_url`, `visit_exit_idaction_name`, `visit_entry_idaction_url`, `visit_entry_idaction_name`, `visit_total_actions`, `visit_total_time`, `visit_goal_converted`, `visit_goal_buyer`, `referer_type`, `referer_name`, `referer_url`, `referer_keyword`, `config_id`, `config_os`, `config_browser_name`, `config_browser_version`, `config_resolution`, `config_pdf`, `config_flash`, `config_java`, `config_director`, `config_quicktime`, `config_realplayer`, `config_windowsmedia`, `config_gears`, `config_silverlight`, `config_cookie`, `location_ip`, `location_browser_lang`, `location_country`, `location_provider`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `visitor_days_since_last`, `visitor_days_since_order`, `visitor_days_since_first` FROM `" . Common::prefixTable('log_visit') . "` WHERE idsite >= 1 AND date(visit_last_action_time) between '$startDate' and '$endDate' ;"; - $result = $db->query($sql); + $db->query($sql); $this->log(" Copying actions..."); $sql = "INSERT INTO " . Common::prefixTable('log_link_visit_action') . " (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idaction_url`, `idaction_url_ref`, `idaction_name`, `idaction_name_ref`, `time_spent_ref_action`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`) @@ -67,21 +67,21 @@ class Piwik_StressTests_CopyLogs WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;"; // LIMIT 1000000 - $result = $db->query($sql); + $db->query($sql); $this->log(" Copying conversions..."); $sql = "INSERT IGNORE INTO `" . Common::prefixTable('log_conversion') . "` (`idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, `server_time`, `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, `buster`, `idorder`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount`) SELECT `idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, CONCAT(CURRENT_DATE() , \" \", FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, FLOOR(`buster` * RAND()), CONCAT(`idorder`,SUBSTRING(MD5(RAND()) FROM 1 FOR 9)) , `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount` FROM `" . Common::prefixTable('log_conversion') . "` WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;"; - $result = $db->query($sql); + $db->query($sql); $this->log(" Copying purchased items..."); $sql = "INSERT INTO `" . Common::prefixTable('log_conversion_item') . "` (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idorder`, `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted`) SELECT `idsite`, `idvisitor`, CONCAT(CURRENT_DATE() , \" \", TIME(`server_time`)), `idvisit`, CONCAT(`idorder`,SUBSTRING(MD5(RAND()) FROM 1 FOR 9)) , `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted` FROM `" . Common::prefixTable('log_conversion_item') . "` WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;"; - $result = $db->query($sql); + $db->query($sql); $now = $this->getVisitsToday(); $actions = $this->getActionsToday(); -- cgit v1.2.3