Example #1
0
 /**
  * Sets a bit in a bitfield
  *
  * @param	string	Name of the database bitfield (options, permissions etc.)
  * @param	string	Name of the bit within the bitfield (canview, canpost etc.)
  * @param	boolean	Whether the bit should be set or not
  *
  * @return	boolean
  */
 function set_bitfield($fieldname, $bitname, $onoff)
 {
     // there are 2 permissions in the the admin permission bitfield that don't actually
     // belong in this table...
     if ($fieldname == 'adminpermissions' and ($bitname == 'ismoderator' or $bitname == 'cancontrolpanel')) {
         return false;
     }
     return parent::set_bitfield($fieldname, $bitname, $onoff);
 }