Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00036 require_once "class.ilContainerGUI.php";
00037
00038 class ilObjRecoveryFolderGUI extends ilContainerGUI
00039 {
00044 function ilObjRecoveryFolderGUI($a_data,$a_id,$a_call_by_reference)
00045 {
00046 $this->type = "recf";
00047 $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
00048 }
00049
00054 function saveObject()
00055 {
00056 global $rbacadmin;
00057
00058
00059 $newObj = parent::saveObject();
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 sendInfo($this->lng->txt("object_added"),true);
00071 exit();
00072 }
00073
00074 function removeFromSystemObject()
00075 {
00076 global $rbacsystem;
00077
00078
00079 if (!isset($_POST["id"]))
00080 {
00081 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
00082 }
00083
00084 $this->object->notify("removeFromSystem", $_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$_POST["trash_id"]);
00085
00086
00087 foreach ($_POST["id"] as $id)
00088 {
00089
00090 $node_data = $this->tree->getNodeData($id);
00091 $subtree_nodes = $this->tree->getSubTree($node_data);
00092
00093
00094 $checked[] = $id;
00095
00096
00097 $this->removeDeletedNodes($id,$checked);
00098
00099 foreach ($subtree_nodes as $node)
00100 {
00101 $node_obj =& $this->ilias->obj_factory->getInstanceByRefId($node["ref_id"]);
00102
00103
00104
00105
00106
00107 if ($node_obj->getType() != "fold")
00108 {
00109 $node_obj->delete();
00110 }
00111 }
00112
00113
00114 $this->tree->deleteTree($node_data);
00115 }
00116
00117 sendInfo($this->lng->txt("msg_removed"),true);
00118
00119 $this->ctrl->redirect($this, "view");
00120 }
00121
00122 function &executeCommand()
00123 {
00124 $next_class = $this->ctrl->getNextClass($this);
00125 $cmd = $this->ctrl->getCmd();
00126 $this->prepareOutput();
00127
00128 switch($next_class)
00129 {
00130 case 'ilpermissiongui':
00131 include_once("./classes/class.ilPermissionGUI.php");
00132 $perm_gui =& new ilPermissionGUI($this);
00133 $ret =& $this->ctrl->forwardCommand($perm_gui);
00134 break;
00135
00136 default:
00137 if(!$cmd)
00138 {
00139 $cmd = "view";
00140 }
00141 $cmd .= "Object";
00142 $this->$cmd();
00143
00144 break;
00145 }
00146 return true;
00147 }
00148
00149
00150 function showPossibleSubObjects()
00151 {
00152 $this->sub_objects = "";
00153 }
00154 }
00155 ?>