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']);
@@ 240-246 (lines=7) @@
237
    $GLOBALS['xoopsOption']['template_main'] = 'news_by_topic.tpl';
238
    include_once XOOPS_ROOT_PATH . '/header.php';
239
    $xoopsTpl->assign('columnwidth', (int)(1 / $column_count * 100));
240
    if ($xoopsModuleConfig['ratenews']) {
241
        $xoopsTpl->assign('rates', true);
242
        $xoopsTpl->assign('lang_ratingc', _NW_RATINGC);
243
        $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS);
244
    } else {
245
        $xoopsTpl->assign('rates', false);
246
    }
247
248
    $xt            = new NewsTopic();
249
    $alltopics     = $xt->getTopicsList(true, $xoopsModuleConfig['restrictindex']);