Code Duplication    Length = 7-7 lines in 2 locations

class/db.php 1 location

@@ 296-302 (lines=7) @@
293
     * @param mixed  $avatar
294
     * @return void
295
     */
296
    public function SetAdmins($userID, $username, $realname, $avatar)
297
    {
298
        global $xoopsDB, $xoopsUser;
299
        $ip     = $_SERVER['REMOTE_ADDR'];
300
        $sql    = 'INSERT INTO ' . $xoopsDB->prefix('smallworld_admin') . ' (id,userid,username, realname,userimage,ip,complaint,inspect_start, ' . "inspect_stop) VALUES ('', '" . $userID . "', '" . $username . "','" . $realname . "', '" . $avatar . "','" . $ip . "','0','0','0')";
301
        $result = $xoopsDB->queryF($sql);
302
    }
303
304
    /**
305
     * EditAdmins function

class/SmallWorldDB.php 1 location

@@ 299-305 (lines=7) @@
296
     * @param mixed  $avatar
297
     * @return void
298
     */
299
    public function SetAdmins($userID, $username, $realname, $avatar)
300
    {
301
        global $xoopsDB, $xoopsUser;
302
        $ip     = $_SERVER['REMOTE_ADDR'];
303
        $sql    = 'INSERT INTO ' . $xoopsDB->prefix('smallworld_admin') . ' (userid,username, realname,userimage,ip,complaint,inspect_start, ' . "inspect_stop) VALUES ('" . $userID . "', '" . $username . "','" . $realname . "', '" . $avatar . "','" . $ip . "','0','0','0')";
304
        $result = $xoopsDB->queryF($sql);
305
    }
306
307
    /**
308
     * EditAdmins function