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