Show error header on error to make clear that something bad has happened.
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-08-04 Michal Čihař <michal@cihar.com>
|
||||
* libraries/common.lib.php, export.php: Show error header on error to make
|
||||
clear that something bad has happened.
|
||||
|
||||
2005-08-04 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* queryframe.php: patch #1250899:
|
||||
- unified spaces between icons
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1711,6 +1711,9 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
<br />
|
||||
<div align="<?php echo $GLOBALS['cell_align_left']; ?>">
|
||||
<table border="<?php echo $cfg['Border']; ?>" cellpadding="5" cellspacing="1">
|
||||
<?php if (isset($GLOBALS['show_error_header']) && $GLOBALS['show_error_header']) { ?>
|
||||
<tr><th class="tblHeadError"><div class="errorhead"><?php echo $GLOBALS['strError']; ?></div></th></tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th<?php echo ($GLOBALS['theme'] != 'original') ? ' class="tblHeaders"' : ' bgcolor="' . $cfg['ThBgcolor'] . '"'; ?>>
|
||||
<b><?php echo $message; ?></b>
|
||||
|
Reference in New Issue
Block a user