Skip to content

Commit

Permalink
Fix cognitive complexity warning in news_shortcodes::sc_newsnavlink()
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Nov 30, 2020
1 parent ef06f38 commit c0db790
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions e107_core/shortcodes/batch/news_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ function sc_trackback($parm=null)
*/
function sc_newsnavlink($parm=null) //TODO add more options.
{

$url = e107::getUrl()->create('news/list/items'); // default for now.

if(varset($parm['list']) == 'all') // A list of all items - usually headings and thumbnails
{
$url = e107::getUrl()->create('news/list/all');
Expand All @@ -215,12 +216,7 @@ function sc_newsnavlink($parm=null) //TODO add more options.
{
$url = e107::getUrl()->create('news/list/category', $this->news_item);
}
else
{
$url = e107::getUrl()->create('news/list/items'); // default for now.
}



$caption = vartrue($parm['text'],LAN_BACK);

$text = '<ul class="pager hidden-print">
Expand Down

0 comments on commit c0db790

Please sign in to comment.