1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Fixed tagcloud was not respecting news visibility class and start/end times.

This commit is contained in:
Cameron
2019-04-09 18:46:59 -07:00
parent da0bc6dcb9
commit 2488b5757c

View File

@@ -44,9 +44,11 @@ class tagcloud_menu
{
return $text;
}
$nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'";
if($result = $sql->retrieve('news','news_id,news_meta_keywords', "news_meta_keywords !='' ", true))
if($result = $sql->retrieve('news','news_id,news_meta_keywords', "news_meta_keywords !='' AND news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (news_class REGEXP ".$nobody_regexp.")
AND news_start < ".time()." AND (news_end=0 || news_end>".time().")", true))
{
foreach($result as $row)
{