Page 1 of 1

Phoca Download Plugin : publish_down date isn't working

Posted: 19 Apr 2021, 13:33
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?

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

Posted: 21 Apr 2021, 13:11
by Jan
Hi, than you very much for this info. Added to feature request list.

Thank you, Jan

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

Posted: 17 May 2021, 00:32
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';

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

Posted: 17 May 2021, 17:37
by Jan
Ok, thank you for the info.

Jan