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 ...@@ -79,6 +79,12 @@ class CacheFile
$this->opCacheInvalidate($cacheFilePath); $this->opCacheInvalidate($cacheFilePath);
} }
if ('general' === $id && Common::isPhpCliMode()) {
$message = 'The path is ' . $cacheFilePath;
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
}
$ok = @include($cacheFilePath); $ok = @include($cacheFilePath);
if ($ok && $cache_complete == true) { if ($ok && $cache_complete == true) {
...@@ -197,6 +203,9 @@ class CacheFile ...@@ -197,6 +203,9 @@ class CacheFile
*/ */
public function deleteAll() public function deleteAll()
{ {
$message = 'Delete All Tracker Cache';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message);
$self = $this; $self = $this;
$beforeUnlink = function ($path) use ($self) { $beforeUnlink = function ($path) use ($self) {
$self->opCacheInvalidate($path); $self->opCacheInvalidate($path);
......
...@@ -254,7 +254,7 @@ class Tracker ...@@ -254,7 +254,7 @@ class Tracker
} }
Piwik::postEvent('Tracker.end'); Piwik::postEvent('Tracker.end');
$this->end(); $this->end();
$this->flushOutputBuffer(); $this->flushOutputBuffer();
......
...@@ -103,6 +103,9 @@ class Cache ...@@ -103,6 +103,9 @@ class Cache
*/ */
static public function clearCacheGeneral() static public function clearCacheGeneral()
{ {
$message = 'Clear Cache General ';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message);
self::getInstance()->delete('general'); self::getInstance()->delete('general');
} }
...@@ -118,9 +121,19 @@ class Cache ...@@ -118,9 +121,19 @@ class Cache
$cacheId = 'general'; $cacheId = 'general';
if (($cacheContent = $cache->get($cacheId)) !== false) { if (($cacheContent = $cache->get($cacheId)) !== false) {
if (Common::isPhpCliMode()) {
$message = 'there is already a cache general';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
}
return $cacheContent; return $cacheContent;
} }
if (Common::isPhpCliMode()) {
$message = 'recreating the cache general';
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
}
Tracker::initCorePiwikInTrackerMode(); Tracker::initCorePiwikInTrackerMode();
$cacheContent = array( $cacheContent = array(
'isBrowserTriggerEnabled' => Rules::isBrowserTriggerEnabled(), 'isBrowserTriggerEnabled' => Rules::isBrowserTriggerEnabled(),
......
...@@ -43,6 +43,11 @@ class Piwik_LocalTracker extends PiwikTracker ...@@ -43,6 +43,11 @@ class Piwik_LocalTracker extends PiwikTracker
$requests = array($testEnvironmentArgs); $requests = array($testEnvironmentArgs);
} }
$cacheContent = Cache::getCacheGeneral();
$message = 'CacheContent pre local ' . var_export($cacheContent, 1);
\Piwik\Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, false);
// unset cached values // unset cached values
Cache::$trackerCache = null; Cache::$trackerCache = null;
Tracker::setForceIp(null); Tracker::setForceIp(null);
...@@ -74,6 +79,10 @@ class Piwik_LocalTracker extends PiwikTracker ...@@ -74,6 +79,10 @@ class Piwik_LocalTracker extends PiwikTracker
$oldCookie = $_COOKIE; $oldCookie = $_COOKIE;
// parse_str(parse_url($this->requestCookie, PHP_URL_QUERY), $_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 // do tracking and capture output
ob_start(); ob_start();
......
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