Code Duplication    Length = 5-6 lines in 3 locations

class/ForumHandler.php 1 location

@@ 323-327 (lines=5) @@
320
            // rating_img
321
            $rating = number_format($myrow['rating'] / 2, 0);
322
            // irmtfan - add alt key for rating
323
            if ($rating < 1) {
324
                $rating_img = newbbDisplayImage('blank');
325
            } else {
326
                $rating_img = newbbDisplayImage('rate' . $rating, constant('_MD_NEWBB_RATE' . $rating));
327
            }
328
            // ------------------------------------------------------
329
            // topic_page_jump
330
            $topic_page_jump      = '';

class/TopicRenderer.php 1 location

@@ 955-959 (lines=5) @@
952
            // rating_img
953
            $rating = number_format($myrow['rating'] / 2, 0);
954
            // irmtfan - add alt key for rating
955
            if ($rating < 1) {
956
                $rating_img = newbbDisplayImage('blank');
957
            } else {
958
                $rating_img = newbbDisplayImage('rate' . $rating, constant('_MD_NEWBB_RATE' . $rating));
959
            }
960
961
            // ------------------------------------------------------
962
            // topic_page_jump

viewtopic.php 1 location

@@ 668-673 (lines=6) @@
665
if (!empty($GLOBALS['xoopsModuleConfig']['rating_enabled'])) {
666
    $xoopsTpl->assign('votes', $topicObject->getVar('votes'));
667
    $rating = number_format($topicObject->getVar('rating') / 2, 0);
668
    if ($rating < 1) {
669
        $rating_img = newbbDisplayImage('blank');
670
    } else {
671
        // irmtfan - add alt key for rating
672
        $rating_img = newbbDisplayImage('rate' . $rating, constant('_MD_NEWBB_RATE' . $rating));
673
    }
674
    $xoopsTpl->assign('rating_img', $rating_img);
675
    $xoopsTpl->assign('rate1', newbbDisplayImage('rate1', _MD_NEWBB_RATE1));
676
    $xoopsTpl->assign('rate2', newbbDisplayImage('rate2', _MD_NEWBB_RATE2));