Code Duplication    Length = 8-8 lines in 2 locations

viewpost.php 2 locations

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