better logic for displaying upload query
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-02-05 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_replace.php3, tbl_replace_fields.php3: do not display the
|
||||
UPDATE query if there was some binary upload in it, otherwise
|
||||
display it
|
||||
|
||||
2003-02-04 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* common.lib.php3:
|
||||
- Patch #669255 (Initial DB list for MySQL > 4.0.2), thanks to Charles
|
||||
|
@@ -69,7 +69,7 @@ if (isset($funcs)) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$submit_type = stripslashes($submit_type);
|
||||
}
|
||||
|
||||
$seen_binary = FALSE;
|
||||
|
||||
/**
|
||||
* Prepares the update of a row
|
||||
@@ -187,11 +187,10 @@ if (!$result) {
|
||||
// I don't understand this one:
|
||||
//$add_query = (strpos(' ' . $goto, 'tbl_change') ? '&disp_query=' . urlencode($sql_query) : '');
|
||||
|
||||
// if the sql_query was too long (for example because of an upload)
|
||||
// we do not append the query to the Location
|
||||
// why 100? well, tell me a better value... - lem9
|
||||
|
||||
$add_query = (strlen($sql_query) < 100 ? '&disp_query=' . urlencode($sql_query) : '');
|
||||
// if we have seen binary,
|
||||
// we do not append the query to the Location so it won't be displayed
|
||||
// on the resulting page
|
||||
$add_query = (!$seen_binary ? '&disp_query=' . urlencode($sql_query) : '');
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . $goto . '&disp_message=' . urlencode($message) . $add_query);
|
||||
}
|
||||
exit();
|
||||
|
@@ -15,6 +15,7 @@
|
||||
// into MySQL and it also allow not to care about charset
|
||||
// conversion that would otherwise corrupt the data.
|
||||
$val = '0x' . bin2hex($val);
|
||||
$seen_binary = TRUE;
|
||||
} else {
|
||||
// must always add slashes for an uploaded file:
|
||||
// - do not use PMA_sqlAddslashes()
|
||||
|
Reference in New Issue
Block a user