Phoca Download Plugin : publish_down date isn't working

Phoca Download - download manager
AlainR
Phoca Enthusiast
Phoca Enthusiast
Posts: 50
Joined: 24 Jul 2018, 16:33

Phoca Download Plugin : publish_down date isn't working

Post by AlainR »

Hello.
In the plugin, publish_down date isn't working.
So in FileList view, I modify the following code between lines 288 and 291 :

Code: Select all

							$query .= ' WHERE c.id = '.(int)$id. ' AND a.published = 1 AND `publish_down` = \'0000-00-00 00:00:00\' OR `publish_down`>now()';//a.approved = 1';
							//$query .= ' WHERE c.id = '.(int)$id . ' AND a.published = 1 AND a.approved = 1';
						} else {
							$query .= '  `publish_down` = \'0000-00-00 00:00:00\' OR `publish_down`>now()';//WHERE a.published = 1 AND a.approved = 1';
Could you possibly add it to the plugin for a future update?

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

Re: Phoca Download Plugin : publish_down date isn't working

Post by Jan »

Hi, than you very much for this info. Added to feature request list.

Thank you, Jan
If you find Phoca extensions useful, please support the project
AlainR
Phoca Enthusiast
Phoca Enthusiast
Posts: 50
Joined: 24 Jul 2018, 16:33

Re: Phoca Download Plugin : publish_down date isn't working

Post by AlainR »

Due to the issue raised in this topic (viewtopic.php?f=31&t=62443), I am correcting my proposed code here:

Code: Select all

							$query .= ' WHERE c.id = '.(int)$id. ' AND a.published = 1 AND `publish_down` = \'0000-00-00 00:00:00\' OR `publish_down`>now() AND c.id = '.(int)$id;//a.approved = 1';
							//$query .= ' WHERE c.id = '.(int)$id . ' AND a.published = 1 AND a.approved = 1';
						} else {
							$query .= '  `publish_down` = \'0000-00-00 00:00:00\' OR `publish_down`>now() AND c.id = '.(int)$id;//WHERE a.published = 1 AND a.approved = 1';
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Download Plugin : publish_down date isn't working

Post by Jan »

Ok, thank you for the info.

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