Code Duplication    Length = 3-3 lines in 3 locations

blocks/news_top.php 3 locations

@@ 223-225 (lines=3) @@
220
            // Added 16 february 2007 *****************************************
221
            $story_user = null;
222
            $story_user = new XoopsUser($tmpstory->uid());
223
            if (is_object($story_user)) {
224
                $spotlight['avatar'] = XOOPS_UPLOAD_URL . '/' . $story_user->getVar('user_avatar');
225
            }
226
            // ****************************************************************
227
            $spotlight['id']     = $tmpstory->storyid();
228
            $spotlight['date']   = formatTimestamp($tmpstory->published(), $dateformat);
@@ 453-455 (lines=3) @@
450
                    // Added 16 february 2007 *****************************************
451
                    $story_user = null;
452
                    $story_user = new XoopsUser($story->uid());
453
                    if (is_object($story_user)) {
454
                        $spotlight['avatar'] = XOOPS_UPLOAD_URL . '/' . $story_user->getVar('user_avatar');
455
                    }
456
                    // ****************************************************************
457
                    $spotlight['text']        = $story->hometext();
458
                    $spotlight['id']          = $story->storyid();
@@ 556-558 (lines=3) @@
553
                // Added 16 february 2007 *****************************************
554
                $story_user = null;
555
                $story_user = new XoopsUser($spotlightArticle->uid());
556
                if (is_object($story_user)) {
557
                    $spotlight['avatar'] = XOOPS_UPLOAD_URL . '/' . $story_user->getVar('user_avatar');
558
                }
559
                // ****************************************************************
560
                $spotlight['topicid']     = $spotlightArticle->topicid();
561
                $spotlight['topic_title'] = $spotlightArticle->topic_title();