From f1f7fcdabd11723d183879da11f9e7118d80f378 Mon Sep 17 00:00:00 2001 From: Cameron <e107inc@gmail.com> Date: Sun, 17 Dec 2017 17:01:02 -0800 Subject: [PATCH] Fix for news-archive "number of items" limitation --- e107_plugins/news/news_archive_menu.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/e107_plugins/news/news_archive_menu.php b/e107_plugins/news/news_archive_menu.php index 69e8e1660..4af0e24c7 100644 --- a/e107_plugins/news/news_archive_menu.php +++ b/e107_plugins/news/news_archive_menu.php @@ -12,7 +12,9 @@ $nw = e107::getObject('e_news_tree'); $tp = e107::getParser(); -$tmp = $nw->loadJoinActive()->toArray(); +$nparm = array('db_limit' => 350 ); + +$tmp = $nw->loadJoinActive(0, false, $nparm)->toArray(); $monthLabels = e107::getDate()->terms(); @@ -21,10 +23,16 @@ foreach($tmp as $id => $val) { $d = date('Y-n',$val['news_datestamp']); list($year,$month) = explode('-',$d); + unset($val['news_body']); $arr[$year][$month][] = $val; + + // e107::getDebug()->log($val); } + + + $text = "<ul class='news-archive-menu'>"; foreach($arr as $year=>$val) @@ -49,7 +57,7 @@ foreach($arr as $year=>$val) { //$displayMonth = ($mCount === 1) ? 'display:block': 'display:none'; - $idm = "news-archive-".$month; + $idm = "news-archive-".$year.'-'.$month; $text .= "<li>"; $text .= "<a class='e-expandit' href='#".$idm."'>".$monthLabels[$month];