phpvms / phpvms_v2

Virtual Airline Management (not maintained)
http://www.phpvms.net
BSD 3-Clause "New" or "Revised" License
41 stars 46 forks source link

Invalid Code on UserGroups.class.php #120

Open Oxymoron290 opened 10 years ago

Oxymoron290 commented 10 years ago

Lines 89 through 104 Function: AddGroup($groupname, $type)

Error: The field groupstype does not exist in the table TABLE-PREFIX_groups

        public static function AddGroup($groupname, $type)
        {
                $groupname = DB::escape($groupname);

                if($type != 'a' || $type != 'd')
                        $type = 'd';

                $query = "INSERT INTO " . TABLE_PREFIX . "groups (name, groupstype) VALUES ('$groupname', '$type')";

                $res = DB::query($sql);

                if(DB::errno() != 0)
                        return false;

                return true;
        }

Suggested resolution: Remove function Alternate solution: Remove class

Oxymoron290 commented 10 years ago

CLEAR! images