Phoca Download Plugin : publish_down date isn't working

Phoca Download - download manager
AlainR
Phoca Member
Phoca Member
Posts: 30
Joined: 24 Jul 2018, 16:33

Phoca Download Plugin : publish_down date isn't working

Post by AlainR » 19 Apr 2021, 13:33

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: 44104
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan » 21 Apr 2021, 13:11

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 Member
Phoca Member
Posts: 30
Joined: 24 Jul 2018, 16:33

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

Post by AlainR » 17 May 2021, 00:32

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: 44104
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan » 17 May 2021, 17:37

Ok, thank you for the info.

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

Post Reply