Skip to content
Extraits de code Groupes Projets
Valider 82f3f05e rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

i am getting closer... on Travis CI the ip is not anonymized when localtracker...

i am getting closer... on Travis CI the ip is not anonymized when localtracker is used but it does locally
parent a2f0abde
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -79,6 +79,12 @@ class CacheFile
$this->opCacheInvalidate($cacheFilePath);
}
if ('general' === $id && Common::isPhpCliMode()) {
$message = 'The path is ' . $cacheFilePath;
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
}
$ok = @include($cacheFilePath);
if ($ok && $cache_complete == true) {
......@@ -197,6 +203,9 @@ class CacheFile
*/
public function deleteAll()
{
$message = 'Delete All Tracker Cache';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message);
$self = $this;
$beforeUnlink = function ($path) use ($self) {
$self->opCacheInvalidate($path);
......
......@@ -254,7 +254,7 @@ class Tracker
}
Piwik::postEvent('Tracker.end');
$this->end();
$this->flushOutputBuffer();
......
......@@ -103,6 +103,9 @@ class Cache
*/
static public function clearCacheGeneral()
{
$message = 'Clear Cache General ';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message);
self::getInstance()->delete('general');
}
......@@ -118,9 +121,19 @@ class Cache
$cacheId = 'general';
if (($cacheContent = $cache->get($cacheId)) !== false) {
if (Common::isPhpCliMode()) {
$message = 'there is already a cache general';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
}
return $cacheContent;
}
if (Common::isPhpCliMode()) {
$message = 'recreating the cache general';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
}
Tracker::initCorePiwikInTrackerMode();
$cacheContent = array(
'isBrowserTriggerEnabled' => Rules::isBrowserTriggerEnabled(),
......
......@@ -43,6 +43,11 @@ class Piwik_LocalTracker extends PiwikTracker
$requests = array($testEnvironmentArgs);
}
$cacheContent = Cache::getCacheGeneral();
$message = 'CacheContent pre local ' . var_export($cacheContent, 1);
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
// unset cached values
Cache::$trackerCache = null;
Tracker::setForceIp(null);
......@@ -74,6 +79,10 @@ class Piwik_LocalTracker extends PiwikTracker
$oldCookie = $_COOKIE;
// parse_str(parse_url($this->requestCookie, PHP_URL_QUERY), $_COOKIE);
$cacheContent = Cache::getCacheGeneral();
$message = 'CacheContent before local ' . var_export($cacheContent, 1);
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
// do tracking and capture output
ob_start();
......
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