PP shows unapproved and view level restricted categories

Phoca Photo - image gallery extension
Gruz
Phoca Enthusiast
Phoca Enthusiast
Posts: 61
Joined: 26 Dec 2008, 19:09
Location: Ukraine
Contact:

PP shows unapproved and view level restricted categories

Post by Gruz »

I wonder why PP uses own models instead of using PG model. But anyway.

I copied some code from PG to PP models with some changes to make it work.
Now users in PP don't see unapproved or restricted to view levels categories (e.g. guest don't see categories viewable only for Reistred users).

Here are the updated files. My changes are marked with ##my so easy to find and see what has been changed and why.
components/com_phocaphoto/models/categories.php
https://paste.opensuse.org/93780577
And
components/com_phocaphoto/models/category.php
https://paste.opensuse.org/26024623

Jan, please check and let me know.

P.S. I didn't check if PP doesn't restrict images themselves. I suspect the images are not restricted too. And this must be fixed, I believe.
Last edited by Gruz on 12 May 2016, 15:40, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PP shows unapproved and view level restricted categories

Post by Jan »

Hi, see:
https://www.phoca.cz/phocaphoto

This is one of the Phoca Photo feature. It does not care about rights, its task is save the memory and load the images as fast as possible - no ACL, no other functions which slow down the loading of the images on the site - fast and simple load the photos on the web - do not lose time for functions which are not used on 90% of websites - main task is to display the images.

Jan
If you find Phoca extensions useful, please support the project
Gruz
Phoca Enthusiast
Phoca Enthusiast
Posts: 61
Joined: 26 Dec 2008, 19:09
Location: Ukraine
Contact:

Re: PP shows unapproved and view level restricted categories

Post by Gruz »

I should read more carefully...
Post Reply