mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Fix for news-archive "number of items" limitation
This commit is contained in:
parent
707dca17a8
commit
f1f7fcdabd
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user