1
There is a logic error in public-download.php when you have chosen to use digital watermarks.
When a user uploads a low resolution photo, extgallery will store 3 versions of the image:
1. thumb size.
2. medium size.
3. original.
For higher resolution photos, there will also be a large size version.
If you are using digital watermarks the watermark will be applied to the thumb size, the medium size and the large size images but not the original image.
The relevant statements are:
if($photo->getVar('photo_havelarge')) {
if($permHandler->isAllowed($xoopsUser, 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") {
$photoName = "original/".$photo->getVar('photo_orig_name');
} else {
$photoName = "large/large_".$photo->getVar('photo_name');
}
} else {
$photoName = "medium/".$photo->getVar('photo_name');
}
This means that the original image will only be downloaded if we have a large size version otherwise the user will get the medium size version. If the medium size version does not have a digital watermark, the user will not notice the difference but if we are using digital watermarks then the user will get an “original” with a watermark.
My suggested changes are:
if($permHandler->isAllowed($xoopsUser, 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") {
$photoName = "original/".$photo->getVar('photo_orig_name');
} else {
if($photo->getVar('photo_havelarge')) {
$photoName = "large/large_".$photo->getVar('photo_name');
} else {
$photoName = "medium/".$photo->getVar('photo_name');
}
}
Regards, Tom O’Dea
Regards, Tom O'Dea
Melbourne, Australia