1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 12:11:55 +02:00

Merge pull request #552 from Moc/news_class

Fixes #551
This commit is contained in:
Cameron 2014-04-08 13:32:53 -07:00
commit 0039ae1b5a

View File

@ -669,7 +669,7 @@ class e_news_tree extends e_front_tree_model
$nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'";
$time = time();
$where = ($where ? ' AND ' : '')."n.news_start < {$time} AND (n.news_end=0 || n.news_end>{$time})
$where .= ($where ? ' AND ' : '')."n.news_start < {$time} AND (n.news_end=0 || n.news_end>{$time})
AND n.news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (n.news_class REGEXP ".$nobody_regexp.")
";