mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Fix for news-archive "number of items" limitation
This commit is contained in:
@@ -12,7 +12,9 @@
|
|||||||
$nw = e107::getObject('e_news_tree');
|
$nw = e107::getObject('e_news_tree');
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$tmp = $nw->loadJoinActive()->toArray();
|
$nparm = array('db_limit' => 350 );
|
||||||
|
|
||||||
|
$tmp = $nw->loadJoinActive(0, false, $nparm)->toArray();
|
||||||
|
|
||||||
$monthLabels = e107::getDate()->terms();
|
$monthLabels = e107::getDate()->terms();
|
||||||
|
|
||||||
@@ -21,10 +23,16 @@ foreach($tmp as $id => $val)
|
|||||||
{
|
{
|
||||||
$d = date('Y-n',$val['news_datestamp']);
|
$d = date('Y-n',$val['news_datestamp']);
|
||||||
list($year,$month) = explode('-',$d);
|
list($year,$month) = explode('-',$d);
|
||||||
|
unset($val['news_body']);
|
||||||
$arr[$year][$month][] = $val;
|
$arr[$year][$month][] = $val;
|
||||||
|
|
||||||
|
// e107::getDebug()->log($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$text = "<ul class='news-archive-menu'>";
|
$text = "<ul class='news-archive-menu'>";
|
||||||
|
|
||||||
foreach($arr as $year=>$val)
|
foreach($arr as $year=>$val)
|
||||||
@@ -49,7 +57,7 @@ foreach($arr as $year=>$val)
|
|||||||
{
|
{
|
||||||
//$displayMonth = ($mCount === 1) ? 'display:block': 'display:none';
|
//$displayMonth = ($mCount === 1) ? 'display:block': 'display:none';
|
||||||
|
|
||||||
$idm = "news-archive-".$month;
|
$idm = "news-archive-".$year.'-'.$month;
|
||||||
|
|
||||||
$text .= "<li>";
|
$text .= "<li>";
|
||||||
$text .= "<a class='e-expandit' href='#".$idm."'>".$monthLabels[$month];
|
$text .= "<a class='e-expandit' href='#".$idm."'>".$monthLabels[$month];
|
||||||
|
Reference in New Issue
Block a user