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:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
3
sql.php
3
sql.php
@@ -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;
|
||||||
|
Reference in New Issue
Block a user