Skip to content
Extraits de code Groupes Projets
Valider 50fb660c rédigé par mattab's avatar mattab
Parcourir les fichiers

Removing refreshParsedUserAgents function. This could be done in a plugin maybe.

parent b570b062
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -66,33 +66,6 @@ class Controller extends \Piwik\Plugin\Controller ...@@ -66,33 +66,6 @@ class Controller extends \Piwik\Plugin\Controller
return $this->renderReport(__FUNCTION__); 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) private function getArray(UserAgentParserEnhanced $UAParser)
{ {
$UADetails['config_browser_name'] = $UAParser->getBrowser("short_name"); $UADetails['config_browser_name'] = $UAParser->getBrowser("short_name");
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter