Fixed a bug where a number was artificially added to an image uploaded to the image manager.
This commit is contained in:
parent
48eb459d6f
commit
5119302d8b
1 changed files with 2 additions and 1 deletions
|
|
@ -118,7 +118,8 @@ sub www_editImageSave {
|
||||||
if ($file->getFilename) {
|
if ($file->getFilename) {
|
||||||
$sqlAdd = ", filename=".quote($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+$)/) {
|
if ($session{form}{name} =~ /(.*)(\d+$)/) {
|
||||||
$session{form}{name} = $1.($2+1);
|
$session{form}{name} = $1.($2+1);
|
||||||
} elsif ($test ne "") {
|
} elsif ($test ne "") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue