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

Fixes #3220 When the core is not dispatching the request...

Fixes #3220 When the core is not dispatching the request (PIWIK_ENABLE_DISPATCH is not set, or set to false), then getPiwikUrl will not update the value in the DB.
Thanks for the report & again sorry for such long delay to fix it!
parent f0e2cbc3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -169,10 +169,13 @@ class SettingsPiwik ...@@ -169,10 +169,13 @@ class SettingsPiwik
$key = 'piwikUrl'; $key = 'piwikUrl';
$url = Option::get($key); $url = Option::get($key);
$isPiwikCoreDispatching = defined('PIWIK_ENABLE_DISPATCH') && !PIWIK_ENABLE_DISPATCH;
if (Common::isPhpCliMode() if (Common::isPhpCliMode()
// in case archive.php is triggered with domain localhost // in case archive.php is triggered with domain localhost
|| SettingsServer::isArchivePhpTriggered() || SettingsServer::isArchivePhpTriggered()
|| defined('PIWIK_MODE_ARCHIVE') // When someone else than core is dispatching this request then we return the URL as it is read only
|| !$isPiwikCoreDispatching
) { ) {
return $url; return $url;
} }
......
...@@ -24,9 +24,6 @@ if (!defined('PIWIK_USER_PATH')) { ...@@ -24,9 +24,6 @@ if (!defined('PIWIK_USER_PATH')) {
define('PIWIK_ENABLE_DISPATCH', false); define('PIWIK_ENABLE_DISPATCH', false);
define('PIWIK_ENABLE_ERROR_HANDLER', false); define('PIWIK_ENABLE_ERROR_HANDLER', false);
define('PIWIK_ENABLE_SESSION_START', false); define('PIWIK_ENABLE_SESSION_START', false);
if(!defined('PIWIK_MODE_ARCHIVE')) {
define('PIWIK_MODE_ARCHIVE', true);
}
require_once PIWIK_INCLUDE_PATH . "/index.php"; require_once PIWIK_INCLUDE_PATH . "/index.php";
......
<?php <?php
define('PIWIK_MODE_ARCHIVE', true);
define('PIWIK_ARCHIVE_NO_TRUNCATE', true); define('PIWIK_ARCHIVE_NO_TRUNCATE', true);
require realpath(dirname(__FILE__)) . "/includes.php"; require realpath(dirname(__FILE__)) . "/includes.php";
......
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