piclens includes unpublished photos

Phoca Gallery - image gallery extension
thomric2
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 06 Apr 2008, 11:54
Location: United States of America
Contact:

I unpublished some p

Post by thomric2 »

I unpublished some photos yesterday, so they did not show up in the standard phoca gallery, however they were still visible in piclens. I figured out a way to prevent this by adding a line to the WHERE clause in the SQL query that gets the list of images to be used in piclens.

In \administrator\components\com_phocagallery\models I modified function piclens in phocagalleryc.php. I added a line to the $query after the WHERE line and before the ORDER line that says:
. ' AND a.published = 1'

Ive tested this code and it works as expected, no more unpublished photos.

Enjoy!

Rick
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Great, thank you, I

Post by Jan »

Great, thank you, I will take a look at it,

Jan
If you find Phoca extensions useful, please support the project
Post Reply