From d9977e23ae56fb03e81d2e0bd49f6635c51d5ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Aug 2005 13:52:51 +0000 Subject: [PATCH] Show error header on error to make clear that something bad has happened. --- ChangeLog | 4 ++++ export.php | 5 +++++ libraries/common.lib.php | 3 +++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index f7b4802ae..d12397ab6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-08-04 Michal Čihař + * libraries/common.lib.php, export.php: Show error header on error to make + clear that something bad has happened. + 2005-08-04 Marc Delisle * queryframe.php: patch #1250899: - unified spaces between icons diff --git a/export.php b/export.php index fb9317906..8e20c4362 100644 --- a/export.php +++ b/export.php @@ -84,6 +84,7 @@ function PMA_exportOutputHandler($line) $write_result = @fwrite($GLOBALS['file_handle'], $dump_buffer); if (!$write_result || ($write_result != strlen($dump_buffer))) { $GLOBALS['message'] = sprintf($GLOBALS['strNoSpace'], htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; return FALSE; } } else { @@ -105,6 +106,7 @@ function PMA_exportOutputHandler($line) $write_result = @fwrite($GLOBALS['file_handle'], $line); if (!$write_result || ($write_result != strlen($line))) { $GLOBALS['message'] = sprintf($GLOBALS['strNoSpace'], htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; return FALSE; } $time_now = time(); @@ -270,12 +272,15 @@ if ($save_on_server) { unset($message); if (file_exists($save_filename) && empty($onserverover)) { $message = sprintf($strFileAlreadyExists, htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; } else { if (is_file($save_filename) && !is_writable($save_filename)) { $message = sprintf($strNoPermission, htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; } else { if (!$file_handle = @fopen($save_filename, 'w')) { $message = sprintf($strNoPermission, htmlspecialchars($save_filename)); + $GLOBALS['show_error_header'] = TRUE; } } } diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 4f26bd020..71805d448 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1711,6 +1711,9 @@ if (typeof(document.getElementById) != 'undefined'
+ + + >