From 5fd01ea5b9b76998db5af1ef78392e7633b6d413 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Thu, 3 Nov 2005 12:22:08 +0000 Subject: [PATCH] use $GLOBALS as this scripts can be included from inside a function --- ChangeLog | 4 ++- footer.inc.php | 53 ++++++++++++++++++++----------------- libraries/dbg/profiling.php | 11 +++++--- libraries/dbg/setup.php | 11 +++++--- 4 files changed, 47 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2dedb4a07..3691e1f50 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,9 +9,11 @@ $Source$ * libraries/common.lib.php: Incorrect message for validate links (bug #1346608). -2005-11-02 Sebastian Mendel +2005-11-03 Sebastian Mendel * themes/dakrblue_orange/theme_right.css.php, css/phpmyadmin.css.php: fixed different font sizes + * footer.inc.php, libraries/dbg/*: + use $GLOBALS as this scripts can be included from inside a function 2005-11-02 Michal Čihař * config.default.php: This is not a configuration file. diff --git a/footer.inc.php b/footer.inc.php index 7f44259b5..e62256fda 100644 --- a/footer.inc.php +++ b/footer.inc.php @@ -5,6 +5,9 @@ /** * WARNING: This script has to be included at the very end of your code because * it will stop the script execution! + * + * always use $GLOBALS, as this script is also included by functions + * */ require_once('./libraries/relation.lib.php'); // for PMA_setHistory() @@ -14,46 +17,46 @@ require_once('./libraries/relation.lib.php'); // for PMA_setHistory() */ // If query window is wanted and open, update with latest selected db/table. -if ( $cfg['QueryFrame'] && $cfg['QueryFrameJS'] ) { +if ( $GLOBALS['cfg']['QueryFrame'] && $GLOBALS['cfg']['QueryFrameJS'] ) { ?>