mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Fix cognitive complexity warning in news_shortcodes::sc_newsnavlink()
This commit is contained in:
@@ -202,7 +202,8 @@ class news_shortcodes extends e_shortcode
|
|||||||
*/
|
*/
|
||||||
function sc_newsnavlink($parm=null) //TODO add more options.
|
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
|
if(varset($parm['list']) == 'all') // A list of all items - usually headings and thumbnails
|
||||||
{
|
{
|
||||||
$url = e107::getUrl()->create('news/list/all');
|
$url = e107::getUrl()->create('news/list/all');
|
||||||
@@ -215,12 +216,7 @@ class news_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
$url = e107::getUrl()->create('news/list/category', $this->news_item);
|
$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);
|
$caption = vartrue($parm['text'],LAN_BACK);
|
||||||
|
|
||||||
$text = '<ul class="pager hidden-print">
|
$text = '<ul class="pager hidden-print">
|
||||||
|
Reference in New Issue
Block a user