1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Fix cognitive complexity warning in news_shortcodes::sc_newsnavlink()

This commit is contained in:
Nick Liu
2020-11-28 12:09:21 +01:00
parent ef06f382cb
commit c0db7909ed

View File

@@ -202,6 +202,7 @@ class news_shortcodes extends e_shortcode
*/
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
{
@@ -215,11 +216,6 @@ class news_shortcodes extends e_shortcode
{
$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);