Skip to content

Commit

Permalink
Closes #4092 - check for 'order' param in news grid.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Feb 10, 2020
1 parent 734b92c commit 20b43d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions e107_handlers/news_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function render_newsitem($news, $mode = 'default', $n_restrict = '', $NEWS_TEMPL
$result = call_user_func($override_newsitem, $news, $mode, $n_restrict, $NEWS_TEMPLATE, $param);
if ($result == 'return')
{
return;
return null;
}
}

Expand Down Expand Up @@ -519,8 +519,7 @@ function render_newsgrid($parm=null)
$parms['count'] = 3;
}

$parms['order'] = 'n.news_datestamp DESC';

$parms['order'] = empty($parms['order']) ? 'n.news_datestamp DESC' : $parms['order'];

$treeparm = array();

Expand Down

0 comments on commit 20b43d4

Please sign in to comment.