4 require_once
"./Services/Object/classes/class.ilObject2GUI.php";
5 require_once
"./Modules/File/classes/class.ilObjFile.php";
6 require_once
"./Modules/File/classes/class.ilObjFileAccess.php";
37 $next_class = $this->ctrl->getNextClass($this);
38 $cmd = $this->ctrl->getCmd();
40 if($this->id_type == self::WORKSPACE_NODE_ID)
42 include_once
"Services/Form/classes/class.ilFileInputGUI.php";
49 if(IS_PAYMENT_ENABLED)
51 include_once
'./Services/Payment/classes/class.ilPaymentObject.php';
52 if(ANONYMOUS_USER_ID == $ilUser->getId() && isset(
$_GET[
'transaction']))
54 $transaction =
$_GET[
'transaction'];
55 include_once
'./Services/Payment/classes/class.ilPaymentBookings.php';
60 ?
$_GET[
'purchasetype'] : NULL) ))
63 $this->tpl->getStandardTemplate();
65 include_once
'./Services/Payment/classes/class.ilShopPurchaseGUI.php';
67 $ret = $this->ctrl->forwardCommand($pp);
71 else if($this->id_type == self::REPOSITORY_NODE_ID
74 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->node_id);
75 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"infoScreen");
76 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
79 $ilNavigationHistory->addItem($this->node_id,
88 case "ilinfoscreengui":
95 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
98 $ilTabs->activateTab(
"id_meta");
100 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
102 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
103 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
106 $md_gui->addObserver($this->
object,
'MDUpdateListener',
'Technical');
108 $this->ctrl->forwardCommand($md_gui);
112 case 'ilpermissiongui':
113 $ilTabs->activateTab(
"id_permissions");
114 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
116 $ret =& $this->ctrl->forwardCommand($perm_gui);
120 $ilTabs->activateTab(
"export");
121 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
123 $exp_gui->addFormat(
"xml");
124 $ret = $this->ctrl->forwardCommand($exp_gui);
127 case 'ilobjectcopygui':
128 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
130 $cp->setType(
'file');
131 $this->ctrl->forwardCommand($cp);
135 case "ilworkspaceaccessgui";
136 $ilTabs->activateTab(
"id_permissions");
137 include_once(
'./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
139 $this->ctrl->forwardCommand($wspacc);
142 case "ilcommonactiondispatchergui":
143 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
145 $this->ctrl->forwardCommand($gui);
150 if($this->id_type == self::WORKSPACE_NODE_ID)
157 $ilCtrl->setCmd(
"infoScreen");
159 $ilTabs->clearTargets();
179 if($this->id_type == self::WORKSPACE_NODE_ID)
181 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
184 $this->lng->loadLanguageModule(
"file");
186 $this->ctrl->redirect($this,
"cancel");
191 require_once(
"Services/FileUpload/classes/class.ilFileUploadSettings.php");
203 if($this->id_type != self::WORKSPACE_NODE_ID)
219 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
221 $single_form_gui->setMultipart(
true);
225 $in_title->
setInfo($this->lng->txt(
"if_no_title_then_filename"));
228 $single_form_gui->addItem($in_title);
232 $single_form_gui->addItem($in_descr);
237 $single_form_gui->addItem($in_file);
239 $single_form_gui->addCommandButton(
"save", $this->lng->txt($this->type.
"_add"));
240 $single_form_gui->addCommandButton(
"saveAndMeta", $this->lng->txt(
"file_add_and_metadata"));
241 $single_form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
243 $single_form_gui->setTableWidth(
"600px");
245 $single_form_gui->setTitle($this->lng->txt($this->type.
"_new"));
246 $single_form_gui->setTitleIcon(
ilUtil::getImagePath(
'icon_file.svg'), $this->lng->txt(
'obj_file'));
248 $this->ctrl->setParameter($this,
"new_type",
"file");
250 $single_form_gui->setFormAction($this->ctrl->getFormAction($this,
"save"));
252 return $single_form_gui;
266 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
271 if ($single_form_gui->checkInput())
273 $title = $single_form_gui->getInput(
"title");
274 $description = $single_form_gui->getInput(
"description");
275 $upload_file = $single_form_gui->getInput(
"upload_file");
277 if (trim($title) ==
"")
279 $title = $upload_file[
"name"];
286 if ($titleExtension != $fileExtension && strlen($fileExtension) > 0)
288 $title .=
'.'.$fileExtension;
294 include_once(
"./Modules/File/classes/class.ilObjFile.php");
296 $fileObj->setTitle($title);
297 $fileObj->setDescription($description);
298 $fileObj->setFileName($upload_file[
"name"]);
300 include_once(
"./Services/Utilities/classes/class.ilMimeTypeUtil.php");
302 "", $upload_file[
"name"], $upload_file[
"type"]));
303 $fileObj->setFileSize($upload_file[
"size"]);
304 $this->object_id = $fileObj->create();
309 $fileObj->createDirectory();
310 $fileObj->getUploadFile($upload_file[
"tmp_name"],
311 $upload_file[
"name"]);
316 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
322 if ($this->ctrl->getCmd() ==
"saveAndMeta")
324 $this->ctrl->setParameter($this,
"new_type",
"");
325 $target = $this->ctrl->getLinkTargetByClass(array(
"ilobjfilegui",
"ilmdeditorgui"),
"listSection",
"",
false,
false);
330 $this->ctrl->returnToParent($this);
335 $single_form_gui->setValuesByPost();
336 $this->tpl->setContent($single_form_gui->getHTML());
357 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
359 $zip_form_gui->setMultipart(
true);
364 $in_file->setSuffixes(array(
"zip"));
365 $zip_form_gui->addItem($in_file);
368 $in_str =
new ilCheckboxInputGUI($this->lng->txt(
"take_over_structure"),
"adopt_structure");
369 $in_str->
setInfo($this->lng->txt(
"take_over_structure_info"));
370 $zip_form_gui->addItem($in_str);
372 $zip_form_gui->addCommandButton(
"saveUnzip", $this->lng->txt($this->type.
"_add"));
373 $zip_form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
375 $zip_form_gui->setTableWidth(
"600px");
377 $zip_form_gui->setTitle($this->lng->txt(
"header_zip"));
378 $zip_form_gui->setTitleIcon(
ilUtil::getImagePath(
'icon_file.svg'), $this->lng->txt(
'obj_file'));
380 $this->ctrl->setParameter($this,
"new_type",
"file");
382 $zip_form_gui->setFormAction($this->ctrl->getFormAction($this,
"saveUnzip"));
384 return $zip_form_gui;
398 if ($zip_form_gui->checkInput())
400 $zip_file = $zip_form_gui->getInput(
"zip_file");
401 $adopt_structure = $zip_form_gui->getInput(
"adopt_structure");
403 include_once (
"Services/Utilities/classes/class.ilFileUtils.php");
410 if($this->id_type != self::WORKSPACE_NODE_ID)
427 $containerType =
"WorkspaceFolder";
436 $containerType =
"Category";
442 $containerType =
"Folder";
455 $zip_file[
"tmp_name"],
456 ($adopt_structure && $permission),
469 $this->ctrl->returnToParent($this);
473 $zip_form_gui->setValuesByPost();
474 $this->tpl->setContent($zip_form_gui->getHTML());
479 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
493 if(!$form->checkInput())
495 $ilTabs->activateTab(
"settings");
496 $form->setValuesByPost();
497 $this->tpl->setContent($form->getHTML());
501 $data = $form->getInput(
'file');
504 while (substr(
$data[
"name"],-1) ==
'/')
510 $title = $form->getInput(
'title');
511 if(strlen(trim($title)) == 0)
517 $title = $this->
object->checkFileExtension(
$filename,$title);
519 $this->
object->setTitle($title);
521 if (!empty(
$data[
"name"]))
523 switch($form->getInput(
'replace'))
526 $this->
object->deleteVersions();
527 $this->
object->clearDataDirectory();
528 $this->
object->replaceFile(
$data[
'tmp_name'],
$data[
'name']);
531 $this->
object->addFileVersion(
$data[
'tmp_name'],
$data[
'name']);
534 $this->
object->setFileName(
$data[
'name']);
535 include_once(
"./Services/Utilities/classes/class.ilMimeTypeUtil.php");
538 $this->
object->setFileSize(
$data[
'size']);
541 $this->
object->setDescription($form->getInput(
'description'));
542 $this->
object->setRating($form->getInput(
'rating'));
544 $this->
update = $this->
object->update();
547 if (!empty(
$data[
"name"]))
549 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
557 include_once
'Modules/File/classes/class.ilECSFileSettings.php';
559 $ecs->handleSettingsUpdate();
576 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"));
579 $ilTabs->activateTab(
"settings");
584 $val[
'title'] = $this->
object->getTitle();
585 $val[
'description'] = $this->
object->getLongDescription();
586 $val[
'rating'] = $this->
object->hasRating();
587 $form->setValuesByArray($val);
590 include_once
'Modules/File/classes/class.ilECSFileSettings.php';
592 $ecs->addSettingsToForm($form,
'file');
594 $this->tpl->setContent($form->getHTML());
605 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
607 $this->lng->loadLanguageModule(
'file');
610 $form->setFormAction($this->ctrl->getFormAction($this),
'update');
611 $form->setTitle($this->lng->txt(
'file_edit'));
612 $form->addCommandButton(
'update',$this->lng->txt(
'save'));
613 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
616 $title->
setValue($this->object->getTitle());
617 $title->setInfo($this->lng->txt(
"if_no_title_then_filename"));
618 $form->addItem($title);
620 $upload_possible =
true;
621 if($this->id_type == self::WORKSPACE_NODE_ID)
623 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
630 $file->setRequired(
false);
632 $form->addItem(
$file);
637 $replace =
new ilRadioOption($this->lng->txt(
'replace_file'),1);
638 $replace->
setInfo($this->lng->txt(
'replace_file_info'));
639 $group->addOption($replace);
642 $keep =
new ilRadioOption($this->lng->txt(
'file_new_version'),0);
643 $keep->
setInfo($this->lng->txt(
'file_new_version_info'));
644 $group->addOption($keep);
646 $file->addSubItem($group);
651 $file->setValue($this->lng->txt(
"personal_workspace_quota_exceeded_warning"));
652 $form->addItem(
$file);
658 $form->addItem($desc);
660 if($this->id_type == self::REPOSITORY_NODE_ID)
662 $this->lng->loadLanguageModule(
'rating');
664 $rate->
setInfo($this->lng->txt(
'rating_activate_rating_info'));
665 $form->addItem($rate);
675 if(ANONYMOUS_USER_ID == $ilUser->getId() && isset(
$_GET[
'transaction']) )
677 $this->
object->sendFile(
$_GET[
"hist_id"]);
683 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
687 $this->
object->getId(), $ilUser->getId());
690 $this->
object->sendFile(
$_GET[
"hist_id"]);
694 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
709 $ilTabs->activateTab(
"id_versions");
713 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
717 $versions = $this->
object->getVersions();
720 require_once(
"Modules/File/classes/class.ilFileVersionTableGUI.php");
722 $table->setMaxCount(
sizeof($versions));
723 $table->setData($versions);
725 $this->tpl->setVariable(
"ADM_CONTENT", $table->getHTML());
735 $this->ctrl->setCmd(
"showSummary");
736 $this->ctrl->setCmdClass(
"ilinfoscreengui");
745 global $ilTabs,
$ilErr, $ilToolbar;
747 $ilTabs->activateTab(
"id_info");
751 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
754 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
760 $this->lng->loadLanguageModule(
"file");
763 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
765 $button->setCaption(
"file_download");
766 $button->setPrimary(
true);
769 if ($this->id_type == self::REPOSITORY_NODE_ID)
775 $button->setUrl($this->ctrl->getLinkTarget($this,
"sendfile"));
778 $ilToolbar->addButtonInstance($button);
781 $info->enablePrivateNotes();
789 $info->enableNewsEditing(
false);
793 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
795 if ($enable_internal_rss)
797 $info->setBlockProperty(
"news",
"settings",
true);
798 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
804 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
806 $info->addSection($this->lng->txt(
"file_info"));
807 $info->addProperty($this->lng->txt(
"filename"),
808 $this->
object->getFileName());
810 $info->addProperty($this->lng->txt(
"type"),
811 $this->
object->guessFileType());
813 $info->addProperty($this->lng->txt(
"size"),
815 $info->addProperty($this->lng->txt(
"version"),
816 $this->
object->getVersion());
819 $uploader = $this->
object->getVersions();
820 $uploader = array_shift($uploader);
821 $uploader = $uploader[
"user_id"];
823 $this->lng->loadLanguageModule(
"file");
824 include_once
"Services/User/classes/class.ilUserUtil.php";
828 if ($this->id_type == self::REPOSITORY_NODE_ID && $this->
checkPermissionBool(
"read",
"sendfile"))
830 $tpl =
new ilTemplate(
"tpl.download_link.html",
true,
true,
"Modules/File");
832 $info->addProperty($this->lng->txt(
"download_link"),
$tpl->get());
835 if($this->id_type == self::WORKSPACE_NODE_ID)
841 include_once(
"./Services/Preview/classes/class.ilPreview.php");
842 if (!$this->ctrl->isAsynch() &&
846 include_once(
"./Services/Preview/classes/class.ilPreviewGUI.php");
850 switch ($this->id_type)
852 case self::WORKSPACE_NODE_ID:
853 case self::WORKSPACE_OBJECT_ID:
863 $info->addProperty($this->lng->txt(
"preview"),
$preview->getInlineHTML());
869 $this->ctrl->forwardCommand($info);
876 global $ilTabs,
$lng, $ilHelp;
878 $ilHelp->setScreenIdComponent(
"file");
880 $this->ctrl->setParameter($this,
"ref_id",$this->node_id);
884 $ilTabs->addTab(
"id_info",
885 $lng->txt(
"info_short"),
886 $this->ctrl->getLinkTargetByClass(array(
"ilobjfilegui",
"ilinfoscreengui"),
"showSummary"));
891 $ilTabs->addTab(
"settings",
893 $this->ctrl->getLinkTarget($this,
"edit"));
898 $ilTabs->addTab(
"id_versions",
899 $lng->txt(
"versions"),
900 $this->ctrl->getLinkTarget($this,
"versions"));
906 $ilTabs->addTab(
"id_meta",
907 $lng->txt(
"meta_data"),
908 $this->ctrl->getLinkTargetByClass(array(
'ilobjfilegui',
'ilmdeditorgui'),
'listSection'));
914 $ilTabs->addTab(
"export",
916 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
923 public static function _goto($a_target, $a_additional = null)
927 if($a_additional && substr($a_additional, -3) ==
"wsp")
929 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
930 $_GET[
"wsp_id"] = $a_target;
931 include(
"ilias.php");
936 if($a_additional && substr($a_additional, -8) ==
"download")
943 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
947 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
954 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
964 if (is_object($this->
object))
966 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
977 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
979 $dnd_form_gui->setMultipart(
true);
980 $dnd_form_gui->setHideLabels();
983 include_once(
"Services/Form/classes/class.ilDragDropFileInputGUI.php");
986 $dnd_input->setCommandButtonNames(
"uploadFiles",
"cancel");
987 $dnd_form_gui->addItem($dnd_input);
990 $dnd_form_gui->addCommandButton(
"uploadFiles", $this->lng->txt(
"upload_files"));
991 $dnd_form_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
993 $dnd_form_gui->setTableWidth(
"100%");
995 $dnd_form_gui->setTitle($this->lng->txt(
"upload_files_title"));
996 $dnd_form_gui->setTitleIcon(
ilUtil::getImagePath(
'icon_file.gif'), $this->lng->txt(
'obj_file'));
998 $this->ctrl->setParameter($this,
"new_type",
"file");
999 $dnd_form_gui->setFormAction($this->ctrl->getFormAction($this,
"uploadFiles"));
1001 return $dnd_form_gui;
1009 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
1011 $response =
new stdClass();
1012 $response->error = null;
1013 $response->debug = null;
1018 $after_creation_callback = (int)
$_REQUEST[
"crtcb"];
1019 if($after_creation_callback)
1021 $this->after_creation_callback_objects = array();
1027 if ($dnd_form_gui->checkInput())
1033 $response->error = $this->lng->txt(
"permission_denied");
1038 $fileresult = $this->
handleFileUpload($dnd_form_gui->getInput(
"upload_files"));
1040 $response = (object)array_merge((array)$response, (array)$fileresult);
1045 $response->error = $ex->getMessage() .
" ## " . $ex->getTraceAsString();
1050 $dnd_input = $dnd_form_gui->getItemByPostVar(
"upload_files");
1051 $response->error = $dnd_input->getAlert();
1054 if($after_creation_callback &&
1055 sizeof($this->after_creation_callback_objects))
1057 foreach($this->after_creation_callback_objects as $new_file_obj)
1061 unset($this->after_creation_callback_objects);
1065 header(
'Vary: Accept');
1066 header(
'Content-type: text/plain');
1087 $temp_name = $file_upload[
"tmp_name"];
1096 $response =
new stdClass();
1098 $response->fileSize = intval(
$size);
1099 $response->fileType = $type;
1100 $response->fileUnzipped = $extract;
1101 $response->error = null;
1107 $adopt_structure = $keep_structure;
1109 include_once (
"Services/Utilities/classes/class.ilFileUtils.php");
1116 if($this->id_type != self::WORKSPACE_NODE_ID)
1132 $containerType =
"WorkspaceFolder";
1141 $containerType =
"Category";
1147 $containerType =
"Folder";
1163 ($adopt_structure && $permission),
1171 $response->error = $e->getMessage();
1175 $response->error = $ex->getMessage();
1181 if($this->id_type != self::WORKSPACE_NODE_ID)
1185 if($parent_ref_id != $this->parent_id)
1192 $this->after_creation_callback_objects[] =
$object;
1199 if (trim($title) ==
"")
1208 if ($titleExtension != $fileExtension && strlen($fileExtension) > 0)
1210 $title .=
'.'.$fileExtension;
1216 include_once(
"./Modules/File/classes/class.ilObjFile.php");
1218 $fileObj->setTitle($title);
1219 $fileObj->setDescription($description);
1222 include_once(
"./Services/Utilities/classes/class.ilMimeTypeUtil.php");
1224 $fileObj->setFileSize(
$size);
1225 $this->object_id = $fileObj->create();
1230 if(is_array($this->after_creation_callback_objects))
1232 $this->after_creation_callback_objects[] = $fileObj;
1236 $fileObj->createDirectory();
1237 $fileObj->raiseUploadError(
false);
1238 $fileObj->getUploadFile($temp_name,
$filename);
1243 require_once(
'./Services/Tracking/classes/class.ilChangeEvent.php');
1256 global $ilTabs, $ilLocator;
1260 $version_ids = isset(
$_GET[
"hist_id"]) ? array(
$_GET[
"hist_id"]) :
$_POST[
"hist_id"];
1262 if (count($version_ids) < 1)
1265 $this->ctrl->redirect($this,
"versions");
1269 $ilTabs->activateTab(
"id_versions");
1272 $versionsToKeep = array_udiff($this->object->getVersions(), $version_ids, array($this,
"compareHistoryIds"));
1273 if (count($versionsToKeep) < 1)
1279 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1281 $conf_gui->setFormAction($this->ctrl->getFormAction($this,
"versions"));
1282 $conf_gui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteFile");
1283 $conf_gui->setConfirm($this->lng->txt(
"confirm"),
"confirmDeleteFile");
1285 $conf_gui->addItem(
"id[]", $this->ref_id, $this->object->getTitle(),
1287 $this->lng->txt(
"icon").
" ".$this->lng->txt(
"obj_".$this->object->getType()));
1289 $html = $conf_gui->getHTML();
1293 include_once(
"./Modules/File/classes/class.ilFileVersionTableGUI.php");
1296 $versions = $this->
object->getVersions($version_ids);
1299 $table->setMaxCount(
sizeof($versions));
1300 $table->setData($versions);
1302 $html = $table->getHTML();
1305 $this->tpl->setVariable(
'ADM_CONTENT', $html);
1319 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
1323 if (count(
$_POST[
"hist_id"]) > 0)
1325 $this->
object->deleteVersions(
$_POST[
"hist_id"]);
1329 $this->ctrl->setParameter($this,
"hist_id",
"");
1330 $this->ctrl->redirect($this,
"versions");
1338 $this->ctrl->redirect($this,
"versions");
1349 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
1353 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1355 $ru->deleteObjects($this->parent_id, array($this->ref_id));
1358 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->parent_id);
1359 $this->ctrl->redirectByClass(
"ilrepositorygui");
1367 $this->ctrl->redirect($this,
"versions");
1380 $v1 = (int)$v1[
"hist_entry_id"];
1381 else if (!is_int($v1))
1385 $v2 = (
int)$v2[
"hist_entry_id"];
1386 else if (!is_int($v2))
1402 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"), $this->ilErr->MESSAGE);
1407 $version_ids = isset(
$_GET[
"hist_id"]) ? array(
$_GET[
"hist_id"]) :
$_POST[
"hist_id"];
1410 if (count($version_ids) != 1)
1413 $this->ctrl->redirect($this,
"versions");
1417 $new_version = $this->
object->rollback($version_ids[0]);
1419 ilUtil::sendSuccess(sprintf($this->lng->txt(
"file_rollback_done"), $new_version[
"rollback_version"]),
true);
1420 $this->ctrl->redirect($this,
"versions");
1428 if($this->object->hasRating())
1430 $lg->enableRating(
true, null,
false,
1431 array(
"ilcommonactiondispatchergui",
"ilratinggui"));