35 protected \ILIAS\Repository\InternalGUIService
$gui;
48 protected \ILIAS\HTTP\Wrapper\WrapperFactory
$wrapper;
55 public function __construct($a_data, $a_id, $a_call_by_reference)
59 $this->
tabs = $DIC->tabs();
60 $this->
access = $DIC->access();
61 $this->
ctrl = $DIC->ctrl();
62 $this->rbacsystem = $DIC->rbac()->system();
63 $this->
user = $DIC->user();
64 $this->obj_definition = $DIC[
"objDefinition"];
66 $this->error = $DIC[
"ilErr"];
67 $this->db = $DIC->database();
68 $this->style_definition = $DIC[
"styleDefinition"];
69 $this->
lng = $DIC->language();
70 $this->tpl = $DIC[
"tpl"];
71 $this->
help = $DIC[
"ilHelp"];
72 $this->
toolbar = $DIC->toolbar();
73 $this->client_ini = $DIC[
"ilClientIniFile"];
75 $this->bench = $DIC[
"ilBench"];
76 $this->wrapper = $DIC->http()->wrapper();
80 $this->
lng->loadLanguageModule(
"administration");
81 $this->
lng->loadLanguageModule(
"adm");
82 $this->content_style_domain = $DIC->contentStyle()
84 ->styleForRefId($this->
object->getRefId());
85 $this->gui = $DIC->repository()->internal()->gui();
92 $next_class = $this->
ctrl->getNextClass($this);
95 switch ($next_class) {
96 case 'ilpermissiongui':
98 $this->
ctrl->forwardCommand($perm_gui);
101 case "ilobjectownershipmanagementgui":
104 $this->
ctrl->forwardCommand($gui);
107 case "ilcronmanagergui":
108 $ilTabs->activateTab(
"cron_jobs");
110 $this->
ctrl->forwardCommand($gui);
115 $cmd = $this->
ctrl->getCmd(
"view");
133 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
137 $this->showServerInfoObject();
155 $this->
lng->txt(
"system_check"),
156 $ilCtrl->getLinkTarget($this,
"check")
160 $this->
lng->txt(
"system_check_no_owner"),
161 $ilCtrl->getLinkTargetByClass(
"ilObjectOwnershipManagementGUI")
164 $ilTabs->setSubTabActive($a_activate);
165 $ilTabs->setTabActive(
"system_check");
183 if (!$rbacsystem->
checkAccess(
"visible,read", $this->object->getRefId())) {
184 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
187 if ($_POST[
'count_limit'] !== null || $_POST[
'age_limit'] !== null || $_POST[
'type_limit'] !== null) {
189 'systemcheck_count_limit',
190 (is_numeric($_POST[
'count_limit']) && $_POST[
'count_limit'] > 0) ? $_POST[
'count_limit'] :
'' 193 'systemcheck_age_limit',
194 (is_numeric($_POST[
'age_limit']) && $_POST[
'age_limit'] > 0) ? $_POST[
'age_limit'] :
'' 196 $ilUser->writePref(
'systemcheck_type_limit', trim($_POST[
'type_limit']));
199 if ($_POST[
"mode"]) {
204 $hasScanLog = $validator->hasScanLog();
206 $this->tpl->addBlockFile(
209 "tpl.adm_check.html",
210 "Modules/SystemFolder" 214 $this->tpl->setVariable(
"TXT_VIEW_LOG", $this->
lng->txt(
"view_last_log"));
217 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
218 $this->tpl->setVariable(
"TXT_TITLE", $this->
lng->txt(
"systemcheck"));
219 $this->tpl->setVariable(
"COLSPAN", 3);
220 $this->tpl->setVariable(
"TXT_ANALYZE_TITLE", $this->
lng->txt(
"analyze_data"));
221 $this->tpl->setVariable(
"TXT_ANALYSIS_OPTIONS", $this->
lng->txt(
"analysis_options"));
222 $this->tpl->setVariable(
"TXT_REPAIR_OPTIONS", $this->
lng->txt(
"repair_options"));
223 $this->tpl->setVariable(
"TXT_OUTPUT_OPTIONS", $this->
lng->txt(
"output_options"));
224 $this->tpl->setVariable(
"TXT_SCAN", $this->
lng->txt(
"scan"));
225 $this->tpl->setVariable(
"TXT_SCAN_DESC", $this->
lng->txt(
"scan_desc"));
226 $this->tpl->setVariable(
"TXT_DUMP_TREE", $this->
lng->txt(
"dump_tree"));
227 $this->tpl->setVariable(
"TXT_DUMP_TREE_DESC", $this->
lng->txt(
"dump_tree_desc"));
228 $this->tpl->setVariable(
"TXT_CLEAN", $this->
lng->txt(
"clean"));
229 $this->tpl->setVariable(
"TXT_CLEAN_DESC", $this->
lng->txt(
"clean_desc"));
230 $this->tpl->setVariable(
"TXT_RESTORE", $this->
lng->txt(
"restore_missing"));
231 $this->tpl->setVariable(
"TXT_RESTORE_DESC", $this->
lng->txt(
"restore_missing_desc"));
232 $this->tpl->setVariable(
"TXT_PURGE", $this->
lng->txt(
"purge_missing"));
233 $this->tpl->setVariable(
"TXT_PURGE_DESC", $this->
lng->txt(
"purge_missing_desc"));
234 $this->tpl->setVariable(
"TXT_RESTORE_TRASH", $this->
lng->txt(
"restore_trash"));
235 $this->tpl->setVariable(
"TXT_RESTORE_TRASH_DESC", $this->
lng->txt(
"restore_trash_desc"));
236 $this->tpl->setVariable(
"TXT_PURGE_TRASH", $this->
lng->txt(
"purge_trash"));
237 $this->tpl->setVariable(
"TXT_PURGE_TRASH_DESC", $this->
lng->txt(
"purge_trash_desc"));
238 $this->tpl->setVariable(
"TXT_COUNT_LIMIT", $this->
lng->txt(
"purge_count_limit"));
239 $this->tpl->setVariable(
"TXT_COUNT_LIMIT_DESC", $this->
lng->txt(
"purge_count_limit_desc"));
240 $this->tpl->setVariable(
"COUNT_LIMIT_VALUE", $ilUser->getPref(
"systemcheck_count_limit"));
241 $this->tpl->setVariable(
"TXT_AGE_LIMIT", $this->
lng->txt(
"purge_age_limit"));
242 $this->tpl->setVariable(
"TXT_AGE_LIMIT_DESC", $this->
lng->txt(
"purge_age_limit_desc"));
243 $this->tpl->setVariable(
"AGE_LIMIT_VALUE", $ilUser->getPref(
"systemcheck_age_limit"));
244 $this->tpl->setVariable(
"TXT_TYPE_LIMIT", $this->
lng->txt(
"purge_type_limit"));
245 $this->tpl->setVariable(
"TXT_TYPE_LIMIT_DESC", $this->
lng->txt(
"purge_type_limit_desc"));
247 if ($ilUser->getPref(
'systemcheck_mode_scan')) {
248 $this->tpl->touchBlock(
'mode_scan_checked');
250 if ($ilUser->getPref(
'systemcheck_mode_dump_tree')) {
251 $this->tpl->touchBlock(
'mode_dump_tree_checked');
253 if ($ilUser->getPref(
'systemcheck_mode_clean')) {
254 $this->tpl->touchBlock(
'mode_clean_checked');
256 if ($ilUser->getPref(
'systemcheck_mode_restore')) {
257 $this->tpl->touchBlock(
'mode_restore_checked');
258 $this->tpl->touchBlock(
'mode_purge_disabled');
259 } elseif ($ilUser->getPref(
'systemcheck_mode_purge')) {
260 $this->tpl->touchBlock(
'mode_purge_checked');
261 $this->tpl->touchBlock(
'mode_restore_disabled');
263 if ($ilUser->getPref(
'systemcheck_mode_restore_trash')) {
264 $this->tpl->touchBlock(
'mode_restore_trash_checked');
265 $this->tpl->touchBlock(
'mode_purge_trash_disabled');
266 } elseif ($ilUser->getPref(
'systemcheck_mode_purge_trash')) {
267 $this->tpl->touchBlock(
'mode_purge_trash_checked');
268 $this->tpl->touchBlock(
'mode_restore_trash_disabled');
270 if ($ilUser->getPref(
'systemcheck_log_scan')) {
271 $this->tpl->touchBlock(
'log_scan_checked');
277 $obj_types_in_tree = [];
280 $set =
$ilDB->query(
'SELECT type FROM object_data od' .
281 ' JOIN object_reference ref ON (od.obj_id = ref.obj_id)' .
282 ' JOIN tree ON (tree.child = ref.ref_id)' .
283 ' WHERE tree.tree < 1' .
285 while ($row =
$ilDB->fetchAssoc($set)) {
286 $obj_types_in_tree[] = $row[
'type'];
289 $types = $objDefinition->getAllObjects();
291 foreach ($types as $t) {
292 if ($t !=
"" && !$objDefinition->isSystemObject($t) && $t !=
"root" &&
293 in_array($t, $obj_types_in_tree)) {
294 if ($objDefinition->isPlugin($t)) {
296 $ts[$t] = $pl->txt(
"obj_" . $t);
298 $ts[$t] = $this->
lng->txt(
"obj_" . $t);
303 $this->tpl->setVariable(
306 $ilUser->getPref(
"systemcheck_type_limit"),
313 $this->tpl->setVariable(
"TXT_LOG_SCAN", $this->
lng->txt(
"log_scan"));
314 $this->tpl->setVariable(
"TXT_LOG_SCAN_DESC", $this->
lng->txt(
"log_scan_desc"));
315 $this->tpl->setVariable(
"TXT_SUBMIT", $this->
lng->txt(
"start_scan"));
317 $this->tpl->setVariable(
"TXT_SAVE", $this->
lng->txt(
"save_params_for_cron"));
320 $cron_form->setFormAction($this->
ctrl->getFormAction($this));
321 $cron_form->setTitle($this->
lng->txt(
'systemcheck_cronform'));
327 $radio_group->addOption($radio_opt);
330 $radio_group->addOption($radio_opt);
332 $cron_form->addItem($radio_group);
334 $cron_form->addCommandButton(
'saveCheckCron', $this->
lng->txt(
'save'));
336 $this->tpl->setVariable(
'CRON_FORM', $cron_form->getHTML());
343 unset($_POST[
'mode']);
350 $modes = $validator->getPossibleModes();
353 foreach ($modes as $mode) {
354 if (isset($_POST[
'mode'][$mode])) {
355 $value = (
int) $_POST[
'mode'][$mode];
359 $prefs[
'systemcheck_mode_' . $mode ] = $value;
362 if (isset($_POST[
'log_scan'])) {
363 $value = (
int) $_POST[
'log_scan'];
367 $prefs[
'systemcheck_log_scan'] = $value;
370 foreach ($prefs as
$key => $val) {
379 $systemcheck_cron = ($_POST[
'cronjob'] ? 1 : 0);
380 $ilSetting->set(
'systemcheck_cron', $systemcheck_cron);
382 unset($_POST[
'mode']);
396 $this->tpl->addBlockFile(
399 "tpl.header_title_edit.html",
400 "Modules/SystemFolder" 405 if ($_SESSION[
"error_post_vars"]) {
406 $_SESSION[
"translation_post"] = $_SESSION[
"error_post_vars"];
407 $_GET[
"mode"] =
"session";
412 if ((
$_GET[
"mode"] !=
"session")) {
413 $data = $this->
object->getHeaderTitleTranslations();
414 $_SESSION[
"translation_post"] =
$data;
417 elseif (
$_GET[
"entry"] != 0) {
418 array_splice($_SESSION[
"translation_post"][
"Fobject"],
$_GET[
"entry"], 1, array());
420 if (
$_GET[
"entry"] == $_SESSION[
"translation_post"][
"default_language"]) {
421 $_SESSION[
"translation_post"][
"default_language"] =
"";
425 $data = $_SESSION[
"translation_post"];
428 if (!
$_GET[
"entry"] and $array_push) {
429 $count = array_push(
$data[
"Fobject"], array(
"title" =>
"",
"desc" =>
""));
431 $count = count(
$data[
"Fobject"]);
435 $strip = isset($_SESSION[
"translation_post"]) ? true :
false;
437 foreach (
$data[
"Fobject"] as
$key => $val) {
439 if (
$key == $count - 1) {
440 $this->tpl->setCurrentBlock(
"addTranslation");
441 $this->tpl->setVariable(
"TXT_ADD_TRANSLATION", $this->
lng->txt(
"add_translation") .
" >>");
442 $this->tpl->parseCurrentBlock();
447 $this->tpl->setCurrentBlock(
"removeTranslation");
448 $this->tpl->setVariable(
"TXT_REMOVE_TRANSLATION", $this->
lng->txt(
"remove_translation"));
449 $this->
ctrl->setParameter($this,
"entry",
$key);
450 $this->
ctrl->setParameter($this,
"mode",
"edit");
451 $this->tpl->setVariable(
452 "LINK_REMOVE_TRANSLATION",
453 $this->
ctrl->getLinkTarget($this,
"removeTranslation")
455 $this->tpl->parseCurrentBlock();
459 $this->tpl->addBlockFile(
462 "tpl.lang_selection.html",
465 $this->tpl->setVariable(
"SEL_NAME",
"Fobject[" .
$key .
"][lang]");
469 foreach ($languages as $code => $language) {
470 $this->tpl->setCurrentBlock(
"lg_option");
471 $this->tpl->setVariable(
"VAL_LG", $code);
472 $this->tpl->setVariable(
"TXT_LG", $language);
474 if ($code == $val[
"lang"]) {
475 $this->tpl->setVariable(
"SELECTED",
"selected=\"selected\"");
478 $this->tpl->parseCurrentBlock();
482 $this->tpl->setCurrentBlock(
"obj_form");
485 $this->tpl->setVariable(
"TXT_HEADER", $this->
lng->txt(
"change_header_title"));
487 $this->tpl->setVariable(
"TXT_HEADER", $this->
lng->txt(
"translation") .
" " .
$key);
491 $this->tpl->setVariable(
"CHECKED",
"checked=\"checked\"");
494 $this->tpl->setVariable(
"TXT_TITLE", $this->
lng->txt(
"title"));
495 $this->tpl->setVariable(
"TXT_DESC", $this->
lng->txt(
"desc"));
496 $this->tpl->setVariable(
"TXT_DEFAULT", $this->
lng->txt(
"default"));
497 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->
lng->txt(
"language"));
500 $this->tpl->setVariable(
"NUM",
$key);
501 $this->tpl->parseCurrentBlock();
505 $this->tpl->setCurrentBlock(
"adm_content");
507 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
508 $this->tpl->setVariable(
"TXT_CANCEL", $this->
lng->txt(
"cancel"));
509 $this->tpl->setVariable(
"TXT_SUBMIT", $this->
lng->txt(
"save"));
510 $this->tpl->setVariable(
"CMD_SUBMIT",
"saveHeaderTitle");
511 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->
lng->txt(
"required_field"));
525 if (!isset(
$data[
"default_language"])) {
526 $ilErr->raiseError($this->
lng->txt(
"msg_no_default_language"),
$ilErr->MESSAGE);
530 foreach (
$data[
"Fobject"] as
$key => $val) {
531 $langs[
$key] = $val[
"lang"];
534 $langs = array_count_values($langs);
537 if (array_key_exists(
"", $langs)) {
538 $ilErr->raiseError($this->
lng->txt(
"msg_no_language_selected"),
$ilErr->MESSAGE);
542 if (array_sum($langs) > count($langs)) {
543 $ilErr->raiseError($this->
lng->txt(
"msg_multi_language_selected"),
$ilErr->MESSAGE);
547 $_POST[
"Fobject"][
"title"] = $_POST[
"Fobject"][$_POST[
"default_language"]][
"title"];
548 $_POST[
"Fobject"][
"desc"] = $_POST[
"Fobject"][$_POST[
"default_language"]][
"desc"];
551 $this->
object->removeHeaderTitleTranslations();
554 foreach (
$data[
"Fobject"] as
$key => $val) {
564 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
566 $this->
ctrl->redirect($this);
571 $this->
ctrl->redirect($this,
"view");
581 $_SESSION[
"translation_post"] = $_POST;
583 $this->
ctrl->setParameter($this,
"mode",
"session");
584 $this->
ctrl->setParameter($this,
"entry",
"0");
585 $this->
ctrl->redirect($this,
"changeHeaderTitle");
595 $this->
ctrl->setParameter($this,
"entry",
$_GET[
"entry"]);
596 $this->
ctrl->setParameter($this,
"mode",
"session");
597 $this->
ctrl->redirect($this,
"changeHeaderTitle");
606 if (!$rbacsystem->
checkAccess(
"visible,read", $this->object->getRefId())) {
607 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
610 $logging = ($a_log) ?
true :
false;
612 $validator->setMode(
"all",
false);
615 foreach ($a_mode as $mode => $value) {
616 $validator->setMode($mode, (
bool) $value);
617 $modes[] = $mode .
'=' . $value;
620 $scan_log = $validator->validate();
622 $mode = $this->
lng->txt(
"scan_modes") .
": " . implode(
', ', $modes);
625 $this->tpl->addBlockFile(
629 "Modules/SystemFolder" 632 $this->tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
633 $this->tpl->setVariable(
"TXT_TITLE", $this->
lng->txt(
"scanning_system"));
634 $this->tpl->setVariable(
"COLSPAN", 3);
635 $this->tpl->setVariable(
"TXT_SCAN_LOG", $scan_log);
636 $this->tpl->setVariable(
"TXT_MODE", $mode);
638 if ($logging ===
true) {
639 $this->tpl->setVariable(
"TXT_VIEW_LOG", $this->
lng->txt(
"view_log"));
642 $this->tpl->setVariable(
"TXT_DONE", $this->
lng->txt(
"done"));
644 $validator->writeScanLogLine($mode);
650 $scan_log = $validator->readScanLog();
652 if (is_array($scan_log)) {
653 $scan_log =
'<pre>' . implode(
"", $scan_log) .
'</pre>';
654 $this->tpl->setVariable(
"ADM_CONTENT", $scan_log);
656 $scan_log =
"no scanlog found.";
660 $this->tpl->addBlockFile(
664 "Modules/SystemFolder" 666 $this->tpl->setVariable(
"TXT_TITLE", $this->
lng->txt(
"scan_details"));
667 $this->tpl->setVariable(
"COLSPAN", 3);
668 $this->tpl->setVariable(
"TXT_SCAN_LOG", $scan_log);
669 $this->tpl->setVariable(
"TXT_DONE", $this->
lng->txt(
"done"));
678 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
679 $this->error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
682 $write_access = $this->rbacsystem->checkAccess(
"write", $this->
object->getRefId());
691 $cb->setInfo($this->
lng->txt(
"adm_activate_db_benchmark_desc"));
692 $cb->setDisabled(!$write_access);
693 $this->
form->addItem($cb);
703 $ti->setInfo($this->
lng->txt(
"adm_db_benchmark_user_desc"));
704 $ti->setDisabled(!$write_access);
705 $this->
form->addItem($ti);
708 $this->
form->addCommandButton(
"saveBenchSettings", $this->
lng->txt(
"save"));
711 $this->
form->setTitle($this->
lng->txt(
"adm_db_benchmark"));
712 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
714 $this->tpl->setContent($this->
form->getHTML());
782 $ilTabs->activateTab(
"benchmarks");
787 $ilCtrl->getLinkTarget($this,
"benchmark")
794 $lng->
txt(
"adm_db_bench_chronological"),
795 $ilCtrl->getLinkTarget($this,
"showDbBenchChronological")
799 $lng->
txt(
"adm_db_bench_slowest_first"),
800 $ilCtrl->getLinkTarget($this,
"showDbBenchSlowestFirst")
804 $lng->
txt(
"adm_db_bench_sorted_by_sql"),
805 $ilCtrl->getLinkTarget($this,
"showDbBenchSortedBySql")
809 $lng->
txt(
"adm_db_bench_by_first_table"),
810 $ilCtrl->getLinkTarget($this,
"showDbBenchByFirstTable")
814 $ilTabs->activateSubTab($a_current);
823 $write_access = $this->rbacsystem->checkAccess(
"write", $this->
object->getRefId());
824 if (!$write_access) {
825 $this->error->raiseError($this->
lng->txt(
"permission_denied"), $this->error->MESSAGE);
834 $this->bench->enableDbBenchmarkForUserName($user_name);
837 $this->bench->disableDbBenchmark();
840 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
842 $this->
ctrl->redirect($this,
"benchmark");
851 $this->
ctrl->setParameter($this,
'cur_mod', $_POST[
'module']);
852 $this->
ctrl->redirect($this,
"benchmark");
874 $this->
ctrl->setParameter($this,
"ref_id", $this->
object->getRefId());
877 if ($rbacsystem->
checkAccess(
"read", $this->object->getRefId())) {
878 $this->tabs_gui->addTarget(
880 $this->
ctrl->getLinkTarget($this,
"showBasicSettings"),
881 [
"showBasicSettings",
"saveBasicSettings"],
887 if ($rbacsystem->
checkAccess(
"visible,read", $this->object->getRefId())) {
888 $this->tabs_gui->addTarget(
890 $this->
ctrl->getLinkTarget($this,
"showServerInfo"),
891 [
"showServerInfo",
"view"],
896 if ($rbacsystem->
checkAccess(
'visible,read', $this->object->getRefId())) {
897 $this->tabs_gui->addTarget(
899 $this->
ctrl->getLinkTargetByClass(
'ilCronManagerGUI',
''),
904 $this->tabs_gui->addTarget(
906 $this->
ctrl->getLinkTarget($this,
'benchmark'),
912 if ($rbacsystem->
checkAccess(
'edit_permission', $this->object->getRefId())) {
913 $this->tabs_gui->addTarget(
915 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
916 array(
"perm",
"info",
"owner"),
929 if ($rbacsystem->
checkAccess(
"read", $this->object->getRefId())) {
951 if ($rbacsystem->
checkAccess(
"read", $this->object->getRefId())) {
952 $ilTabs->addSubTabTarget(
"installation_status", $ilCtrl->getLinkTarget($this,
"showServerInstallationStatus"));
954 $ilTabs->addSubTabTarget(
"server_data", $ilCtrl->getLinkTarget($this,
"showServerInfo"));
958 if ($rbacsystem->
checkAccess(
"write", $this->object->getRefId())) {
959 $ilTabs->addSubTabTarget(
"java_server", $ilCtrl->getLinkTarget($this,
"showJavaServer"));
962 $ilTabs->setSubTabActive($a_activate);
963 $ilTabs->setTabActive(
"server");
969 public function showServerInfoObject():
void 982 if ($rbacsystem->
checkAccess(
"read", $this->object->getRefId())) {
985 $this->
lng->txt(
"vc_information"),
986 $this->
ctrl->getLinkTarget($this,
'showVcsInformation')
994 $btpl =
new ilTemplate(
"tpl.server_data.html",
true,
true,
"Modules/SystemFolder");
995 $btpl->setVariable(
"FORM", $this->
form->getHTML());
996 $btpl->setVariable(
"PHP_INFO_TARGET", $ilCtrl->getLinkTarget($this,
"showPHPInfo"));
1016 $ne->setValue($ilClientIniFile->readVariable(
"client",
"name"));
1017 $ne->setInfo($ilClientIniFile->readVariable(
"client",
"description"));
1018 $this->
form->addItem($ne);
1023 $this->
form->addItem($ne);
1028 $this->
form->addItem($ne);
1032 $ne->setValue(
$ilSetting->get(
"db_version"));
1034 $this->
form->addItem($ne);
1039 $this->
form->addItem($ne);
1043 $ne->setValue(
$_SERVER[
"SERVER_NAME"]);
1044 $this->
form->addItem($ne);
1049 $this->
form->addItem($ne);
1053 $ne->setValue($_SERVER[
"SERVER_SOFTWARE"]);
1054 $this->
form->addItem($ne);
1058 $ne->setValue(ILIAS_HTTP_PATH);
1059 $this->
form->addItem($ne);
1063 $ne->setValue(ILIAS_ABSOLUTE_PATH);
1064 $this->
form->addItem($ne);
1066 $not_set =
$lng->
txt(
"path_not_set");
1070 $ne->setValue(PATH_TO_CONVERT ?: $not_set);
1071 $this->
form->addItem($ne);
1075 $ne->setValue(PATH_TO_ZIP ?: $not_set);
1076 $this->
form->addItem($ne);
1080 $ne->setValue(PATH_TO_UNZIP ?: $not_set);
1081 $this->
form->addItem($ne);
1085 $ne->setValue(PATH_TO_JAVA ?: $not_set);
1086 $this->
form->addItem($ne);
1090 $ne->setValue(PATH_TO_MKISOFS ?: $not_set);
1091 $this->
form->addItem($ne);
1095 $ne->setValue(URL_TO_LATEX ?: $not_set);
1096 $this->
form->addItem($ne);
1100 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1106 if ($rbacsystem->
checkAccess(
"read", $this->object->getRefId())) {
1115 $f = $DIC->ui()->factory();
1116 $r = $DIC->ui()->renderer();
1117 $refinery = $DIC->refinery();
1120 $report = $metric->toUIReport(
$f, $this->
lng->txt(
"installation_status"));
1122 $this->tpl->setContent(
$r->render($report));
1141 return $st->getMetrics($agent_finder->getAgents());
1158 $ilTabs->addSubTabTarget(
"basic_settings", $ilCtrl->getLinkTarget($this,
"showBasicSettings"));
1159 $ilTabs->addSubTabTarget(
"header_title", $ilCtrl->getLinkTarget($this,
"showHeaderTitle"));
1160 $ilTabs->addSubTabTarget(
"contact_data", $ilCtrl->getLinkTarget($this,
"showContactInformation"));
1162 $ilTabs->setSubTabActive($a_activate);
1163 $ilTabs->setTabActive(
"general_settings");
1179 $this->initBasicSettingsForm();
1189 public function initBasicSettingsForm():
void 1202 $ti =
new ilTextInputGUI($this->
lng->txt(
"short_inst_name"),
"short_inst_name");
1203 $ti->setMaxLength(200);
1205 $ti->setValue(
$ilSetting->get(
"short_inst_name"));
1206 $ti->setInfo($this->
lng->txt(
"short_inst_name_info"));
1207 $this->
form->addItem($ti);
1211 $cb->setInfo(
$lng->
txt(
"pub_section_info"));
1213 $cb->setChecked(
true);
1215 $this->
form->addItem($cb);
1217 $this->
lng->loadLanguageModule(
'administration');
1218 $domains =
new ilTextInputGUI($this->
lng->txt(
'adm_pub_section_domain_filter'),
'public_section_domains');
1219 $domains->setInfo($this->
lng->txt(
'adm_pub_section_domain_filter_info'));
1220 $domains->setMulti(
true);
1224 $cb->addSubItem($domains);
1229 $cb_prop->setInfo(
$lng->
txt(
'pd_enable_user_publish_info'));
1230 $cb_prop->setChecked((
bool)
$ilSetting->get(
'enable_global_profiles'));
1231 $cb->addSubItem($cb_prop);
1236 $cb2->setInfo($this->
lng->txt(
"enable_search_engine"));
1237 $this->
form->addItem($cb2);
1239 if (!$robot_settings->checkRewrite()) {
1240 $cb2->setAlert(
$lng->
txt(
"allow_override_alert"));
1241 $cb2->setChecked(
false);
1242 $cb2->setDisabled(
true);
1244 $cb2->setChecked(
true);
1249 $ti->setMaxLength(80);
1251 $ti->setInfo($this->
lng->txt(
"adm_locale_info"));
1253 $this->
form->addItem($ti);
1256 $this->
form->addCommandButton(
"saveBasicSettings",
$lng->
txt(
"save"));
1258 $this->
form->setTitle(
$lng->
txt(
"basic_settings"));
1259 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1275 if (!$rbacsystem->
checkAccess(
"write", $this->object->getRefId())) {
1276 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
1277 $this->
ctrl->redirectByClass(self::class);
1281 $this->initBasicSettingsForm();
1282 if ($this->
form->checkInput()) {
1283 $ilSetting->set(
"short_inst_name", $this->
form->getInput(
"short_inst_name"));
1286 $public_section->setEnabled($this->
form->getInput(
'pub_section'));
1289 foreach ((array) $this->
form->getInput(
'public_section_domains') as $domain) {
1290 if (strlen(trim($domain)) !== 0) {
1291 $domains[] = $domain;
1294 $public_section->setDomains($domains);
1295 $public_section->save();
1297 $global_profiles = ($this->
form->getInput(
"pub_section"))
1298 ? (
int) $this->
form->getInput(
'enable_global_profiles')
1300 $ilSetting->set(
'enable_global_profiles', $global_profiles);
1302 $ilSetting->set(
"open_google", $this->
form->getInput(
"open_google"));
1305 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1306 $ilCtrl->redirect($this,
"showBasicSettings");
1309 $this->
form->setValuesByPost();
1323 $a_get_post_values =
false,
1324 bool $add_entry =
false 1330 if ($a_get_post_values) {
1332 foreach (($_POST[
"title"] ?? []) as $k => $v) {
1333 $def = $_POST[
"default"] ??
"";
1334 $vals[] = array(
"title" => $v,
1335 "desc" => ($_POST[
"desc"][$k] ??
""),
1336 "lang" => ($_POST[
"lang"][$k] ??
""),
1337 "default" => ($def == $k));
1340 $vals[] = array(
"title" =>
"",
1343 "default" =>
false);
1345 $table->setData($vals);
1347 $data = $this->
object->getHeaderTitleTranslations();
1348 if (isset(
$data[
"Fobject"]) && is_array(
$data[
"Fobject"])) {
1349 foreach (
$data[
"Fobject"] as $k => $v) {
1350 if ($k ==
$data[
"default_language"]) {
1351 $data[
"Fobject"][$k][
"default"] =
true;
1353 $data[
"Fobject"][$k][
"default"] =
false;
1357 $data[
"Fobject"] = array();
1359 $table->setData(
$data[
"Fobject"]);
1376 if (!$rbacsystem->
checkAccess(
"write", $this->object->getRefId())) {
1377 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
1378 $this->
ctrl->redirectByClass(self::class,
"showHeaderTitle");
1383 $post = $DIC->http()->request()->getParsedBody();
1384 foreach (
$post[
"title"] as $k => $v) {
1385 if ($delete && (
$post[
"check"][$k] ??
false)) {
1386 unset(
$post[
"title"][$k]);
1387 unset(
$post[
"desc"][$k]);
1388 unset(
$post[
"lang"][$k]);
1389 if ($k ==
$post[
"default"]) {
1390 unset(
$post[
"default"]);
1398 if (!isset(
$post[
"default"]) && count(
$post[
"lang"]) > 0) {
1399 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"msg_no_default_language"));
1405 if (array_key_exists(
"",
$post[
"lang"])) {
1406 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"msg_no_language_selected"));
1412 if (count(array_unique(
$post[
"lang"])) < count(
$post[
"lang"])) {
1413 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"msg_multi_language_selected"));
1419 $this->
object->removeHeaderTitleTranslations();
1420 foreach (
$post[
"title"] as $k => $v) {
1421 $desc =
$post[
"desc"][$k] ??
"";
1422 $this->
object->addHeaderTitleTranslation(
1426 (
$post[
"default"] == $k)
1430 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1431 $ilCtrl->redirect($this,
"showHeaderTitle");
1478 $this->
ctrl->redirectByClass(
"ilCronManagerGUI",
"render");
1512 $ti->setMaxLength(64);
1514 $ti->setRequired(
true);
1515 $ti->setValue(
$ilSetting->get(
"admin_firstname"));
1516 $this->
form->addItem($ti);
1520 $ti->setMaxLength(64);
1522 $ti->setRequired(
true);
1523 $ti->setValue(
$ilSetting->get(
"admin_lastname"));
1524 $this->
form->addItem($ti);
1528 $ti->setMaxLength(64);
1530 $ti->setValue(
$ilSetting->get(
"admin_title"));
1531 $this->
form->addItem($ti);
1535 $ti->setMaxLength(64);
1537 $ti->setValue(
$ilSetting->get(
"admin_position"));
1538 $this->
form->addItem($ti);
1542 $ti->setMaxLength(200);
1544 $ti->setValue(
$ilSetting->get(
"admin_institution"));
1545 $this->
form->addItem($ti);
1549 $ti->setMaxLength(64);
1552 $ti->setValue(
$ilSetting->get(
"admin_street"));
1553 $this->
form->addItem($ti);
1557 $ti->setMaxLength(10);
1560 $ti->setValue(
$ilSetting->get(
"admin_zipcode"));
1561 $this->
form->addItem($ti);
1565 $ti->setMaxLength(64);
1568 $ti->setValue(
$ilSetting->get(
"admin_city"));
1569 $this->
form->addItem($ti);
1573 $ti->setMaxLength(64);
1576 $ti->setValue(
$ilSetting->get(
"admin_country"));
1577 $this->
form->addItem($ti);
1581 $ti->setMaxLength(64);
1584 $ti->setValue(
$ilSetting->get(
"admin_phone"));
1585 $this->
form->addItem($ti);
1591 $ti->setRequired(
true);
1592 $ti->allowRFC822(
true);
1593 $ti->setValue(
$ilSetting->get(
"admin_email"));
1594 $this->
form->addItem($ti);
1597 $ti =
new ilTextInputGUI($this->
lng->txt(
"adm_support_contacts"),
"adm_support_contacts");
1598 $ti->setMaxLength(500);
1601 $ti->setInfo($this->
lng->txt(
"adm_support_contacts_info"));
1602 $this->
form->addItem($ti);
1605 $ti =
new ilTextInputGUI($this->
lng->txt(
"adm_accessibility_contacts"),
"accessibility_support_contacts");
1606 $ti->setMaxLength(500);
1609 $ti->setInfo($this->
lng->txt(
"adm_accessibility_contacts_info"));
1610 $this->
form->addItem($ti);
1612 $this->
form->addCommandButton(
"saveContactInformation",
$lng->
txt(
"save"));
1615 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1631 if (!$rbacsystem->
checkAccess(
"write", $this->object->getRefId())) {
1632 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"permission_denied"),
true);
1633 $this->
ctrl->redirectByClass(self::class,
"showContactInformation");
1637 if ($this->
form->checkInput()) {
1638 $fs = array(
"admin_firstname",
"admin_lastname",
"admin_title",
"admin_position",
1639 "admin_institution",
"admin_street",
"admin_zipcode",
"admin_city",
1640 "admin_country",
"admin_phone",
"admin_email");
1641 foreach ($fs as
$f) {
1651 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1652 $ilCtrl->redirect($this,
"showContactInformation");
1655 $this->
form->setValuesByPost();
1673 $tpl->
addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.java_settings.html',
'Modules/SystemFolder');
1675 $GLOBALS[
'lng']->loadLanguageModule(
'search');
1689 $this->tpl->setContent($this->
form->getHTML());
1701 $this->
form->setFormAction($this->
ctrl->getFormAction($this,
'saveJavaServer'));
1705 $pdf->setTitle($this->
lng->txt(
'rpc_pdf_generation'));
1706 $this->
form->addItem($pdf);
1708 $pdf_font =
new ilTextInputGUI($this->
lng->txt(
'rpc_pdf_font'),
'rpc_pdf_font');
1709 $pdf_font->setInfo($this->
lng->txt(
'rpc_pdf_font_info'));
1710 $pdf_font->setSize(64);
1711 $pdf_font->setMaxLength(1024);
1712 $pdf_font->setRequired(
true);
1713 $pdf_font->setValue(
1714 $ilSetting->get(
'rpc_pdf_font',
'Helvetica, unifont')
1716 $this->
form->addItem($pdf_font);
1719 $this->
form->addCommandButton(
"saveJavaServer",
$lng->
txt(
"save"));
1735 if (!$rbacsystem->
checkAccess(
"write", $this->object->getRefId())) {
1736 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
1740 if ($this->
form->checkInput()) {
1742 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1743 $ilCtrl->redirect($this,
"showJavaServer");
1748 $this->
form->setValuesByPost();
1759 $main_tpl = $DIC->ui()->mainTemplate();
1761 $ilAccess = $DIC->access();
1763 $lng = $DIC->language();
1767 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1772 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1773 $lng->
txt(
"msg_no_perm_read_item"),
1789 if ($rbacsystem->
checkAccess(
"read", $this->object->getRefId())) {
1791 $html = $vc->getInformationAsHtml();
1797 if ($vcInfo !== []) {
1798 $this->tpl->setOnScreenMessage(
'info', implode(
"<br />", $vcInfo));
1800 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'vc_information_not_determined'));
1803 $this->showServerInfoObject();
saveJavaServerObject()
Save java server form.
addHeaderTitleTranslationObject()
adds a translation form & save post vars to session
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
switchBenchModuleObject()
save benchmark settings
addBlockFile(string $var, string $block, string $template_name, string $in_module=null)
overwrites ITX::addBlockFile
showPHPInfoObject()
Show PHP Information.
benchmarkSubTabs($a_current)
Benchmark sub tabs.
ILIAS Refinery Factory $refinery
showContactInformationObject()
Show contact information.
writePref(string $a_keyword, string $a_value)
initJavaServerForm()
Init java server form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
startValidator($a_mode, $a_log)
saveBasicSettingsObject()
Save basic settings form.
prepareOutput(bool $show_sub_objects=true)
Class ChatMainBarProvider .
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Repository InternalGUIService $gui
ILIAS HTTP Wrapper WrapperFactory $wrapper
benchmarkObject()
Benchmark settings.
changeHeaderTitleObject()
edit header title form
getServerStatusInfo(ILIAS\Refinery\Factory $refinery)
loadLanguageModule(string $a_module)
Load language module.
deleteHeaderTitlesObject()
Remove header titles.
clearBenchObject()
delete all benchmark records
Command to output status information about the installation.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
removeTranslationObject()
removes a translation form & save post vars to session
Class ilObjectOwnershipManagementGUI.
saveContactInformationObject()
Save contact information form.
language handling for setup
Class ilObjSystemFolderGUI.
static _lookupObjId(int $ref_id)
showDbBenchResults($a_mode)
Show Db Benchmark Results.
A metric is something we can measure about the system.
ILIAS Style Content Object ObjectFacade $content_style_domain
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
showDbBenchByFirstTableObject()
Show db benchmark results.
parses the objects.xml it handles the xml-description of all ilias objects
checkObject()
displays system check menu
showDbBenchSortedBySqlObject()
Show db benchmark results.
ilGlobalTemplateInterface $tpl
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
showDbBenchChronologicalObject()
Show db benchmark results.
static getInstance()
get singleton instance
Class ilObjectGUI Basic methods of all Output classes.
saveHeaderTitlesObject(bool $delete=false)
Save header titles.
clearData()
delete all measurement data
addHeaderTitleObject()
Add a header title.
setSystemCheckSubTabs($a_activate)
Set sub tabs for general settings.
static redirect(string $a_script)
static getPluginObjectByType(string $type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin...
showDbBenchSlowestFirstObject()
Show db benchmark results.
static _goto()
goto target group
setServerInfoSubTabs($a_activate)
Set sub tabs for server info.
ilStyleDefinition $style_definition
saveHeaderTitleObject()
save header title
form( $class_path, string $cmd, string $submit_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Error Handling & global info handling.
showServerInstallationStatusObject()
initContactInformationForm()
Init contact information form.
initServerInfoForm()
Init server info form.
ilStyleDefinition acts as a wrapper of style related actions.
showVcsInformationObject()
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
showJavaServerObject()
Show Java Server Settings.
showHeaderTitleObject( $a_get_post_values=false, bool $add_entry=false)
Show header title.
setGeneralSettingsSubTabs($a_activate)
Set sub tabs for general settings.
__construct($a_data, $a_id, $a_call_by_reference)
Constructor public.
createJavaServerIniObject()
Create a server ini file.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
viewObject()
show admin subpanels and basic settings form
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveBenchSettingsObject()
Save benchmark settings.
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
showBasicSettingsObject()
Show basic settings.
ilObjectDefinition $obj_definition
static _lookupLogin(int $a_user_id)