From e90436c39d628b6b2d2554772fa06342311f8afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Thu, 9 Aug 2001 23:36:03 +0000 Subject: [PATCH] Fixed some others slashes bugs --- ChangeLog | 4 ++++ tbl_replace.php3 | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b17356887..0a1bbb3a5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-08-10 Loïc Chapeaux + * tbl_replace.php3, lines 76, 78, 86, 88, 137, 139, 147, 149: fixed some + others slashes bugs. + 2001-08-09 Olivier Müller * releasing 2.2.0rc4 diff --git a/tbl_replace.php3 b/tbl_replace.php3 index e1c47122b..0137f5f32 100755 --- a/tbl_replace.php3 +++ b/tbl_replace.php3 @@ -73,9 +73,9 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) { } if (!empty($$f)) { if (get_magic_quotes_gpc()) { - $val = "'" . implode(',', $$f) . "'"; + $val = "'" . str_replace('\\"', '"', implode(',', $$f)) . "'"; } else { - $val = "'" . addslashes(implode(',', $$f)) . "'"; + $val = "'" . sql_addslashes(implode(',', $$f)) . "'"; } } else { $val = "''"; @@ -83,9 +83,9 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) { break; default: if (get_magic_quotes_gpc()) { - $val = "'" . $val . "'"; + $val = "'" . str_replace('\\"', '"', $val) . "'"; } else { - $val = "'" . addslashes($val) . "'"; + $val = "'" . sql_addslashes($val) . "'"; } break; } // end switch @@ -134,9 +134,9 @@ else { } if (!empty($$f)) { if (get_magic_quotes_gpc()) { - $val = "'" . implode(',', $$f) . "'"; + $val = "'" . str_replace('\\"', '"', implode(',', $$f)) . "'"; } else { - $val = "'" . addslashes(implode(',', $$f)) . "'"; + $val = "'" . sql_addslashes(implode(',', $$f)) . "'"; } } else { $val = "''"; @@ -144,9 +144,9 @@ else { break; default: if (get_magic_quotes_gpc()) { - $val = "'" . $val . "'"; + $val = "'" . str_replace('\\"', '"', $val) . "'"; } else { - $val = "'" . addslashes($val) . "'"; + $val = "'" . sql_addslashes($val) . "'"; } break; } // end switch