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');
110 $query =
"SELECT econtent_id,obj_id FROM ecs_export ".
111 'WHERE server_id = '.$ilDB->quote($a_server_id,
'integer');
116 $econtent_ids[
$row->econtent_id] =
$row->obj_id;
118 return $econtent_ids ? $econtent_ids :
array();
129 $query =
"SELECT obj_id FROM ecs_export ";
133 $obj_ids[] =
$row->obj_id;
135 return $obj_ids ? $obj_ids :
array();
146 $query =
"SELECT e.obj_id FROM ecs_export e".
147 " JOIN object_data o ON (e.obj_id = o.obj_id)".
148 " WHERE o.type = ".$ilDB->quote(
$a_type,
"text");
152 $obj_ids[] =
$row->obj_id;
154 return $obj_ids ? $obj_ids :
array();
167 $query =
'SELECT * FROM ecs_export '.
168 'WHERE obj_id = '.$ilDB->quote($a_obj_id,
'integer');
174 $sids[] =
$row->server_id;
189 $query =
"SELECT obj_id FROM ecs_export ".
190 'WHERE server_id = '.$ilDB->quote($a_server_id,
'integer');
194 $obj_ids[] =
$row->obj_id;
196 return $obj_ids ? $obj_ids :
array();
209 $query =
'SELECT * FROM ecs_export '.
210 'WHERE obj_id = '.$ilDB->quote($a_obj_id,
'integer').
' ';
215 $sids[] =
$row->server_id;
232 if(!is_array($a_ids)
or !count($a_ids))
236 #$query = "DELETE FROM ecs_export WHERE econtent_id IN (".implode(',',ilUtil::quoteArray($a_ids)).')'; 237 $query =
"DELETE FROM ecs_export WHERE ".$ilDB->in(
'econtent_id',$a_ids,
false,
'integer').
' '.
238 'AND server_id = '.$ilDB->quote($a_server_id,
'integer');
252 $query =
'DELETE FROM ecs_export '.
253 'WHERE server_id = '.$ilDB->quote($a_server_id,
'integer');
254 $ilDB->manipulate(
$query);
265 public static function _isRemote($a_server_id,$a_econtent_id)
269 $query =
"SELECT obj_id FROM ecs_export ".
270 "WHERE econtent_id = ".$ilDB->quote($a_econtent_id,
'integer').
" ".
271 'AND server_id = '.$ilDB->quote($a_server_id,
'integer');
289 $this->exported = $a_status;
312 $this->econtent_id = $a_id;
336 $query =
"DELETE FROM ecs_export ".
337 "WHERE obj_id = ".$this->db->quote($this->obj_id,
'integer').
" ".
338 'AND server_id = '.$ilDB->quote($this->
getServerId());
343 $query =
"INSERT INTO ecs_export (server_id,obj_id,econtent_id) ".
345 $this->db->quote($this->
getServerId(),
'integer').
', '.
346 $this->db->quote($this->obj_id,
'integer').
", ".
363 $query =
"SELECT * FROM ecs_export WHERE ".
364 "obj_id = ".$this->db->quote($this->obj_id,
'integer').
" AND ".
365 'server_id = '.$ilDB->quote($this->
getServerId(),
'integer');
369 $this->econtent_id =
$row->econtent_id;
370 $this->exported =
true;
378 $query =
'DELETE FROM ecs_export'.
379 ' WHERE server_id = '.$ilDB->quote($a_server_id,
'integer');
380 $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
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