From 50fb660cf0c435afbab6af223fd5918a6fbc13e9 Mon Sep 17 00:00:00 2001 From: mattab <matthieu.aubry@gmail.com> Date: Tue, 7 Jan 2014 19:40:43 +1300 Subject: [PATCH] Removing refreshParsedUserAgents function. This could be done in a plugin maybe. --- plugins/DevicesDetection/Controller.php | 27 ------------------------- 1 file changed, 27 deletions(-) diff --git a/plugins/DevicesDetection/Controller.php b/plugins/DevicesDetection/Controller.php index 511e648109..c37efe555a 100644 --- a/plugins/DevicesDetection/Controller.php +++ b/plugins/DevicesDetection/Controller.php @@ -66,33 +66,6 @@ class Controller extends \Piwik\Plugin\Controller return $this->renderReport(__FUNCTION__); } - /** - * You may manually call this controller action to force re-processing of past user agents - */ - public function refreshParsedUserAgents() - { - Piwik::checkUserIsSuperUser(); - $q = "SELECT idvisit, config_debug_ua FROM " . Common::prefixTable("log_visit"); - $res = Db::fetchAll($q); - - $output = ''; - - foreach ($res as $rec) { - $UAParser = new UserAgentParserEnhanced($rec['config_debug_ua']); - $UAParser->parse(); - $output .= "Processing idvisit = " . $rec['idvisit'] . "<br/>"; - $output .= "UserAgent string: " . $rec['config_debug_ua'] . "<br/> Decoded values:"; - $uaDetails = $this->getArray($UAParser); - var_export($uaDetails); - $output .= "<hr/>"; - $this->updateVisit($rec['idvisit'], $uaDetails); - unset($UAParser); - } - $output .= "Please remember to truncate your archives !"; - - return $output; - } - private function getArray(UserAgentParserEnhanced $UAParser) { $UADetails['config_browser_name'] = $UAParser->getBrowser("short_name"); -- GitLab