Hi,
there seems to be a bug in the "file list" view. I created a user-module and inserted the following code using the Phoca Download Button:
{phocadownload view=filelist|id=2}
On the frontpage ALL files of the selected category are shown, no matter if they are unpublished or even unauthorized. When I set a single download-file to "unpublished" it is still shown on the frontend.
Am I doing something wrong? What do I have to do to hide unpublished files???
Thanks in advance, martin
File list shows unpublished and unauthorized files
-
- Phoca Newbie
- Posts: 3
- Joined: 09 Aug 2018, 13:32
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: File list shows unpublished and unauthorized files
Hi, yes, plugin code does not care about the rights, if you just paste the plugin to the text, this means you just want to display it. The access rights are controlled by the text/article. So if the article should be not displayed, will be not displayed, etc. 
This is done intentionally. For example, you want to display some file in article but you don't want to list it in component. So such file will be not displayed in component (set to unpublished/unauthorized) but will be displayed in article even it is not displayed in component.
Jan

This is done intentionally. For example, you want to display some file in article but you don't want to list it in component. So such file will be not displayed in component (set to unpublished/unauthorized) but will be displayed in article even it is not displayed in component.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 09 Aug 2018, 13:32
Re: File list shows unpublished and unauthorized files
Hi Jan,
thank you for bringing light into the darkness of not-understanding.
I solved this problem (for a customer of mine) by adding the following line in the /plugins/content/phocadownload/phocadownload.php
$query .= ' WHERE a.published = 1 AND a.approved = 1';
Works fine for me.
Best regards, martin
thank you for bringing light into the darkness of not-understanding.
I solved this problem (for a customer of mine) by adding the following line in the /plugins/content/phocadownload/phocadownload.php
$query .= ' WHERE a.published = 1 AND a.approved = 1';
Works fine for me.
Best regards, martin
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: File list shows unpublished and unauthorized files
Ok
If you find Phoca extensions useful, please support the project