Code Duplication    Length = 7-7 lines in 2 locations

index.php 2 locations

@@ 147-153 (lines=7) @@
144
    $xt = new NewsTopic();
145
146
    $xoopsTpl->assign('columnwidth', (int)(1 / $column_count * 100));
147
    if ($xoopsModuleConfig['ratenews']) {
148
        $xoopsTpl->assign('rates', true);
149
        $xoopsTpl->assign('lang_ratingc', _NW_RATINGC);
150
        $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS);
151
    } else {
152
        $xoopsTpl->assign('rates', false);
153
    }
154
155
    if ($xoopsOption['storytopic']) {
156
        $xt->getTopic($xoopsOption['storytopic']);
@@ 247-253 (lines=7) @@
244
    $GLOBALS['xoopsOption']['template_main'] = 'news_by_topic.tpl';
245
    include_once XOOPS_ROOT_PATH . '/header.php';
246
    $xoopsTpl->assign('columnwidth', (int)(1 / $column_count * 100));
247
    if ($xoopsModuleConfig['ratenews']) {
248
        $xoopsTpl->assign('rates', true);
249
        $xoopsTpl->assign('lang_ratingc', _NW_RATINGC);
250
        $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS);
251
    } else {
252
        $xoopsTpl->assign('rates', false);
253
    }
254
255
    $xt            = new NewsTopic();
256
    $alltopics     = $xt->getTopicsList(true, $xoopsModuleConfig['restrictindex']);