66 if(isset(self::$instance[$a_sid][$a_cid]))
68 return self::$instance[$a_sid][$a_cid];
87 $this->own_id = $a_id;
97 $this->cname = $a_name;
107 $this->mids = $a_mids;
124 if(!$this->entryExists)
129 $query =
'UPDATE ecs_community '.
130 'SET own_id = '.$ilDB->quote($this->
getOwnId(),
'integer').
', '.
132 'mids = '.$ilDB->quote(serialize($this->
getMids()),
'text').
' '.
133 'WHERE sid = '.$ilDB->quote($this->
getServerId(),
'integer').
' '.
135 $ilDB->manipulate(
$query);
149 $query =
'INSERT INTO ecs_community (sid,cid,own_id,cname,mids) '.
153 $ilDB->quote($this->
getOwnId(),
'integer').
', '.
155 $ilDB->quote(serialize($this->
getMids()),
'text').
' '.
157 $ilDB->manipulate(
$query);
170 $this->entryExists =
false;
172 $query =
'SELECT * FROM ecs_community '.
173 'WHERE sid = '.$ilDB->quote($this->
getServerId(),
'integer').
' '.
178 $this->entryExists =
true;