[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA3-742-g439a24c

Michal Čihař nijel at users.sourceforge.net
Thu Feb 17 10:08:51 CET 2011


The branch, master has been updated
       via  439a24c6a241699225bb88bd8228d2a2fcf3dc59 (commit)
      from  ed46f250a0cbc2cea1f2f406740200bfa55a58f2 (commit)


- Log -----------------------------------------------------------------
commit 439a24c6a241699225bb88bd8228d2a2fcf3dc59
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Feb 17 10:06:41 2011 +0100

    bug #3183548 [ajax] AJAX response needs HTTP header as well.
    
    Otherwise we would use default charset from PHP insted of utf-8 we use.

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

Summary of changes:
 libraries/header.inc.php |    6 ++++++
 sql.php                  |    5 ++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/libraries/header.inc.php b/libraries/header.inc.php
index eaad449..1720e80 100644
--- a/libraries/header.inc.php
+++ b/libraries/header.inc.php
@@ -183,4 +183,10 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
          */
         $GLOBALS['is_header_sent'] = true;
 } //end if(!$GLOBALS['is_ajax_request'])
+else {
+    if (empty($GLOBALS['is_header_sent'])) {
+        require_once './libraries/header_http.inc.php';
+        $GLOBALS['is_header_sent'] = true;
+    }
+}
 ?>
diff --git a/sql.php b/sql.php
index 3a8bac4..427e72d 100644
--- a/sql.php
+++ b/sql.php
@@ -395,9 +395,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
              * HTML header.
              */
 
-            if($GLOBALS['is_ajax_request'] != true) {
-                require_once './libraries/header.inc.php';
-            }
+            require_once './libraries/header.inc.php';
             $full_err_url = (preg_match('@^(db|tbl)_@', $err_url))
                           ? $err_url . '&show_query=1&sql_query=' . urlencode($sql_query)
                           : $err_url;
@@ -768,6 +766,7 @@ else {
             }
         }
         else {
+            require_once './libraries/header.inc.php';
             //we don't need to buffer the output in PMA_showMessage here.
             //set a global variable and check against it in the function
             $GLOBALS['buffer_message'] = false;


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list