Piwigo / Piwigo-BatchDownloader

Allows users to download pictures sets from your Piwigo gallery in a ZIP file. Compatible with User Collections.
http://piwigo.org/ext/extension_view.php?eid=616
GNU General Public License v2.0
9 stars 12 forks source link

Downloads for guests (with fix included but I don't know how pull requests etc. work...) #55

Open rvdv01 opened 8 months ago

rvdv01 commented 8 months ago

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.