bug #3183548 [ajax] AJAX response needs HTTP header as well.

Otherwise we would use default charset from PHP insted of utf-8 we use.
This commit is contained in:
Michal Čihař
2011-02-17 10:06:41 +01:00
parent ed46f250a0
commit 439a24c6a2
2 changed files with 8 additions and 3 deletions

View File

@@ -183,4 +183,10 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
*/ */
$GLOBALS['is_header_sent'] = true; $GLOBALS['is_header_sent'] = true;
} //end if(!$GLOBALS['is_ajax_request']) } //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;
}
}
?> ?>

View File

@@ -395,9 +395,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
* HTML header. * 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)) $full_err_url = (preg_match('@^(db|tbl)_@', $err_url))
? $err_url . '&show_query=1&sql_query=' . urlencode($sql_query) ? $err_url . '&show_query=1&sql_query=' . urlencode($sql_query)
: $err_url; : $err_url;
@@ -768,6 +766,7 @@ else {
} }
} }
else { else {
require_once './libraries/header.inc.php';
//we don't need to buffer the output in PMA_showMessage here. //we don't need to buffer the output in PMA_showMessage here.
//set a global variable and check against it in the function //set a global variable and check against it in the function
$GLOBALS['buffer_message'] = false; $GLOBALS['buffer_message'] = false;