Code Duplication    Length = 7-7 lines in 2 locations

index.php 2 locations

@@ 145-151 (lines=7) @@
142
    $xt = new NewsTopic();
143
144
    $xoopsTpl->assign('columnwidth', (int)(1 / $column_count * 100));
145
    if ($xoopsModuleConfig['ratenews']) {
146
        $xoopsTpl->assign('rates', true);
147
        $xoopsTpl->assign('lang_ratingc', _NW_RATINGC);
148
        $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS);
149
    } else {
150
        $xoopsTpl->assign('rates', false);
151
    }
152
153
    if ($xoopsOption['storytopic']) {
154
        $xt->getTopic($xoopsOption['storytopic']);
@@ 236-242 (lines=7) @@
233
    $xoopsOption['template_main'] = 'news_by_topic.tpl';
234
    include_once XOOPS_ROOT_PATH . '/header.php';
235
    $xoopsTpl->assign('columnwidth', (int)(1 / $column_count * 100));
236
    if ($xoopsModuleConfig['ratenews']) {
237
        $xoopsTpl->assign('rates', true);
238
        $xoopsTpl->assign('lang_ratingc', _NW_RATINGC);
239
        $xoopsTpl->assign('lang_ratethisnews', _NW_RATETHISNEWS);
240
    } else {
241
        $xoopsTpl->assign('rates', false);
242
    }
243
244
    $xt            = new NewsTopic();
245
    $alltopics     =& $xt->getTopicsList(true, $xoopsModuleConfig['restrictindex']);