From 40f0926df3ff4241825f3b16657a3f03a443975c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 3 Apr 2010 07:45:54 -0400 Subject: [PATCH] Must not load the full common.inc.php in a PHP script that only generates js --- js/messages.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/messages.php b/js/messages.php index f8239f7b9..4a1936167 100644 --- a/js/messages.php +++ b/js/messages.php @@ -15,7 +15,12 @@ header('Content-Type: text/javascript; charset=UTF-8'); // file is reloaded when config changes header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT'); +// Avoid loading the full common.inc.php because this would add many +// non-js-compatible stuff like DOCTYPE +define('PMA_MINIMUM_COMMON', true); require_once './libraries/common.inc.php'; +// But this one is needed for PMA_escapeJsString() +require_once './libraries/js_escape.lib.php'; $js_messages['strFormEmpty'] = $GLOBALS['strFormEmpty']; $js_messages['strNotNumber'] = $GLOBALS['strNotNumber'];