Code Duplication    Length = 5-5 lines in 2 locations

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
}

polls.php 1 location

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