From ffa02fb26d10bbe619d3c38b39eec8277813de17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 25 Aug 2009 13:16:32 +0000 Subject: [PATCH] Delay tracker activation till all our parts are ready. Otherwise it can lead to some strange effect while trying to track queries used for finding out whether tracking is enabled. --- libraries/Tracker.class.php | 2 ++ libraries/common.inc.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php index 32eb5a344..bccef8b6a 100644 --- a/libraries/Tracker.class.php +++ b/libraries/Tracker.class.php @@ -102,6 +102,7 @@ class PMA_Tracker */ static public function isActive() { + if (!defined('PHPMYADMIN_INIT_DONE')) return false; $cfgRelation = PMA_getRelationsParam(); if (!$cfgRelation['trackingwork']) return false; @@ -189,6 +190,7 @@ class PMA_Tracker */ static public function isTracked($dbname, $tablename) { + if (!defined('PHPMYADMIN_INIT_DONE')) return false; $cfgRelation = PMA_getRelationsParam(); if (!$cfgRelation['trackingwork']) return false; diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 2d90e8488..7326af70c 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -985,6 +985,9 @@ $_SESSION['PMA_Config']->set('blowfish_secret', ''); $_SESSION['PMA_Config']->set('Servers', ''); $_SESSION['PMA_Config']->set('default_server', ''); +/* Flag that we have loaded all core libraries and set up the connections */ +define('PHPMYADMIN_INIT_DONE', '42'); + if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) { /** * include subform target page