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.
This commit is contained in:
Michal Čihař
2009-08-25 13:16:32 +00:00
parent 87eaa7d3d4
commit ffa02fb26d
2 changed files with 5 additions and 0 deletions

View File

@@ -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;

View File

@@ -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