Code Duplication    Length = 5-5 lines in 2 locations

polls.php 1 location

@@ 83-87 (lines=5) @@
80
        /** @var \XoopsPoll $pollObject */
81
        $pollObject = $xpPollHandler->get($poll_id); // will create poll if poll_id = 0 exist
82
        // old xoopspoll or umfrage or any clone from them
83
    } else {
84
        include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/include/constants.php');
85
        $classPoll = $topicObject->loadOldPoll();
86
        $pollObject  = new $classPoll($poll_id); // will create poll if poll_id = 0 exist
87
    }
88
} else {
89
    // irmtfan - issue with javascript:history.go(-1)
90
    redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_POLLMODULE_ERROR);

votepolls.php 1 location

@@ 61-65 (lines=5) @@
58
        /** @var \XoopsPoll $pollObject */
59
        $pollObject = $xpPollHandler->get($poll_id); // will create poll if poll_id = 0 exist
60
        // old xoopspoll or umfrage or any clone from them
61
    } else {
62
        include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModuleConfig']['poll_module'] . '/include/constants.php');
63
        $classPoll = $topicObject->loadOldPoll();
64
        $pollObject  = new $classPoll($poll_id); // will create poll if poll_id = 0 exist
65
    }
66
} else {
67
    redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_POLLMODULE_ERROR);
68
}