Code Duplication    Length = 6-6 lines in 2 locations

ratelisting.php 2 locations

@@ 50-55 (lines=6) @@
47
    // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post)
48
    if ($ratinguser != 0) {
49
        $result = $xoopsDB->query('select submitter from ' . $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') . " where itemid=$p_itemid");
50
        while (list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
51
            if ($ratinguserDB == $ratinguser) {
52
                redirect_header('index.php', 4, _MD_CANTVOTEOWN);
53
                exit();
54
            }
55
        }
56
57
        // Check if REG user is trying to vote twice.
58
        $result = $xoopsDB->query('select ratinguser from ' . $xoopsDB->prefix($module->getVar('dirname', 'n') . '_votedata') . " where itemid=$p_itemid");
@@ 59-64 (lines=6) @@
56
57
        // Check if REG user is trying to vote twice.
58
        $result = $xoopsDB->query('select ratinguser from ' . $xoopsDB->prefix($module->getVar('dirname', 'n') . '_votedata') . " where itemid=$p_itemid");
59
        while (list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
60
            if ($ratinguserDB == $ratinguser) {
61
                redirect_header('index.php', 4, _MD_VOTEONCE2);
62
                exit();
63
            }
64
        }
65
    } else {
66
67
        // Check if ANONYMOUS user is trying to vote more than once per day.