/** * @access private */ protected function _create() { if ($this->kind == Privilege_kind_group) { $this->db->logged_query("SELECT MAX(importance) FROM {$this->app->table_names->folder_permissions}" . " WHERE folder_id = {$this->folder_id} AND kind = '" . Privilege_kind_group . "'"); if ($this->db->next_record()) { $this->importance = $this->db->f(0) + 1; } else { $this->importance = 1; } } parent::_create(); }