From 3626acdb24e493a1bfd4541aaaf6316f749cfd35 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Thu, 29 Mar 2007 07:10:15 +0000 Subject: [PATCH] improved out buffer function handling; bug #1690064 headers already sent error if OBGzip = 0 --- browse_foreigners.php | 17 ++-------- libraries/footer.inc.php | 6 ---- libraries/header.inc.php | 7 +--- libraries/header_printview.inc.php | 7 +--- libraries/ob.lib.php | 54 +++++++++--------------------- navigation.php | 8 +---- querywindow.php | 5 --- 7 files changed, 21 insertions(+), 83 deletions(-) diff --git a/browse_foreigners.php b/browse_foreigners.php index ea981d7ef..4ea4bef50 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -14,12 +14,8 @@ require_once('./libraries/common.inc.php'); PMA_checkParameters(array('db', 'table', 'field')); require_once('./libraries/ob.lib.php'); -if ($cfg['OBGzip']) { - $ob_mode = PMA_outBufferModeGet(); - if ($ob_mode) { - PMA_outBufferPre($ob_mode); - } -} +PMA_outBufferPre(); + require_once('./libraries/header_http.inc.php'); $field = urldecode($field); @@ -298,13 +294,4 @@ if (isset($controllink) && $controllink) { if (isset($userlink) && $userlink) { @PMA_DBI_close($userlink); } - - -/** - * Sends bufferized data - */ -if (isset($cfg['OBGzip']) && $cfg['OBGzip'] - && isset($ob_mode) && $ob_mode) { - PMA_outBufferPost($ob_mode); -} ?> diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php index d17cf4ab1..93e0d2a64 100644 --- a/libraries/footer.inc.php +++ b/libraries/footer.inc.php @@ -40,7 +40,6 @@ * @uses PMA_getenv() * @uses PMA_generate_common_url() * @uses PMA_DBI_close() - * @uses PMA_outBufferPost() * @uses basename() * @uses file_exists() * @version $Id$ @@ -189,11 +188,6 @@ if (! empty($GLOBALS['cfg']['DBG']['enable']) diff --git a/navigation.php b/navigation.php index cb08a9b37..8439e2158 100644 --- a/navigation.php +++ b/navigation.php @@ -52,7 +52,6 @@ require_once './libraries/common.inc.php'; * * @uses $GLOBALS['controllink'] to close it * @uses $GLOBALS['userlink'] to close it - * @uses PMA_outBufferPost() * @uses PMA_DBI_close() * @access private only to be used in navigation.php */ @@ -70,12 +69,7 @@ function PMA_exitNavigationFrame() @PMA_DBI_close($GLOBALS['userlink']); } - /** - * Sends bufferized data - */ - PMA_outBufferPost(); - - exit(); + exit; } // free the session file, for the other frames to be loaded diff --git a/querywindow.php b/querywindow.php index 95795648a..2c0e6890d 100644 --- a/querywindow.php +++ b/querywindow.php @@ -311,9 +311,4 @@ if (! empty($controllink)) { if (! empty($userlink)) { PMA_DBI_close($userlink); } - -/** - * Sends bufferized data - */ -PMA_outBufferPost(); ?>