Code Duplication    Length = 8-8 lines in 2 locations

viewpost.php 2 locations

@@ 305-312 (lines=8) @@
302
            $thread_buttons['delete']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id');
303
            $thread_buttons['delete']['name']  = _DELETE;
304
        }
305
        if ($isAdmin
306
            || !$suspension[$post->getVar('forum_id')] && $post->checkIdentity()
307
               && $post->checkTimelimit('edit_timelimit')) {
308
            $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT);
309
            $thread_buttons['edit']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/edit.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id');
310
            $thread_buttons['edit']['name']  = _EDIT;
311
        }
312
        if (is_object($GLOBALS['xoopsUser']) && !$suspension[$post->getVar('forum_id')]) {
313
            $thread_buttons['reply']['image'] = newbbDisplayImage('p_reply', _MD_NEWBB_REPLY);
314
            $thread_buttons['reply']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/reply.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id');
315
            $thread_buttons['reply']['name']  = _MD_NEWBB_REPLY;
@@ 298-305 (lines=8) @@
295
            $suspension[$post->getVar('forum_id')] = !$moderateHandler->verifyUser(-1, '', $post->getVar('forum_id'));
296
        }
297
298
        if ($isAdmin
299
            || (!$suspension[$post->getVar('forum_id')] && $post->checkIdentity()
300
                && $post->checkTimelimit('delete_timelimit'))) {
301
            $thread_buttons['delete']['image'] = newbbDisplayImage('p_delete', _DELETE);
302
            $thread_buttons['delete']['link']  = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/delete.php?forum=' . $post->getVar('forum_id') . '&topic_id=' . $post->getVar('topic_id');
303
            $thread_buttons['delete']['name']  = _DELETE;
304
        }
305
        if ($isAdmin
306
            || !$suspension[$post->getVar('forum_id')] && $post->checkIdentity()
307
               && $post->checkTimelimit('edit_timelimit')) {
308
            $thread_buttons['edit']['image'] = newbbDisplayImage('p_edit', _EDIT);