Code Duplication    Length = 6-6 lines in 2 locations

ratelink.php 2 locations

@@ 67-72 (lines=6) @@
64
    // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post)
65
    if ($ratinguser != 0) {
66
        $result=$xoopsDB->query('SELECT submitter FROM ' . $xoopsDB->prefix('mylinks_links') . " WHERE lid={$lid}");
67
        while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
68
            if ($ratinguserDB == $ratinguser) {
69
                redirect_header('index.php', 4, _MD_MYLINKS_CANTVOTEOWN);
70
                exit();
71
            }
72
        }
73
74
        // Check if REG user is trying to vote twice.
75
        $result=$xoopsDB->query('SELECT ratinguser FROM ' . $xoopsDB->prefix('mylinks_votedata') . " WHERE lid={$lid}");
@@ 76-81 (lines=6) @@
73
74
        // Check if REG user is trying to vote twice.
75
        $result=$xoopsDB->query('SELECT ratinguser FROM ' . $xoopsDB->prefix('mylinks_votedata') . " WHERE lid={$lid}");
76
        while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) {
77
            if ($ratinguserDB == $ratinguser) {
78
                redirect_header('index.php', 4, _MD_MYLINKS_VOTEONCE2);
79
                exit();
80
            }
81
        }
82
83
    } else {
84