Code Duplication    Length = 3-4 lines in 4 locations

blocks/news_top.php 4 locations

@@ 214-216 (lines=3) @@
211
            }
212
            $spotlight          = array();
213
            $spotlight['title'] = $tmpstory->title();
214
            if ($options[7] !== '') {
215
                $spotlight['image'] = sprintf("<a href='%s'>%s</a>", XOOPS_URL . '/modules/news/article.php?storyid=' . $tmpstory->storyid(),
216
                                              $myts->displayTarea($options[7], $tmpstory->nohtml));
217
            }
218
            $spotlight['text'] = $tmpstory->hometext();
219
@@ 337-339 (lines=3) @@
334
                        if (strlen($title) > $options[2]) {
335
                            $title = news_truncate_tagsafe($title, $options[2] + 3);
336
                        }
337
                        if ($options[7] !== '') {
338
                            $news['image'] = sprintf("<a href='%s'>%s</a>", XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(),
339
                                                     $myts->displayTarea($options[7], $story->nohtml));
340
                        }
341
                        if ($options[3] > 0) {
342
                            $html         = $story->nohtml() == 1 ? 0 : 1;
@@ 446-448 (lines=3) @@
443
444
                if ($visible) {
445
                    $spotlight['title'] = $title;
446
                    if ($options[7] !== '') {
447
                        $spotlight['image'] = sprintf("<a href='%s'>%s</a>", XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(),
448
                                                      $myts->displayTarea($options[7], $story->nohtml));
449
                    }
450
                    // Added 16 february 2007 *****************************************
451
                    $story_user = null;
@@ 548-551 (lines=4) @@
545
            if ($block['use_spotlight'] == true) {
546
                $spotlight          = array();
547
                $spotlight['title'] = xoops_substr($spotlightArticle->title(), 0, $options[2] - 1);
548
                if ($options[7] !== '') {
549
                    $spotlight['image'] = sprintf("<a href='%s'>%s</a>",
550
                                                  XOOPS_URL . '/modules/news/article.php?storyid=' . $spotlightArticle->storyid(),
551
                                                  $myts->displayTarea($options[7], $spotlightArticle->nohtml));
552
                }
553
                // Added 16 february 2007 *****************************************
554
                $story_user = null;