Code Duplication    Length = 5-5 lines in 2 locations

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);

votepolls.php 1 location

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