54 $this->server_id = $a_server_id;
55 $this->obj_id = $a_obj_id;
76 $this->server_id = $a_server_id;
88 $query =
'SELECT * FROM ecs_export ' .
89 'WHERE obj_id = ' . $ilDB->quote($a_obj_id,
'integer');
109 $query =
"SELECT econtent_id,obj_id FROM ecs_export " .
110 'WHERE server_id = ' . $ilDB->quote($a_server_id,
'integer');
114 $econtent_ids[
$row->econtent_id] =
$row->obj_id;
116 return $econtent_ids ? $econtent_ids :
array();
127 $query =
"SELECT obj_id FROM ecs_export ";
130 $obj_ids[] =
$row->obj_id;
132 return $obj_ids ? $obj_ids :
array();
143 $query =
"SELECT e.obj_id FROM ecs_export e" .
144 " JOIN object_data o ON (e.obj_id = o.obj_id)" .
145 " WHERE o.type = " . $ilDB->quote(
$a_type,
"text");
148 $obj_ids[] =
$row->obj_id;
150 return $obj_ids ? $obj_ids :
array();
163 $query =
'SELECT * FROM ecs_export ' .
164 'WHERE obj_id = ' . $ilDB->quote($a_obj_id,
'integer');
169 $sids[] =
$row->server_id;
184 $query =
"SELECT obj_id FROM ecs_export " .
185 'WHERE server_id = ' . $ilDB->quote($a_server_id,
'integer');
188 $obj_ids[] =
$row->obj_id;
190 return $obj_ids ? $obj_ids :
array();
203 $query =
'SELECT * FROM ecs_export ' .
204 'WHERE obj_id = ' . $ilDB->quote($a_obj_id,
'integer') .
' ';
208 $sids[] =
$row->server_id;
225 if (!is_array($a_ids) or !count($a_ids)) {
228 #$query = "DELETE FROM ecs_export WHERE econtent_id IN (".implode(',',ilUtil::quoteArray($a_ids)).')'; 229 $query =
"DELETE FROM ecs_export WHERE " . $ilDB->in(
'econtent_id', $a_ids,
false,
'integer') .
' ' .
230 'AND server_id = ' . $ilDB->quote($a_server_id,
'integer');
244 $query =
'DELETE FROM ecs_export ' .
245 'WHERE server_id = ' . $ilDB->quote($a_server_id,
'integer');
246 $ilDB->manipulate(
$query);
257 public static function _isRemote($a_server_id, $a_econtent_id)
261 $query =
"SELECT obj_id FROM ecs_export " .
262 "WHERE econtent_id = " . $ilDB->quote($a_econtent_id,
'integer') .
" " .
263 'AND server_id = ' . $ilDB->quote($a_server_id,
'integer');
280 $this->exported = $a_status;
303 $this->econtent_id = $a_id;
327 $query =
"DELETE FROM ecs_export " .
328 "WHERE obj_id = " . $this->db->quote($this->obj_id,
'integer') .
" " .
329 'AND server_id = ' . $ilDB->quote($this->
getServerId());
333 $query =
"INSERT INTO ecs_export (server_id,obj_id,econtent_id) " .
335 $this->db->quote($this->
getServerId(),
'integer') .
', ' .
336 $this->db->quote($this->obj_id,
'integer') .
", " .
353 $query =
"SELECT * FROM ecs_export WHERE " .
354 "obj_id = " . $this->db->quote($this->obj_id,
'integer') .
" AND " .
355 'server_id = ' . $ilDB->quote($this->
getServerId(),
'integer');
358 $this->econtent_id =
$row->econtent_id;
359 $this->exported =
true;
367 $query =
'DELETE FROM ecs_export' .
368 ' WHERE server_id = ' . $ilDB->quote($a_server_id,
'integer');
369 $ilDB->manipulate(
$query);
setServerId($a_server_id)
Set server id.
static _getAllEContentIds($a_server_id)
get all exported econtent ids per server
static _isRemote($a_server_id, $a_econtent_id)
is remote object
Storage of ECS exported objects.
setExported($a_status)
Set exported.
static _deleteEContentIds($a_server_id, $a_ids)
Delete econtent ids for server.
getServerId()
Get server id.
static deleteByServer($a_server_id)
Delete by server id ilDB $ilDB.
__construct($a_server_id, $a_obj_id)
Constructor.
static _getExportedIDsByServer($a_server_id)
get exported ids for server
static getExportedIds()
Get exported ids ilDB $ilDB.
static getExportServerIds($a_obj_id)
lookup server ids of exported materials ilDB $ilDB
foreach($_POST as $key=> $value) $res
isExported()
check if an object is exported or not
getEContentId()
get econtent id
static lookupServerIds($a_obj_id)
Lookup server ids of exported objects ilDB $ilDB.
static _isExported($a_obj_id)
Check if object is exported.
Create styles array
The data for the language used.
static deleteByServerId($a_server_id)
static getExportedIdsByType($a_type)
Get exported ids by type ilDB $ilDB.
setEContentId($a_id)
set econtent id