Joomla version 3.3.6
Using mod_tags_similar, the helper returns items marked as published using core_state=1 but it also returns items which have expired as no check is made on the core_publish_up or core_publish_down columns
Tested by editing the article published state and publish up and down dates.
I fixed it by editing mod_tags_similar/helper.php
added at line 42
$now = JFactory::getDate()->toSql();
$nullDate = $db->getNullDate();
and then modified the published tags where query
// Only return published tags
$query->where($db->quoteName('cc.core_state') . ' = 1 ')
->where('(' .$db->quoteName('cc.core_publish_up') . '=' . $db->quote($nullDate) . ' OR ' .$db->quoteName('cc.core_publish_up') . '<=' . $db->quote($now) . ')')
->where('(' . $db->quoteName('cc.core_publish_down') . '=' . $db->quote($nullDate) . ' OR ' .$db->quoteName('cc.core_publish_down') . '>=' . $db->quote($now) . ')');
Labels |
Added:
?
|
Category | ⇒ | Tags |
OK I went ahead and created the PR #5606
Please test
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-03 21:22:59 |
Closed_By | ⇒ | brianteeman |
Closed_Date | 2015-01-03 21:22:59 | ⇒ | 2015-01-03 21:23:00 |
Can you make a PR?