View Single Post
Old November 5th, 2008, 10:36 AM   #5 (permalink)
Luciano
Moderator
Verified Customer
 
Join Date: Aug 2005
Posts: 1,231
btw while you are checking.. found something strange... its a half bug...
lets call it a bug that does not cause any errors because it does not affect anything... but... it still is wrong (could be fixed in future version)

the function process_upload is called twice in vbgallery... once in editimage.php and once in upload.php
its called:
function process_upload($thumbcreated = false, $new = true)
note the 2 parameters..
in edit image its called with process_upload(false,false)
and in upload it is called with process_upload(true)

the problem is.. the $thumbcreated = false parameter is a dummy !!!!!!
$thumbcreated is NOT used anywhere in vbgallery!!!

the function should therefore be:
function process_upload($new = true)

the call in upload.php would then be correct with
process_upload(true)

the call in editimage.php would have to be changed to:
process_upload(false)

(of course you can correct it the otherway round.. by changing the call of the function in upload.php from process_upload(true) to: process_upload(false,true) but i think the correct way would be as stated above)

it now works because the call in upload affects only the dummy variable and the new variable is default true.. I think though, it should be changed in a future release...

Luc

Last edited by Luciano; November 5th, 2008 at 10:42 AM.
Luciano is offline   Reply With Quote