Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rvdv01 opened this issue Mar 1, 2024 · 0 comments

Comments

@rvdv01
Copy link

rvdv01 commented 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.

@rvdv01 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant