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

Tracker moving last remaining parameter value not yet in Request, to the Request object

parent 283a3fa3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
* @category Piwik * @category Piwik
* @package PluginsFunctions * @package PluginsFunctions
*/ */
namespace Piwik; namespace Piwik;
use Exception; use Exception;
use Piwik\Db\Adapter; use Piwik\Db\Adapter;
use Piwik\Db\Schema; use Piwik\Db\Schema;
......
...@@ -239,6 +239,7 @@ class Request ...@@ -239,6 +239,7 @@ class Request
'idgoal' => array(-1, 'int'), 'idgoal' => array(-1, 'int'),
// other // other
'bots' => array(0, 'int'),
'dp' => array(0, 'int'), 'dp' => array(0, 'int'),
'rec' => array(false, 'int'), 'rec' => array(false, 'int'),
'new_visit' => array(0, 'int'), 'new_visit' => array(0, 'int'),
......
...@@ -138,7 +138,7 @@ class VisitExcluded ...@@ -138,7 +138,7 @@ class VisitExcluded
*/ */
protected function isNonHumanBot() protected function isNonHumanBot()
{ {
$allowBots = Common::getRequestVar('bots', false) != false; $allowBots = $this->request->getParam('bots');
return !$allowBots return !$allowBots
&& (strpos($this->userAgent, 'Googlebot') !== false // Googlebot && (strpos($this->userAgent, 'Googlebot') !== false // Googlebot
|| strpos($this->userAgent, 'Google Web Preview') !== false // Google Instant || strpos($this->userAgent, 'Google Web Preview') !== false // Google Instant
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter