Fixed a bug where a number was artificially added to an image uploaded to the image manager.

This commit is contained in:
JT Smith 2002-06-11 00:10:39 +00:00
parent 48eb459d6f
commit 5119302d8b

View file

@ -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 "") {