[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-1371-g40f0926

Marc Delisle lem9 at users.sourceforge.net
Sat Apr 3 13:46:05 CEST 2010


The branch, master has been updated
       via  40f0926df3ff4241825f3b16657a3f03a443975c (commit)
      from  fae8e48818084e3569e194f0f1a0bc07bbb49f70 (commit)


- Log -----------------------------------------------------------------
commit 40f0926df3ff4241825f3b16657a3f03a443975c
Author: Marc Delisle <marc at infomarc.info>
Date:   Sat Apr 3 07:45:54 2010 -0400

    Must not load the full common.inc.php in a PHP script that only generates js

-----------------------------------------------------------------------

Summary of changes:
 js/messages.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/js/messages.php b/js/messages.php
index f8239f7..4a19361 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'];


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list