mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Closes #4786 - Filter currently viewed news item out of latest news list.
This commit is contained in:
parent
d672131d86
commit
8198d3371a
@ -47,6 +47,11 @@ if(false === $cached)
|
||||
if(vartrue($parms['order'])) $treeparm['db_order'] = e107::getParser()->toDb($parms['order']);
|
||||
$parms['return'] = true;
|
||||
|
||||
if($current = e107::getRegistry('current_news_item'))
|
||||
{
|
||||
$treeparm['db_where'] = 'news_id != '.(int) $current['news_id'];
|
||||
}
|
||||
|
||||
/* Prevent data-overwrite if menu is called within news template and more news shortcodes are called after */
|
||||
$origParam = e107::getScBatch('news')->getScVar('param');
|
||||
$origData = e107::getScBatch('news')->getScVar('news_item');
|
||||
|
Loading…
x
Reference in New Issue
Block a user