Code Duplication    Length = 3-3 lines in 5 locations

polls.php 5 locations

@@ 254-256 (lines=3) @@
251
        // old xoopspoll or umfrage or any clone from them
252
        if ($pollModuleHandler->getVar('version') < 140) {
253
            // check security token
254
            if (!$GLOBALS['xoopsSecurity']->check()) {
255
                redirect_header(Request::getString('PHP_SELF', '', 'SERVER'), 2, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
256
            }
257
            /*
258
             * The option check should be done before submitting
259
             */
@@ 337-339 (lines=3) @@
334
    // no break
335
    case 'update':
336
        // check security token
337
        if (!$GLOBALS['xoopsSecurity']->check()) {
338
            redirect_header(Request::getString('PHP_SELF', '', 'SERVER'), 2, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
339
        }
340
        /* make sure there's at least one option */
341
        $option_text   = Request::getString('option_text', '', 'POST');
342
        $option_string = is_array($option_text) ? implode('', $option_text) : $option_text;
@@ 541-543 (lines=3) @@
538
539
    case 'savemore':
540
        // check security token
541
        if (!$GLOBALS['xoopsSecurity']->check()) {
542
            redirect_header(Request::getString('PHP_SELF', '', 'SERVER'), 2, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
543
        }
544
545
        $option_text   = Request::getString('option_text', '', 'POST');
546
        $option_string = is_array($option_text) ? implode('', $option_text) : $option_text;
@@ 591-593 (lines=3) @@
588
589
    case 'delete_ok':
590
        // check security token
591
        if (!$GLOBALS['xoopsSecurity']->check()) {
592
            redirect_header(Request::getString('PHP_SELF', '', 'SERVER'), 2, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
593
        }
594
        //try and delete the poll
595
        // new xoopspoll module
596
        if ($pollModuleHandler->getVar('version') >= 140) {
@@ 667-669 (lines=3) @@
664
665
    case 'restart_ok':
666
        // check security token
667
        if (!$GLOBALS['xoopsSecurity']->check()) {
668
            redirect_header(Request::getString('PHP_SELF', '', 'SERVER'), 2, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
669
        }
670
671
        // new xoopspoll module
672
        if ($pollModuleHandler->getVar('version') >= 140) {