From 5119302d8b2e36e588ae2ef8a0d45ef508e34320 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 11 Jun 2002 00:10:39 +0000 Subject: [PATCH] Fixed a bug where a number was artificially added to an image uploaded to the image manager. --- lib/WebGUI/Operation/Image.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Operation/Image.pm b/lib/WebGUI/Operation/Image.pm index b58f7674a..c7d345c4a 100644 --- a/lib/WebGUI/Operation/Image.pm +++ b/lib/WebGUI/Operation/Image.pm @@ -118,7 +118,8 @@ sub www_editImageSave { if ($file->getFilename) { $sqlAdd = ", filename=".quote($file->getFilename); } - while (($test) = WebGUI::SQL->quickArray("select name from images where name='$session{form}{name}'")) { + while (($test) = WebGUI::SQL->quickArray("select name from images + where name=".quote($session{form}{name})." and imageId<>$session{form}{iid}")) { if ($session{form}{name} =~ /(.*)(\d+$)/) { $session{form}{name} = $1.($2+1); } elsif ($test ne "") {