Finish fix for #3468882 "UPDATE single row with varchar key: empty where clause"...
authorJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Tue, 28 Feb 2012 14:56:33 +0000 (15:56 +0100)
committerJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Tue, 28 Feb 2012 14:57:25 +0000 (15:57 +0100)
Same bug for the delete action...

display.php

index 773b75f520ce093c9ce425502497c131faabce8c..6e524112dd3820cb2bb2e3d085704b072077637b 100644 (file)
                        echo "<input type=\"hidden\" name=\"sortkey\" value=\"", htmlspecialchars($_REQUEST['sortkey']), "\" />\n";
                        echo "<input type=\"hidden\" name=\"sortdir\" value=\"", htmlspecialchars($_REQUEST['sortdir']), "\" />\n";
                        echo "<input type=\"hidden\" name=\"strings\" value=\"", htmlspecialchars($_REQUEST['strings']), "\" />\n";
-                       echo "<input type=\"hidden\" name=\"key\" value=\"", htmlspecialchars(serialize($_REQUEST['key'])), "\" />\n";
+                       echo "<input type=\"hidden\" name=\"key\" value=\"", htmlspecialchars(urlencode(serialize($_REQUEST['key']))), "\" />\n";
                        echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />\n";
                        echo "<input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />\n";
                        echo "</form>\n";
                }
                else {
-                       $status = $data->deleteRow($_POST['table'], unserialize($_POST['key']));
+                       $status = $data->deleteRow($_POST['table'], unserialize(urldecode($_POST['key'])));
                        if ($status == 0)
                                doBrowse($lang['strrowdeleted']);
                        elseif ($status == -2)