23 $this->limit_number = $a_limit;
33 $this->limit_age = $dt;
47 $this->limit_types = (
array) $a_types;
57 $this->mode = $a_mode;
67 $GLOBALS[
'ilLog']->write(__METHOD__.
': Handling delete');
70 case self::MODE_TRASH_RESTORE:
71 $GLOBALS[
'ilLog']->write(__METHOD__.
': Restore trash to recovery folder');
75 case self::MODE_TRASH_REMOVE:
76 $GLOBALS[
'ilLog']->write(__METHOD__.
': Remove selected from system.');
78 $GLOBALS[
'ilLog']->write(__METHOD__.
': Age limit: '. (
string) $this->getAgeLimit());
79 $GLOBALS[
'ilLog']->write(__METHOD__.
': Number limit: '. (
string) $this->getNumberLimit());
92 $GLOBALS[
'ilLog']->write(__METHOD__.
': Found deleted : '.print_r($deleted,TRUE));
96 foreach($deleted as $tmp_num => $deleted_info)
98 $ref_obj = $factory->getInstanceByRefId($deleted_info[
'child'], FALSE);
104 $GLOBALS[
'tree']->deleteNode($deleted_info[
'tree'],$deleted_info[
'child']);
105 $GLOBALS[
'ilLog']->write(__METHOD__.
': Object tree entry deleted');
107 if($ref_obj->getType() !=
'rolf')
109 $GLOBALS[
'rbacadmin']->revokePermission($deleted_info[
'child']);
110 $ref_obj->putInTree(RECOVERY_FOLDER_ID);
111 $ref_obj->setPermissions(RECOVERY_FOLDER_ID);
112 $GLOBALS[
'ilLog']->write(__METHOD__.
': Object moved to recovery folder');
125 foreach($deleted as $tmp_num => $deleted_info)
127 $sub_nodes = $this->
readDeleted($deleted_info[
'tree']);
129 foreach($sub_nodes as $tmp_num => $subnode_info)
131 $ref_obj = $factory->getInstanceByRefId($subnode_info[
'child'], FALSE);
163 $and_types =
'AND '.$ilDB->in(
'o.type', $this->
getTypesLimit(),FALSE,
'text').
' ';
178 $query =
'SELECT child,tree FROM tree t JOIN object_reference r ON child = r.ref_id '.
179 'JOIN object_data o on r.obj_id = o.obj_id '.
180 'WHERE tree < '.$ilDB->quote(0,
'integer').
' '.
181 'AND child = -tree ';
185 $query .=
'ORDER BY depth desc ';
195 'tree' =>
$row->tree,
196 'child' =>
$row->child
215 $query =
'SELECT child,tree FROM tree t JOIN object_reference r ON child = r.ref_id '.
216 'JOIN object_data o on r.obj_id = o.obj_id ';
218 if($tree_id === null)
220 $query .=
'WHERE tree < '.$ilDB->quote(0,
'integer').
' ';
224 $query .=
'WHERE tree = '.$ilDB->quote($tree_id,
'integer').
' ';
226 $query .=
'ORDER BY depth desc';
234 'tree' =>
$row->tree,
235 'child' =>
$row->child
readSelectedDeleted()
read deleted according to filter settings
Class ilObject Basic functions for all objects.
static _removeEntry($a_tree, $a_child, $a_db_table="tree")
STATIC METHOD Removes a single entry from a tree.
readDeleted($tree_id=null)
Read deleted objects type $ilDB.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
setAgeLimit(ilDateTime $dt)
removeSelectedFromSystem()
remove (containers) from system
static getLogger($a_component_id)
Get component logger.
restore()
Restore to recovery folder.