Fixed stripslashes() issues.

This commit is contained in:
Garvin Hicking
2003-03-05 14:04:23 +00:00
parent 637098c610
commit 0e95514c3f
5 changed files with 9 additions and 17 deletions

View File

@@ -5,6 +5,13 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-03-05 Garvin Hicking <me@supergarv.de>
* read_dump.php3, sql.php3, tbl_alter.php3,
tbl_properties_export.php3: Fixed remaining calls to stripslashes()
where not neccessary, because grab_globals already stripslashed
the data. This fixes the problem of the SQL Pretty printer showing
the data wrongly formatted.
2003-03-05 Michal Cihar <nijel@users.sourceforge.net>
* libraries/sqlparser.data.php3: TRANSACTION isn't reserved word (fixes
#697961)

View File

@@ -297,9 +297,6 @@ if ($sql_file != 'none') {
$sql_query = PMA_readFile($sql_file, $sql_file_compression);
}
if (get_magic_quotes_runtime() == 1) {
$sql_query = stripslashes($sql_query);
}
// Convert the file's charset if necessary
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding
&& isset($charset_of_file) && $charset_of_file != $charset) {

View File

@@ -559,7 +559,7 @@ else {
if (isset($disp_query) && $cfg['ShowSQL'] == TRUE) {
$tmp_sql_query = $GLOBALS['sql_query'];
$tmp_sql_limit_to_append = (isset($GLOBALS['sql_limit_to_append'])?$GLOBALS['sql_limit_to_append']:'');
$GLOBALS['sql_query'] = stripslashes($disp_query);
$GLOBALS['sql_query'] = $disp_query;
$GLOBALS['sql_limit_to_append'] = '';
PMA_showMessage($disp_message);
$GLOBALS['sql_query'] = $tmp_sql_query;

View File

@@ -25,12 +25,6 @@ $err_url = 'tbl_properties_structure.php3?' . PMA_generate_common_url($db, $tabl
if (isset($submit)) {
$field_cnt = count($field_orig);
for ($i = 0; $i < $field_cnt; $i++) {
if (get_magic_quotes_gpc()) {
$field_name[$i] = stripslashes($field_name[$i]);
$field_default[$i] = stripslashes($field_default[$i]);
$field_length[$i] = stripslashes($field_length[$i]);
}
if (PMA_MYSQL_INT_VERSION < 32306) {
PMA_checkReservedWords($field_name[$i], $err_url);
}
@@ -130,11 +124,7 @@ else {
for ($i = 0; $i < $selected_cnt; $i++) {
if (!empty($submit_mult)) {
$field = PMA_sqlAddslashes(urldecode($selected[$i]), TRUE);
}
else if (get_magic_quotes_gpc()) {
$field = PMA_sqlAddslashes(stripslashes($selected[$i]), TRUE);
}
else {
} else {
$field = PMA_sqlAddslashes($selected[$i], TRUE);
}
$local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db) . " LIKE '$field'";

View File

@@ -18,8 +18,6 @@ require('./tbl_properties_table_info.php3');
<?php
if (isset($sql_query)) {
$sql_query = stripslashes($sql_query);
// I don't want the LIMIT clause, so I use the analyzer
// to reconstruct the query with only some parts
// because the LIMIT clause may come from us (sql.php3, sql_limit_to_append