From c1398b4ff1b8703da48c3024f5eefd2d35f7434a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 17 Feb 2011 13:45:58 +0100 Subject: [PATCH 1/2] PMA_mysqlDie pulls headers, no need to do it again. --- sql.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sql.php b/sql.php index 427e72dbc..0e598963e 100644 --- a/sql.php +++ b/sql.php @@ -391,11 +391,6 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { */ require './' . PMA_securePath($goto); } else { - /** - * HTML header. - */ - - 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; From 4a6adc7e29afe6fd8c4c57ab4e552a344755751d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 17 Feb 2011 14:30:44 +0100 Subject: [PATCH 2/2] Do not send html headers for ajax request in this case. --- tbl_replace.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tbl_replace.php b/tbl_replace.php index 7a60ddb66..429e27247 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -325,7 +325,9 @@ if ($is_insert && count($value_sets) > 0) { // No change -> move back to the calling script $message = PMA_Message::success(__('No change')); $active_page = $goto_include; - require_once './libraries/header.inc.php'; + if(!$GLOBALS['is_ajax_request'] == true) { + require_once './libraries/header.inc.php'; + } require './' . PMA_securePath($goto_include); exit; }