* fixed a bug with headers that may be sent after output

* fixed bug #481417 - Unable to insert dumps from phpmyadmin
This commit is contained in:
Loïc Chapeaux
2001-11-16 14:08:17 +00:00
parent 81f94f9851
commit 7663bd8237
2 changed files with 28 additions and 19 deletions

View File

@@ -11,6 +11,10 @@ $Source$
libraries/common.lib.php3, lines 928-929: fixed bug #479208 - Drop a
Table -> wrong server at left frame thanks to Bjoern Koester
& Donald Saltarelli.
* db_details.php3; read_dump.php3; sql.php3; tbl_properties.php3: fixed a
bug with headers that may be sent after output.
* tbl_properties.php3: fixed bug #481417 - Unable to insert dumps from
phpmyadmin.
2001-11-15 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/tbl_dump.php3 : merged a workaround against the IE downloading

View File

@@ -28,6 +28,7 @@ $err_url = 'tbl_properties.php3'
* Ensures the database and the table exist (else move to the "parent" script)
* and diplays headers
*/
if (!isset($is_db) || !$is_db) {
// Not a valid db name -> back to the welcome page
if (!empty($db)) {
$is_db = @mysql_select_db($db);
@@ -36,6 +37,8 @@ if (empty($db) || !$is_db) {
header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit();
}
} // end if (ensures db exists)
if (!isset($is_table) || !$is_table) {
// Not a valid table name -> back to the db_details.php3
if (!empty($table)) {
$is_table = @mysql_query('SHOW TABLES LIKE \'' . sql_addslashes($table, TRUE) . '\'');
@@ -46,6 +49,8 @@ if (empty($table) || !@mysql_numrows($is_table)) {
} else if (isset($is_table)) {
mysql_free_result($is_table);
}
} // end if (ensures table exists)
// Displays headers
if (!isset($message)) {
$js_to_run = 'functions.js';
@@ -643,7 +648,7 @@ echo "\n";
<!-- Query box and bookmark support -->
<li>
<form method="post" action="read_dump.php3"
<form method="post" action="read_dump.php3" enctype="multipart/form-data"
onsubmit="return checkSqlQuery(this)">
<input type="hidden" name="is_js_confirmed" value="0" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />