You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The download ZIP-button does not show for guests after (or course) enabling the corresponding setting in the config-file.
In functions.inc.php on line 110 (of the current version of Piwigo), it reads:
if (is_a_guest() and !conf_get_param('batch_download_guest_allowed', false)) return false;
So, it checks if the user is a guest and if the setting batch_download_guest_allowed is not false (ie. it is true) and then it returns 'false'. So if you are a guest and guest downloads are not disallowed (ie. they are allowed) you get 'false' resulting in NO download button.
It should be: if (is_a_guest() and !conf_get_param('batch_download_guest_allowed', false)) return true;
After changing it this way, the download ZIP-button shows fine for guests.
I am sorry, I have no idea how Github works with pull requests et cetera so I don't really know how to get this as a pull request. I will try though :-) Perhaps I'll figure it out.
The text was updated successfully, but these errors were encountered:
rvdv01
changed the title
Downloads for guests
Downloads for guests (with fix included but I don't know how pull requests etc. work...)
Mar 1, 2024
The download ZIP-button does not show for guests after (or course) enabling the corresponding setting in the config-file.
In functions.inc.php on line 110 (of the current version of Piwigo), it reads:
if (is_a_guest() and !conf_get_param('batch_download_guest_allowed', false)) return false;
So, it checks if the user is a guest and if the setting batch_download_guest_allowed is not false (ie. it is true) and then it returns 'false'. So if you are a guest and guest downloads are not disallowed (ie. they are allowed) you get 'false' resulting in NO download button.
It should be:
if (is_a_guest() and !conf_get_param('batch_download_guest_allowed', false)) return true;
After changing it this way, the download ZIP-button shows fine for guests.
I am sorry, I have no idea how Github works with pull requests et cetera so I don't really know how to get this as a pull request. I will try though :-) Perhaps I'll figure it out.
The text was updated successfully, but these errors were encountered: