79 $this->server_id = $a_server_id;
92 if (self::$instances[$a_server_id .
'_' .
$mid]) {
93 return self::$instances[$a_server_id .
'_' .
$mid];
95 return self::$instances[$a_server_id .
'_' .
$mid] =
new self($a_server_id,
$mid);
120 $this->
export = $a_status;
130 $this->
import = $a_status;
140 if (
$a_type != self::IMPORT_UNCHANGED) {
152 $this->title = $a_title;
167 $this->cname = $a_name;
177 $this->token = $a_stat;
182 $this->export_types = $a_types;
192 $this->import_types = $a_types;
202 $this->dtoken = $a_stat;
226 $query =
'UPDATE ecs_part_settings ' .
228 'sid = ' . $ilDB->quote((
int) $this->
getServerId(),
'integer') .
', ' .
229 'mid = ' . $ilDB->quote((
int) $this->
getMid(),
'integer') .
', ' .
230 'export = ' . $ilDB->quote((
int) $this->
isExportEnabled(),
'integer') .
', ' .
231 'import = ' . $ilDB->quote((
int) $this->
isImportEnabled(),
'integer') .
', ' .
232 'import_type = ' . $ilDB->quote((
int) $this->
getImportType(),
'integer') .
', ' .
233 'title = ' . $ilDB->quote($this->
getTitle(),
'text') .
', ' .
235 'token = ' . $ilDB->quote($this->
isTokenEnabled(),
'integer') .
', ' .
237 'export_types = ' . $ilDB->quote(serialize($this->
getExportTypes()),
'text') .
', ' .
238 'import_types = ' . $ilDB->quote(serialize($this->
getImportTypes()),
'text') .
' ' .
239 'WHERE sid = ' . $ilDB->quote((
int) $this->
getServerId(),
'integer') .
' ' .
240 'AND mid = ' . $ilDB->quote((
int) $this->
getMid(),
'integer');
241 $aff = $ilDB->manipulate(
$query);
249 $query =
'INSERT INTO ecs_part_settings ' .
250 '(sid,mid,export,import,import_type,title,cname,token,dtoken,export_types, import_types) ' .
252 $ilDB->quote($this->
getServerId(),
'integer') .
', ' .
253 $ilDB->quote($this->
getMid(),
'integer') .
', ' .
256 $ilDB->quote((
int) $this->
getImportType(),
'integer') .
', ' .
257 $ilDB->quote($this->
getTitle(),
'text') .
', ' .
264 $aff = $ilDB->manipulate(
$query);
273 public function delete()
277 $query =
'DELETE FROM ecs_part_settings ' .
278 'WHERE sid = ' . $ilDB->quote($this->
getServerId(),
'integer') .
' ' .
279 'AND mid = ' . $ilDB->quote($this->
getMid(),
'integer');
280 $ilDB->manipulate(
$query);
292 $query =
'SELECT * FROM ecs_part_settings ' .
293 'WHERE sid = ' . $ilDB->quote($this->
getServerId(),
'integer') .
' ' .
294 'AND mid = ' . $ilDB->quote($this->
getMid(),
'integer');
298 $this->
exists = (
$res->numRows() ? true :
false);
319 $query =
'DELETE FROM ecs_events' .
320 ' WHERE server_id = ' . $ilDB->quote($a_server_id,
'integer');
321 $ilDB->manipulate(
$query);
enableDeprecatedToken($a_stat)
static deleteByServerId($a_server_id)
isDeprecatedTokenEnabled()
update()
Update Calls create automatically when no entry exists.
Removing first two heading rows for CSV export
foreach($_POST as $key=> $value) $res
static getInstance($a_server_id, $mid)
Get instance by server id and mid.
getServerId()
Get server id.
__construct($a_server_id, $mid)
Constructor.
Create styles array
The data for the language used.
setCommunityName($a_name)