Example #1
0
 public static function loadGroups()
 {
     global $sql;
     if (!(self::$groups = $sql->getCache('groups'))) {
         $query = $sql->query('SELECT * FROM ' . DB_PREFIX . 'groups');
         while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
             self::$groups[$row['id']] = $row;
         }
         $sql->putCacheContent('groups', self::$groups);
     }
 }