7 require_once
"./setup/classes/class.ilSetup.php";
8 require_once(
'./Services/Database/classes/class.ilDBConstants.php');
53 include_once(
"./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
55 $this->tabs->setSetupMode(
true);
57 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
59 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
62 $tpl->addJavaScript(
"./Services/JavaScript/js/Basic.js", 0);
64 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
68 $this->revision =
'$Revision$';
69 $this->version =
"2 " . substr(substr($this->revision, 1), 0, -2);
70 $this->lang = $this->lng->lang_key;
73 require_once
'setup/classes/class.ilSetupPasswordManager.php';
74 require_once
'setup/classes/class.ilSetupPasswordEncoderFactory.php';
77 'password_encoder' =>
'bcryptphp',
79 'default_password_encoder' =>
'bcryptphp' 88 if (
$_POST[
"client_id"] !=
"") {
99 $this->setup->ini_client_exists = $this->setup->newClient(
$client_id);
100 if (is_object($this->setup->getClient())) {
101 $this->setup->getClient()->status = $this->setup->getStatus(
$client_id);
105 if (($this->cmd =
$_GET[
"cmd"]) ==
"gateway") {
107 @$this->cmd = key(
$_POST[
"cmd"]);
113 if ($this->setup->isAuthenticated()
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $this->cmd !=
"clientlist" and $this->cmd !=
"") {
123 if (!$this->setup->isAuthenticated()
or !$this->setup->isInstalled()) {
125 if (!$this->setup->isInstalled()
or !($this->setup->ini->readVariable(
"clients",
"path"))) {
128 if ($this->cmd ==
"performLogin" || $this->cmd ==
"performMLogin") {
136 if ($this->setup->isAdmin()) {
148 var_dump($this->setup->getClient()->status);
165 switch ($this->cmd) {
167 case "preliminaries":
168 $this->setup->checkPreliminaries();
176 case "determineToolsPathInstall":
180 case "saveBasicSettings":
185 $this->
displayError($this->lng->txt(
"unknown_command") .
": '" . $this->cmd .
"'");
196 switch ($this->cmd) {
202 $this->active_tab =
"clientlist";
205 case "savemasterpassword":
208 $this->active_tab =
"password";
211 case "changemasterpassword":
214 $this->active_tab =
"password";
217 case "mastersettings":
220 $this->active_tab =
"basicsettings";
223 case "determineToolsPath":
228 case "changedefault":
233 $this->cmd =
"selectdb";
235 $this->setup->ini_client_exists = $this->setup->newClient();
249 $this->setup->ini_client_exists = $this->setup->newClient();
263 case "preliminaries":
264 $this->setup->checkPreliminaries();
266 $this->active_tab =
"preliminaries";
269 case "updateBasicSettings":
271 case "performMLogin":
287 switch ($this->cmd) {
290 if ($this->setup->getClient()->db_installed) {
321 if (!isset(
$_GET[
"lang"])
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $_GET[
"cmd"] ==
"sess" and $this->setup->error ===
true) {
329 if (!isset($_GET[
"lang"])
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $_GET[
"cmd"] ==
"lang" and $this->setup->error ===
true) {
337 if (!isset($_GET[
"lang"])
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $_GET[
"cmd"] ==
"contact") {
345 if (!isset($_GET[
"lang"])
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $_GET[
"cmd"] ==
"proxy") {
353 $this->displayCache();
358 if (!isset($_GET[
"lang"])
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $_GET[
"cmd"] ==
"nic") {
366 if (!isset($_GET[
"lang"])
and !$this->setup->getClient()->status[
"finish"][
"status"]
and $_GET[
"cmd"] ==
"finish") {
383 ilUtil::redirect(ILIAS_HTTP_PATH .
"/login.php?client_id=" . $this->setup->getClient()->getId());
387 if ($this->setup->getClient()->ini->readVariable(
"client",
"access") !=
"1") {
388 $this->setup->getClient()->ini->setVariable(
"client",
"access",
"1");
389 $this->setup->getClient()->ini->write();
393 ilUtil::redirect(ILIAS_HTTP_PATH .
"/login.php?client_id=" . $this->setup->getClient()->getId());
400 case "reloadStructure":
408 case "saveClientIni":
409 case "installDatabase":
410 case "displayDatabase":
411 case "updateDatabase":
412 case "showUpdateSteps":
413 case "saveLanguages":
415 case "displayContactData":
417 case "saveRegistration":
419 case "showHotfixSteps":
420 case "applyCustomUpdates":
421 case "changeSettingsType":
422 case "showLongerSettings":
423 case "cloneSelectSource":
424 case "cloneSaveSource":
426 case "displayPassword":
430 case "addMemcacheServer":
431 case "deleteMemcacheServer":
432 case "editMemcacheServer":
433 case "createMemcacheServer":
434 case "updateMemcacheServer":
436 case "background_tasks":
437 case "edit_background_tasks":
438 case "save_background_tasks":
439 case "kill_waiting_tasks":
445 $this->
displayError($this->lng->txt(
"unknown_command") .
": '" . $this->cmd .
"'");
467 if ($a_mode !=
"view" and $a_mode !=
"setup") {
471 $this->display_mode = $a_mode;
495 $this->tpl->setCurrentBlock(
"languages");
496 $this->tpl->setVariable(
"LINK_LANG",
"./setup.php?cmd=" . $this->cmd .
"&lang=" . $lang_key);
497 $this->tpl->setVariable(
"LANG_NAME", $this->lng->txt(
"meta_l_" . $lang_key));
498 $this->tpl->setVariable(
"LANG_ICON", $lang_key);
499 $this->tpl->setVariable(
"LANG_KEY", $lang_key);
500 $this->tpl->setVariable(
"BORDER", 0);
501 $this->tpl->setVariable(
"VSPACE", 0);
502 $this->tpl->parseCurrentBlock();
507 if ($this->cmd !=
"logout" and $this->setup->isInstalled()
and $this->setup->isAuthenticated()) {
509 if ($this->setup->isAdmin()) {
510 if ($this->display_mode ==
"view" ||
511 $this->cmd ==
"clientlist" ||
512 $this->cmd ==
"changemasterpassword" ||
513 $this->cmd ==
'savemasterpassword' ||
514 $this->cmd ==
"mastersettings") {
515 $this->tpl->setCurrentBlock(
"add_client");
516 $this->tpl->setVariable(
"TXT_ADD_CLIENT", ucfirst($this->lng->txt(
"new_client")));
517 $this->tpl->parseCurrentBlock();
521 $class = ($this->active_tab ==
"clientlist")
524 $this->tpl->setCurrentBlock(
"display_list");
525 $this->tpl->setVariable(
"TXT_LIST", ucfirst($this->lng->txt(
"list_clients")));
526 $this->tpl->setVariable(
"TAB_CLASS", $class);
527 $this->tpl->parseCurrentBlock();
530 $class = ($this->active_tab ==
"background_tasks")
533 $this->tpl->setCurrentBlock(
"display_list");
534 $this->tpl->setVariable(
"TXT_BACKGROUND_TASKS", ucfirst($this->lng->txt(
"background_tasks")));
535 $this->tpl->setVariable(
"BACKGROUND_TASKS_CLASS", $class);
536 $this->tpl->parseCurrentBlock();
539 $class = ($this->active_tab ==
"basicsettings")
542 $this->tpl->setCurrentBlock(
"edit_pathes");
543 $this->tpl->setVariable(
"TXT_EDIT_PATHES", $this->lng->txt(
"basic_settings"));
544 $this->tpl->setVariable(
"TAB_CLASS", $class);
545 $this->tpl->parseCurrentBlock();
548 $class = ($this->active_tab ==
"preliminaries")
551 $this->tpl->setCurrentBlock(
"preliminaries");
552 $this->tpl->setVariable(
"TXT_PRELIMINARIES", $this->lng->txt(
"preliminaries"));
553 $this->tpl->setVariable(
"TAB_CLASS", $class);
554 $this->tpl->parseCurrentBlock();
557 $class = ($this->active_tab ==
"password")
560 $this->tpl->setCurrentBlock(
"change_password");
561 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", ucfirst($this->lng->txt(
"password")));
562 $this->tpl->setVariable(
"TAB_CLASS", $class);
563 $this->tpl->parseCurrentBlock();
567 if ($this->setup->isAuthenticated()) {
568 $this->tpl->setCurrentBlock(
"logout");
569 $this->tpl->setVariable(
"TXT_LOGOUT", $this->lng->txt(
"logout"));
570 $this->tpl->parseCurrentBlock();
574 $this->tpl->setVariable(
"VAL_CMD", htmlspecialchars(
$_GET[
"cmd"]));
575 $this->tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $this->lng->txt(
"choose_language"));
576 $this->tpl->setVariable(
"PAGETITLE",
"Setup");
578 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"../templates/default/delos.css");
579 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"./css/setup.css");
580 $this->tpl->setVariable(
"TXT_ILIAS_VERSION",
"ILIAS " .
ILIAS_VERSION);
581 $this->tpl->setVariable(
"TXT_SETUP", $this->lng->txt(
"setup"));
582 $this->tpl->setVariable(
"VERSION", $this->version);
583 $this->tpl->setVariable(
"TXT_VERSION", $this->lng->txt(
"version"));
584 $this->tpl->setVariable(
"LANG", $this->lang);
593 if ($this->cmd !=
"logout") {
594 if ($this->setup->ini_ilias_exists
and $this->display_mode ==
"setup" and $this->setup->getClient()->getId() !=
"") {
595 $this->tpl->setVariable(
"TXT_ACCESS_MODE",
"(" . $this->lng->txt(
"client_id") .
": " . $this->setup->getClient()->getId() .
")");
596 } elseif ($this->setup->isAdmin()) {
597 $this->tpl->setVariable(
"TXT_ACCESS_MODE",
"(" . $this->lng->txt(
"root_access") .
")");
613 if (!$this->btn_prev_on
and !$this->btn_next_on) {
617 $ntpl =
new ilTemplate(
"tpl.navbuttons.html",
true,
true,
"setup");
620 $ntpl->setVariable(
"FORMACTION_BUTTONS",
"setup.php?cmd=gateway");
622 if ($this->btn_prev_on) {
623 $ntpl->setCurrentBlock(
"btn_back");
624 $ntpl->setVariable(
"TXT_PREV", $this->btn_prev_lng);
625 $ntpl->setVariable(
"CMD_PREV", $this->btn_prev_cmd);
626 $ntpl->parseCurrentBlock();
629 if ($this->btn_next_on) {
630 $ntpl->setCurrentBlock(
"btn_forward");
631 $ntpl->setVariable(
"TXT_NEXT", $this->btn_next_lng);
632 $ntpl->setVariable(
"CMD_NEXT", $this->btn_next_cmd);
633 $ntpl->parseCurrentBlock();
636 $nav_html = $ntpl->get();
637 $this->tpl->setVariable(
"NAVBUTTONS", $nav_html);
638 if (!$this->no_second_nav) {
639 $this->tpl->setVariable(
"NAVBUTTONS2", $nav_html);
652 $this->btn_prev_on =
true;
653 $this->btn_prev_cmd = ($a_cmd) ? $a_cmd :
"gateway";
654 $this->btn_prev_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt(
"prev");
665 $this->btn_next_on =
true;
666 $this->btn_next_cmd = ($a_cmd) ? $a_cmd :
"gateway";
667 $this->btn_next_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt(
"next");
682 $btpl =
new ilTemplate(
"tpl.buttons.html",
true,
true,
"setup");
683 $btpl->setCurrentBlock(
"btn");
684 $btpl->setVariable(
"CMD",
"changeaccess");
685 $access_button = ($this->setup->getClient()->status[
"access"][
"status"]) ?
"disable" :
"enable";
686 $btpl->setVariable(
"TXT", $this->lng->txt($access_button));
687 $btpl->setVariable(
"FORMACTION",
"setup.php?cmd=gateway");
688 $btpl->parseCurrentBlock();
689 $this->tpl->setVariable(
"BUTTONS", $btpl->get());
692 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
704 $settings = $this->setup->getClient()->getAllSettings();
706 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
709 $this->form->setTitle($lng->txt(
"client_info"));
713 $ne->
setValue(($this->setup->getClient()->getName())
714 ? $this->setup->getClient()->getName()
715 :
"<" . $this->lng->txt(
"no_client_name") .
">");
716 $ne->setInfo($this->setup->getClient()->getDescription());
717 $this->form->addItem($ne);
721 $ne->
setValue($this->setup->getClient()->getId());
722 $this->form->addItem($ne);
726 $ne->
setValue(($this->setup->getClient()->db_installed)
727 ? $settings[
"inst_id"]
729 $this->form->addItem($ne);
733 $ne->
setValue(($this->setup->getClient()->db_installed)
734 ? $settings[
"db_version"]
736 $this->form->addItem($ne);
741 $access_status = ($this->setup->getClient()->status[
"access"][
"status"]) ?
"online" :
"disabled";
742 $ne->
setValue($this->lng->txt($access_status) . $access_link);
743 $this->form->addItem($ne);
747 $sh->setTitle($this->lng->txt(
"server_info"));
748 $this->form->addItem($sh);
753 $this->form->addItem($ne);
758 $this->form->addItem($ne);
764 $this->form->addItem($ne);
768 $ne->
setValue($_SERVER[
"SERVER_SOFTWARE"]);
769 $this->form->addItem($ne);
774 $this->form->addItem($ne);
779 $this->form->addItem($ne);
783 $sh->setTitle($this->lng->txt(
"3rd_party_software"));
784 $this->form->addItem($sh);
786 $tools = array(
"convert",
"zip",
"unzip",
"ghostscript",
"java",
"ffmpeg",
"phantomjs");
788 foreach ($tools as $tool) {
791 $p = $this->setup->ini->readVariable(
"tools", $tool);
792 $ne->
setValue($p ? $p : $this->lng->txt(
"not_configured"));
793 $this->form->addItem($ne);
798 $p = $this->setup->ini->readVariable(
"tools",
"latex");
799 $ne->
setValue($p ? $p : $this->lng->txt(
"not_configured"));
800 $this->form->addItem($ne);
804 $ne->
setValue($this->setup->ini->readVariable(
"tools",
"vscantype"));
805 $this->form->addItem($ne);
809 $p = $this->setup->ini->readVariable(
"tools",
"scancommand");
810 $ne->
setValue($p ? $p : $this->lng->txt(
"not_configured"));
811 $this->form->addItem($ne);
815 $p = $this->setup->ini->readVariable(
"tools",
"cleancommand");
816 $ne->
setValue($p ? $p : $this->lng->txt(
"not_configured"));
817 $this->form->addItem($ne);
822 $sh->setTitle($this->lng->txt(
"system_styles"));
823 $this->form->addItem($sh);
826 $ne =
new ilNonEditableValueGUI($lng->txt(
"enable_system_styles_management"),
"enable_system_styles_management");
827 $p = $this->setup->ini->readVariable(
"tools",
"enable_system_styles_management");
828 $ne->
setValue($p ? $this->lng->txt(
"enabled") : $this->lng->txt(
"not_enabled"));
829 $this->form->addItem($ne);
833 $p = $this->setup->ini->readVariable(
"tools",
"lessc");
834 $ne->
setValue($p ? $p : $this->lng->txt(
"not_configured"));
835 $this->form->addItem($ne);
838 $this->form->setFormAction(
"setup.php?cmd=gateway");
850 $OK =
"<font color=\"green\"><strong>OK</strong></font>";
851 $FAILED =
"<strong><font color=\"red\">FAILED</font></strong>";
853 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.preliminaries.html",
"setup");
855 $this->tpl->setVariable(
"TXT_SETUP_TITLE", $this->lng->txt(
"ilias_setup"));
856 $this->tpl->setVariable(
"TXT_SETUP_WELCOME", $this->lng->txt(
"setup_welcome"));
857 $this->tpl->setVariable(
"TXT_SETUP_INIFILE_DESC", $this->lng->txt(
"setup_inifile_desc"));
858 $this->tpl->setVariable(
"TXT_SETUP_DATABASE_DESC", $this->lng->txt(
"setup_database_desc"));
859 $this->tpl->setVariable(
"TXT_SETUP_LANGUAGES_DESC", $this->lng->txt(
"setup_languages_desc"));
860 $this->tpl->setVariable(
"TXT_SETUP_PASSWORD_DESC", $this->lng->txt(
"setup_password_desc"));
861 $this->tpl->setVariable(
"TXT_SETUP_NIC_DESC", $this->lng->txt(
"setup_nic_desc"));
863 $server_os = php_uname();
864 $server_web =
$_SERVER[
"SERVER_SOFTWARE"];
865 $environment = $this->lng->txt(
"env_using") .
" " . $server_os .
" <br/>" . $this->lng->txt(
"with") .
" " . $server_web;
867 if ((stristr($server_os,
"linux") || stristr($server_os,
"windows")) && stristr($server_web,
"apache")) {
868 $env_comment = $this->lng->txt(
"env_ok");
870 $env_comment =
"<font color=\"red\">" . $this->lng->txt(
"env_warning") .
"</font>";
873 $this->tpl->setVariable(
"TXT_ENV_TITLE", $this->lng->txt(
"environment"));
874 $this->tpl->setVariable(
"TXT_ENV_INTRO", $environment);
875 $this->tpl->setVariable(
"TXT_ENV_COMMENT", $env_comment);
877 $this->tpl->setVariable(
"TXT_PRE_TITLE", $this->lng->txt(
"preliminaries"));
878 $this->tpl->setVariable(
"TXT_PRE_INTRO", $this->lng->txt(
"pre_intro"));
880 $preliminaries = array(
"php",
"root",
"folder_create",
881 "cookies_enabled",
"dom",
"xsl",
"gd",
"memory");
882 if ($this->setup->hasOpCacheEnabled()) {
883 $preliminaries[] =
'load_comments';
886 foreach ($preliminaries as $preliminary) {
887 $this->tpl->setCurrentBlock(
"preliminary");
888 $this->tpl->setVariable(
"TXT_PRE", $this->lng->txt(
"pre_" . $preliminary));
889 if ($this->setup->preliminaries_result[$preliminary][
"status"] ==
true) {
890 $this->tpl->setVariable(
"STATUS_PRE", $OK);
892 $this->tpl->setVariable(
"STATUS_PRE", $FAILED);
894 $this->tpl->setVariable(
"COMMENT_PRE", $this->setup->preliminaries_result[$preliminary][
"comment"]);
895 $this->tpl->parseCurrentBlock();
899 if ($this->setup->preliminaries ===
true) {
900 if ($this->setup->isInstalled()) {
901 $cmd =
"mastersettings";
905 $btn_text = ($this->cmd ==
"preliminaries") ?
"" :
"installation";
907 $this->setButtonNext(
$cmd, $btn_text);
909 $this->tpl->setCurrentBlock(
"premessage");
910 $this->tpl->setVariable(
"TXT_PRE_ERR", sprintf(
911 $this->lng->txt(
"pre_error"),
912 "http://www.ilias.de/docu/goto.php?target=pg_6531_367&client_id=docu" 914 $this->tpl->parseCurrentBlock();
927 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
928 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"basic_settings"));
929 $this->tpl->setVariable(
931 $this->lng->txt(
"info_text_first_install") .
"<br/>" . $this->lng->txt(
"info_text_pathes")
934 $this->setButtonPrev(
"preliminaries");
936 if ($this->setup->isInstalled()) {
937 $this->setButtonNext(
"list");
943 $this->tpl->setVariable(
"SETUP_CONTENT",
"<br>" . $this->form->getHTML() .
"<br>");
951 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
952 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"basic_settings"));
953 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_pathes"));
955 $this->btn_next_on =
true;
956 $this->btn_next_lng = $this->lng->txt(
"create_new_client") .
"...";
957 $this->btn_next_cmd =
"newclient";
963 $this->tpl->setVariable(
"SETUP_CONTENT",
"<br>" . $this->form->getHTML() .
"<br>");
973 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
979 $ne->
setInfo($this->lng->txt(
"data_directory_in_ws_info"));
982 ? str_replace(
"\\",
"/", getcwd())
985 $ne->setValue($cwd .
"/data");
986 $this->form->addItem($ne);
990 $ti =
new ilTextInputGUI($lng->txt(
"data_directory_outside_ws"),
"datadir_path");
991 $ti->
setInfo($lng->txt(
"data_directory_info"));
992 $ti->setRequired(
true);
993 $this->form->addItem($ti);
996 $this->form->addItem($ne);
1006 $sh->setTitle($lng->txt(
"logging"));
1007 $this->form->addItem($sh);
1011 $ti->
setInfo($lng->txt(
"log_path_comment" . $lvext));
1012 $this->form->addItem($ti);
1016 $this->form->addItem($cb);
1019 $ti =
new ilTextInputGUI($lng->txt(
"error_log_path"),
"error_log_path");
1020 $ti->
setInfo($lng->txt(
"error_log_path_comment" . $lvext));
1021 $this->form->addItem($ti);
1025 $sh->setTitle($lng->txt(
"server_settings"));
1026 $this->form->addItem($sh);
1029 include_once(
"./Services/Calendar/classes/class.ilCalendarUtil.php");
1031 $si->setOptions(array_merge(
1032 array(
"" =>
"-- " . $lng->txt(
"please_select") .
" --"),
1035 $si->setRequired(
true);
1036 $this->form->addItem(
$si);
1040 $sh->setTitle($lng->txt(
"https_settings"));
1041 $this->form->addItem($sh);
1043 $check =
new ilCheckboxInputGUI($lng->txt(
'ps_auto_https'),
'auto_https_detect_enabled');
1045 $check->setValue(1);
1047 $text =
new ilTextInputGUI($lng->txt(
'ps_auto_https_header_name'),
'auto_https_detect_header_name');
1049 $text->setMaxLength(64);
1050 $text->setRequired(
true);
1051 $check->addSubItem(
$text);
1053 $text =
new ilTextInputGUI($lng->txt(
'ps_auto_https_header_value'),
'auto_https_detect_header_value');
1055 $text->setMaxLength(64);
1056 $text->setRequired(
true);
1057 $check->addSubItem(
$text);
1059 $this->form->addItem($check);
1063 $sh->setTitle($lng->txt(
"3rd_party_software_req"));
1064 $this->form->addItem($sh);
1067 $ti =
new ilTextInputGUI($lng->txt(
"convert_path"),
"convert_path");
1068 $ti->
setInfo($lng->txt(
"convert_path_comment" . $lvext));
1069 $ti->setRequired(
true);
1070 $this->form->addItem($ti);
1074 $ti->
setInfo($lng->txt(
"zip_path_comment" . $lvext));
1075 $ti->setRequired(
true);
1076 $this->form->addItem($ti);
1080 $ti->
setInfo($lng->txt(
"unzip_path_comment" . $lvext));
1081 $ti->setRequired(
true);
1082 $this->form->addItem($ti);
1086 $sh->setTitle($lng->txt(
"3rd_party_software_opt"));
1087 $this->form->addItem($sh);
1090 $ti =
new ilTextInputGUI($lng->txt(
"ghostscript_path"),
"ghostscript_path");
1091 $ti->
setInfo($lng->txt(
"ghostscript_path_comment" . $lvext));
1092 $this->form->addItem($ti);
1095 $ti =
new ilTextInputGUI($lng->txt(
"ffmpeg_path"),
"ffmpeg_path");
1096 $ti->
setInfo($lng->txt(
"ffmpeg_path_comment"));
1097 $this->form->addItem($ti);
1100 $pj =
new ilTextInputGUI($lng->txt(
"phantomjs_path"),
"phantomjs_path");
1101 $pj->
setInfo($lng->txt(
"phantomjs_path_comment"));
1102 $this->form->addItem($pj);
1105 $ti =
new ilTextInputGUI($lng->txt(
"url_to_latex"),
"latex_url");
1106 $ti->
setInfo($lng->txt(
"latex_url_comment"));
1107 $this->form->addItem($ti);
1111 "none" => $lng->txt(
"none"),
1112 "sophos" => $lng->txt(
"sophos"),
1113 "antivir" => $lng->txt(
"antivir"),
1114 "clamav" => $lng->txt(
"clamav")
1118 $this->form->addItem($si);
1121 $ti =
new ilTextInputGUI($lng->txt(
"scan_command"),
"scan_command");
1122 $this->form->addItem($ti);
1125 $ti =
new ilTextInputGUI($lng->txt(
"clean_command"),
"clean_command");
1126 $this->form->addItem($ti);
1130 $sh->setTitle($this->lng->txt(
"system_styles"));
1131 $this->form->addItem($sh);
1134 $check =
new ilCheckboxInputGUI($lng->txt(
'enable_system_styles_management'),
'enable_system_styles_management');
1135 $check->
setInfo($lng->txt(
'enable_system_styles_management_info'));
1136 $check->setValue(1);
1139 $lessc =
new ilTextInputGUI($lng->txt(
"lessc_path"),
"lessc_path");
1140 $lessc->
setInfo($lng->txt(
"lessc_path_comment"));
1141 $check->addSubItem($lessc);
1143 $this->form->addItem($check);
1148 $sh->setTitle($lng->txt(
"master_password"));
1149 $this->form->addItem($sh);
1154 $pi->setSkipSyntaxCheck(
true);
1155 $pi->setInfo($lng->txt(
"password_info"));
1156 $this->form->addItem($pi);
1160 $this->form->addCommandButton(
"saveBasicSettings", $lng->txt(
"save"));
1162 $this->form->addCommandButton(
"updateBasicSettings", $lng->txt(
"save"));
1163 $this->form->addCommandButton(
"determineToolsPath", $lng->txt(
"determine_tools_paths"));
1166 $this->form->setTitle($lng->txt(
"data_directories"));
1167 $this->form->setFormAction(
"setup.php?cmd=gateway");
1171 $this->form->setValuesByArray($det);
1182 $values[
"webspace_dir"] = getcwd() .
"/data";
1183 $values[
"data_dir"] = $this->setup->ini->readVariable(
"clients",
"datadir");
1184 $values[
"convert_path"] = $this->setup->ini->readVariable(
"tools",
"convert");
1185 $values[
"zip_path"] = $this->setup->ini->readVariable(
"tools",
"zip");
1186 $values[
"unzip_path"] = $this->setup->ini->readVariable(
"tools",
"unzip");
1187 $values[
"ghostscript_path"] = $this->setup->ini->readVariable(
"tools",
"ghostscript");
1189 $values[
"ffmpeg_path"] = $this->setup->ini->readVariable(
"tools",
"ffmpeg");
1190 $values[
"phantomjs_path"] = $this->setup->ini->readVariable(
"tools",
"phantomjs");
1191 $values[
"latex_url"] = $this->setup->ini->readVariable(
"tools",
"latex");
1192 $values[
"fop_path"] = $this->setup->ini->readVariable(
"tools",
"fop");
1193 $values[
"vscanner_type"] = $this->setup->ini->readVariable(
"tools",
"vscantype");
1194 $values[
"scan_command"] = $this->setup->ini->readVariable(
"tools",
"scancommand");
1195 $values[
"clean_command"] = $this->setup->ini->readVariable(
"tools",
"cleancommand");
1196 $values[
"enable_system_styles_management"] = $this->setup->ini->readVariable(
"tools",
"enable_system_styles_management");
1197 $values[
"lessc_path"] = $this->setup->ini->readVariable(
"tools",
"lessc");
1198 $values[
"log_path"] = $this->setup->ini->readVariable(
"log",
"path") .
"/" .
1199 $this->setup->ini->readVariable(
"log",
"file");
1200 $values[
"chk_log_status"] = !$this->setup->ini->readVariable(
"log",
"enabled");
1201 $values[
"error_log_path"] = $this->setup->ini->readVariable(
"log",
"error_path");
1202 $values[
"time_zone"] = $this->setup->ini->readVariable(
"server",
"timezone");
1205 $values[
"auto_https_detect_enabled"] = $this->setup->ini->readVariable(
"https",
"auto_https_detect_enabled");
1206 $values[
"auto_https_detect_header_name"] = $this->setup->ini->readVariable(
"https",
"auto_https_detect_header_name");
1207 $values[
"auto_https_detect_header_value"] = $this->setup->ini->readVariable(
"https",
"auto_https_detect_header_value");
1209 $this->form->setValuesByArray(
$values);
1221 if ($this->form->checkInput()) {
1224 $fs = array(
"datadir_path",
"log_path",
"convert_path",
"zip_path",
1225 "unzip_path",
"ghostscript_path",
"ffmpeg_path",
"lessc_path",
"phantomjs_path");
1226 foreach ($fs as
$f) {
1232 if (!$this->setup->checkDataDirSetup(
$_POST)) {
1233 $i = $this->form->getItemByPostVar(
"datadir_path");
1234 $i->setAlert($this->lng->txt($this->setup->getError()));
1236 } elseif (!$this->setup->checkLogSetup(
$_POST)) {
1237 $i = $this->form->getItemByPostVar(
"log_path");
1238 $i->setAlert($this->lng->txt($this->setup->getError()));
1240 } elseif (!$this->setup->checkErrorLogSetup(
$_POST[
"error_log_path"])) {
1241 $i = $this->form->getItemByPostVar(
"error_log_path");
1242 $i->setAlert($this->lng->txt($this->setup->getError()));
1244 } elseif (!$this->setup->checkPasswordSetup(
$_POST)) {
1246 } elseif (!$this->setup->saveMasterSetup(
$_POST)) {
1249 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
1254 $this->form->setValuesByPost();
1267 if ($this->form->checkInput()) {
1269 $fs = array(
"datadir_path",
"log_path",
"convert_path",
"zip_path",
1270 "unzip_path",
"ghostscript_path",
"ffmpeg_path",
"lessc_path",
"phantomjs_path");
1271 foreach ($fs as
$f) {
1276 if (!$this->setup->checkLogSetup(
$_POST)) {
1277 $i = $this->form->getItemByPostVar(
"log_path");
1278 $i->setAlert($this->lng->txt($this->setup->getError()));
1280 } elseif (!$this->setup->checkErrorLogSetup(
$_POST[
"error_log_path"])) {
1281 $i = $this->form->getItemByPostVar(
"error_log_path");
1282 $i->setAlert($this->lng->txt($this->setup->getError()));
1284 } elseif (!$this->setup->updateMasterSettings(
$_POST)) {
1287 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
1292 $this->form->setValuesByPost();
1307 ilUtil::redirect(ILIAS_HTTP_PATH .
"/login.php?client_id=" . $this->setup->getClient()->getId());
1316 $this->tpl->setVariable(
"SETUP_LOGIN_CLASS",
" ilSetupLogin");
1317 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
1319 if ($a_omit_minit) {
1320 $m_form = $this->form->getHTML();
1322 if (!$a_omit_cinit) {
1325 $cl_form = $this->form->getHTML();
1326 if (!$a_omit_minit) {
1328 $m_form = $this->form->getHTML();
1330 $this->tpl->setVariable(
"SETUP_CONTENT", $cl_form .
"<br>" . $m_form);
1331 $this->tpl->setVariable(
"TXT_HEADER", $lng->txt(
"login"));
1340 if ($this->form->checkInput()) {
1341 $i = $this->form->getItemByPostVar(
'mpassword');
1342 if (!$this->setup->loginAsAdmin(
$_POST[
'mpassword'])) {
1343 $i->setAlert($this->lng->txt(
'login_invalid'));
1351 $this->form->setValuesByPost();
1361 if ($this->form->checkInput()) {
1362 $i = $this->form->getItemByPostVar(
"password");
1363 if (!$this->setup->loginAsClient(
1364 array(
"client_id" =>
$_POST[
"client_id"],
1365 "username" =>
$_POST[
"username"],
"password" =>
$_POST[
"password"])
1367 $i->setAlert($this->setup->getError());
1375 $this->form->setValuesByPost();
1386 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1388 $this->form->setId(
"client_login");
1394 $this->form->addItem($ti);
1399 $this->form->addItem($ti);
1404 $pi->setRetype(
false);
1405 $pi->setSkipSyntaxCheck(
true);
1406 $this->form->addItem($pi);
1408 $this->form->addCommandButton(
"performLogin", $lng->txt(
"login"));
1410 $this->form->setTitle($lng->txt(
"client_login"));
1411 $this->form->setFormAction(
"setup.php?cmd=gateway");
1421 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1423 $this->form->setId(
"master_login");
1427 $pi->setRetype(
false);
1428 $pi->setSkipSyntaxCheck(
true);
1429 $this->form->addItem($pi);
1431 $this->form->addCommandButton(
"performMLogin", $lng->txt(
"login"));
1433 $this->form->setTitle($lng->txt(
"admin_login"));
1434 $this->form->setFormAction(
"setup.php?cmd=gateway");
1448 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientlist.html",
"setup");
1449 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_list"));
1453 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"list_clients"));
1454 $this->tpl->setVariable(
"TXT_LISTSTATUS", ($this->setup->ini->readVariable(
"clients",
"list")) ? $this->lng->txt(
"display_clientlist") : $this->lng->txt(
"hide_clientlist"));
1455 $this->tpl->setVariable(
"TXT_TOGGLELIST", ($this->setup->ini->readVariable(
"clients",
"list")) ? $this->lng->txt(
"disable") : $this->lng->txt(
"enable"));
1457 include_once(
"./setup/classes/class.ilClientListTableGUI.php");
1459 $this->tpl->setVariable(
"CLIENT_LIST",
$tab->getHTML());
1462 $this->btn_next_on =
true;
1463 $this->btn_next_lng = $this->lng->txt(
"create_new_client") .
"...";
1464 $this->btn_next_cmd =
"newclient";
1490 ? str_replace(
"\\",
"/", getcwd())
1493 $tools = array(
"convert" =>
"convert",
1494 "zip" =>
"zip",
"unzip" =>
"unzip",
"ghostscript" =>
"gs",
1495 "java" =>
"java",
"ffmpeg" =>
"ffmpeg",
"lessc" =>
"lessc",
"phantomjs" =>
"phantomjs");
1496 $dirs = array(
"/usr/local",
"/usr/local/bin",
"/usr/bin",
"/bin",
"/sw/bin",
"/usr/bin");
1498 $tools = array(
"convert" =>
"convert.exe",
1499 "zip" =>
"zip.exe",
"unzip" =>
"unzip.exe");
1502 foreach ($tools as $k => $tool) {
1505 @exec(
"which " . $tool,
$ret);
1506 if (substr(
$ret[0], 0, 3) !=
"no " && substr(
$ret[0], 0, 1) ==
"/") {
1507 $a_tools[$k .
"_path"] =
$ret[0];
1512 foreach ($dirs as $dir) {
1513 if (@is_file($dir .
"/" . $tool)) {
1514 $a_tools[$k .
"_path"] = $dir .
"/" . $tool;
1537 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
1539 if ($this->setup->getClient()->status[
"ini"][
"status"]) {
1540 $this->setButtonNext(
"db");
1553 require_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1554 require_once(
'./Services/Database/classes/class.ilDBConstants.php');
1561 $si->setInfo($lng->txt(
""));
1562 $this->form->addItem(
$si);
1564 $this->form->addCommandButton(
"selectdbtype", $lng->txt(
"save"));
1566 $this->form->setTitle($lng->txt(
"db_selection"));
1567 $this->form->setFormAction(
"setup.php?cmd=gateway");
1581 if (
$_POST[
"db_type"] !=
"") {
1587 $has_ini = $this->setup->getClient()->status[
"ini"][
"status"];
1590 if (!
$_SESSION[
"db_type"] && $has_ini) {
1591 $_SESSION[
"db_type"] = $this->setup->getClient()->getDbType();
1594 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_ini"));
1595 if (!$a_omit_form_init) {
1599 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
1602 $this->setButtonNext(
"db");
1615 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1619 if ($this->setup->ini_client_exists) {
1621 $hi->setValue($this->client_id);
1622 $this->form->addItem($hi);
1626 $this->form->addItem($ne);
1630 $ti->setRequired(
true);
1631 $this->form->addItem($ti);
1636 $sh->setTitle($lng->txt(
"db_conn"));
1637 $this->form->addItem($sh);
1642 $ne->setValue($at[
$_SESSION[
"db_type"]]);
1643 $this->form->addItem($ne);
1648 $ti->setRequired(
true);
1649 $this->form->addItem($ti);
1652 require_once(
'./Services/Database/classes/class.ilDBConstants.php');
1655 $ti->setMaxLength(40);
1656 $this->form->addItem($ti);
1661 $ti->setRequired(
true);
1662 $this->form->addItem($ti);
1667 $this->form->addItem($ti);
1669 $sqlPassword = new \ilPasswordInputGUI($lng->txt(
'db_pass'),
'db_pass');
1670 $sqlPassword->setDisableHtmlAutoComplete(
true);
1671 $sqlPassword->setValidateAuthPost(
false);
1672 $sqlPassword->setSkipSyntaxCheck(
true);
1673 $sqlPassword->setRequired(
false);
1674 $sqlPassword->setMaxLength(40);
1675 $sqlPassword->setRetype(
false);
1676 $this->form->addItem($sqlPassword);
1678 $this->form->addCommandButton(
"saveClientIni", $lng->txt(
"save"));
1680 $this->form->setTitle($lng->txt(
"inst_identification"));
1681 $this->form->setFormAction(
"setup.php?cmd=gateway");
1691 $values[
"db_host"] = $this->setup->getClient()->getDbHost();
1692 $values[
"db_user"] = $this->setup->getClient()->getDbUser();
1693 $values[
"db_port"] = $this->setup->getClient()->getDbPort();
1695 if (is_string($this->setup->getClient()->getDbPass()) && strlen($this->setup->getClient()->getDbPass())) {
1696 $password = self::UI_PASSWORD_PLACEHOLDER;
1699 $values[
"db_name"] = $this->setup->getClient()->getDbName();
1700 $values[
"client_id"] = $this->setup->getClient()->getId();
1702 $this->form->setValuesByArray(
$values);
1711 if ($this->form->checkInput()) {
1712 if (strlen(
$_POST[
"client_id"]) != strlen(urlencode((
$_POST[
"client_id"])))
1713 || !$this->setup->isValidClientId(
$_POST[
"client_id"])
1715 $i = $this->form->getItemByPostVar(
"client_id");
1716 $i->setAlert($this->lng->txt(
"ini_client_id_invalid"));
1719 if (strlen(
$_POST[
"client_id"]) < 4) {
1720 $i = $this->form->getItemByPostVar(
"client_id");
1721 $i->setAlert($this->lng->txt(
"ini_client_id_too_short"));
1724 if (strlen(
$_POST[
"client_id"]) > 32) {
1725 $i = $this->form->getItemByPostVar(
"client_id");
1726 $i->setAlert($this->lng->txt(
"ini_client_id_too_long"));
1729 if (!$this->setup->ini_client_exists && file_exists(ILIAS_ABSOLUTE_PATH .
"/" . ILIAS_WEB_DIR .
"/" .
$_POST[
"client_id"])) {
1730 $i = $this->form->getItemByPostVar(
"client_id");
1731 $i->setAlert($this->lng->txt(
"ini_client_id_exists"));
1736 $old_db_name = $this->setup->getClient()->getDbName();
1737 $old_db_type = $this->setup->getClient()->getDbType();
1738 $old_client_id = $this->setup->getClient()->getId();
1741 if (!$this->setup->ini_client_exists) {
1747 $this->setup->getClient()->setId($_POST[
"client_id"]);
1748 $this->setup->getClient()->setDbHost($_POST[
"db_host"]);
1749 $this->setup->getClient()->setDbName($_POST[
"db_name"]);
1750 $this->setup->getClient()->setDbUser($_POST[
"db_user"]);
1751 $this->setup->getClient()->setDbPort($_POST[
"db_port"]);
1752 $dbPassword = (string) ($_POST[
"db_pass"] ??
'');
1753 if (
'' === $dbPassword || $dbPassword !== self::UI_PASSWORD_PLACEHOLDER) {
1754 $this->setup->getClient()->setDbPass($dbPassword);
1756 $this->setup->getClient()->setDbType(
$_SESSION[
"db_type"]);
1757 $this->setup->getClient()->setDSN();
1760 if (!$this->setup->getClient()->getDBSetup(
false)->isConnectable()) {
1761 $i = $this->form->getItemByPostVar(
"db_host");
1762 $i->setAlert($this->lng->txt($this->setup->getClient()->getError()));
1766 $db_installed = $this->setup->getClient()->getDBSetup(
false)->isDatabaseInstalled();
1768 if ($db_installed
and (!$this->setup->ini_ilias_exists
or ($this->setup->getClient()->getDbName() != $old_db_name))) {
1769 $_POST[
"db_name"] = $old_db_name;
1770 $message = ucfirst($this->lng->txt(
"database")) .
" \"" . $this->setup->getClient()->getDbName() .
"\" " 1771 . $this->lng->txt(
"ini_db_name_exists");
1772 $i = $this->form->getItemByPostVar(
"db_name");
1777 if (!$this->setup->ini_client_exists) {
1778 if ($this->setup->saveNewClient()) {
1779 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
1780 $this->setup->getClient()->status[
"ini"][
"status"] =
true;
1784 $err = $this->setup->getError();
1786 $this->setup->getClient()->status[
"ini"][
"status"] =
false;
1787 $this->setup->getClient()->status[
"ini"][
"comment"] = $err;
1790 if ($this->setup->getClient()->ini->write()) {
1791 ilUtil::sendSuccess($this->lng->txt(
"settings_changed"));
1792 $this->setup->getClient()->status[
"ini"][
"status"] =
true;
1795 $err = $this->setup->getClient()->ini->getError();
1797 $this->setup->getClient()->status[
"ini"][
"status"] =
false;
1798 $this->setup->getClient()->status[
"ini"][
"comment"] = $err;
1809 $this->form->setValuesByPost();
1822 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.error.html",
"setup");
1824 $this->tpl->setCurrentBlock(
"content");
1825 $this->tpl->setVariable(
"FORMACTION",
$_SESSION[
"referer"]);
1826 $this->tpl->setVariable(
"TXT_BACK", $this->lng->txt(
"back"));
1827 $this->tpl->setVariable(
"ERROR_MESSAGE", ($a_message));
1828 $this->tpl->parseCurrentBlock();
1839 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.logout.html",
"setup");
1843 $this->logged_out =
true;
1844 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"logged_out"));
1845 $this->tpl->setCurrentBlock(
"home_link");
1846 $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"ilias_homepage"));
1847 $this->tpl->setVariable(
"LNK_INDEX", ILIAS_HTTP_PATH .
"/index.php");
1848 $this->tpl->parseCurrentBlock();
1856 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1858 $checklist->setHeading($this->lng->txt(
"setup_process_status"));
1861 $OK =
"<font color=\"green\"><strong>OK</strong></font>";
1863 $steps = $this->setup->getStatus();
1866 $first = array(
"selectdb" => array(
1867 "status" => ((
bool)
$_SESSION[
"db_type"] || (
bool)
$steps[
"ini"][
"status"]),
1868 "text" => $this->lng->txt(
"db_selection"),
1872 $steps = $first +
$steps;
1875 unset($steps[
"access"]);
1877 $steps[
"ini"][
"text"] = $this->lng->txt(
"setup_process_step_ini");
1878 $steps[
"db"][
"text"] = $this->lng->txt(
"setup_process_step_db");
1880 $steps[
"lang"][
"text"] = $this->lng->txt(
"setup_process_step_lang");
1881 $steps[
"contact"][
"text"] = $this->lng->txt(
"setup_process_step_contact");
1882 $steps[
"proxy"][
"text"] = $this->lng->txt(
"setup_process_step_proxy");
1883 $steps[
"nic"][
"text"] = $this->lng->txt(
"setup_process_step_nic");
1884 $steps[
"finish"][
"text"] = $this->lng->txt(
"setup_process_step_finish");
1886 $stpl =
new ilTemplate(
"tpl.process_panel.html",
true,
true,
"setup");
1890 foreach ($steps as
$key => $val) {
1891 $stpl->setCurrentBlock(
"menu_row");
1892 $stpl->setVariable(
"TXT_STEP", $this->lng->txt(
"step") .
" " . $num .
": ");
1893 $stpl->setVariable(
"TXT_ACTION", $val[
"text"]);
1894 $stpl->setVariable(
"IMG_ARROW",
"spacer.png");
1896 if ($this->cmd ==
$key and isset($this->cmd)) {
1897 $stpl->setVariable(
"HIGHLIGHT",
" style=\"font-weight:bold;\"");
1900 $status = ($val[
"status"]) ? $OK :
"";
1902 $stpl->setVariable(
"TXT_STATUS", $status);
1903 $stpl->parseCurrentBlock();
1905 $checklist->addEntry(
1906 $num .
". " . $val[
"text"],
1910 ($this->cmd ==
$key and isset($this->cmd)),
1917 $stpl->setVariable(
"TXT_SETUP_PROCESS_STATUS", $this->lng->txt(
"setup_process_status"));
1919 $this->tpl->setVariable(
"PROCESS_MENU", $checklist->getHTML());
1927 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1929 $checklist->setHeading($this->lng->txt(
"overall_status"));
1931 $OK =
"<font color=\"green\"><strong>OK</strong></font>";
1935 $this->tpl->setVariable(
"TXT_OVERALL_STATUS", $this->lng->txt(
"overall_status"));
1937 if ($this->setup->getClient()->status) {
1938 foreach ($this->setup->getClient()->status as
$key => $val) {
1939 $status = ($val[
"status"]) ? $OK :
" ";
1948 $checklist->addEntry(
1949 $this->lng->txt(
"step_" . $key),
1958 $this->tpl->setVariable(
"STATUS_PANEL", $checklist->getHTML());
1968 switch ($this->display_mode) {
1970 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientview.html",
"setup");
1972 include
"./setup/include/inc.client_tabs.php";
1973 $client_name = ($this->setup->getClient()->getName()) ? $this->setup->getClient()->getName() : $this->lng->txt(
"no_client_name");
1974 $this->tpl->setVariable(
"TXT_HEADER", $client_name .
" (" . $this->lng->txt(
"client_id") .
": " . $this->setup->getClient()->getId() .
")");
1978 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientsetup.html",
"setup");
1979 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($a_title));
1983 $this->
displayError($this->lng->txt(
"unknown_display_mode"));
1997 $sub_tab_html = $this->tabs->getSubTabHTML();
1998 if ($sub_tab_html !=
"") {
1999 $this->tpl->setVariable(
"SUBTABS", $sub_tab_html);
2009 switch ($this->display_mode) {
2025 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientsetup.html",
"setup");
2027 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_first_client"));
2028 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"setup_first_client"));
2032 $this->setButtonNext(
"ini");
2049 if ($this->setup->getClient()->getDBSetup()->isDatabaseInstalled()) {
2050 $this->setDbSubTabs(
"db");
2052 $ilDB = $this->setup->getClient()->getDB();
2053 $this->lng->setDbHandler($ilDB);
2054 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
2056 $db_status = $dbupdate->getDBVersionStatus();
2057 $hotfix_available = $dbupdate->hotfixAvailable();
2058 $custom_updates_available = $dbupdate->customUpdatesAvailable();
2059 $this->
initClientDbForm(
false, $dbupdate, $db_status, $hotfix_available, $custom_updates_available);
2061 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
2064 $this->setButtonNext(
"lang");
2067 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_db") .
"<br />" .
2068 "<p><code>CREATE DATABASE <your_db> CHARACTER SET utf8 COLLATE <your_collation></code></p>" .
2069 "<p><b>" . $this->lng->txt(
"info_text_db2") .
"</b></p><br/>");
2073 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
2074 $this->setButtonPrev(
"ini");
2086 $tabs =
new ilTemplate(
"tpl.tabs.html",
true,
true,
"Services/UIComponent/Tabs");
2088 $tabs->setCurrentBlock(
"tab");
2089 $tabs->setVariable(
"TAB_TYPE", !$edit?
"active" :
"");
2090 $tabs->setVariable(
"TAB_TEXT", $this->lng->txt(
'overview'));
2091 $tabs->setVariable(
"TAB_LINK",
"setup.php?cmd=background_tasks");
2092 $tabs->parseCurrentBlock();
2094 $tabs->setCurrentBlock(
"tab");
2095 $tabs->setVariable(
"TAB_TYPE", $edit?
"active" :
"");
2096 $tabs->setVariable(
"TAB_TEXT", $this->lng->txt(
'settings'));
2097 $tabs->setVariable(
"TAB_LINK",
"setup.php?cmd=edit_background_tasks");
2098 $tabs->parseCurrentBlock();
2103 protected function displayCache()
2105 require_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
2106 require_once(
'Services/GlobalCache/classes/class.ilGlobalCache.php');
2107 require_once(
'./Services/GlobalCache/classes/Settings/class.ilGlobalCacheSettings.php');
2114 $ilGlobalCacheSettings->readFromIniFile($this->setup->getClient()->ini);
2117 $cache_form->setTitle($this->lng->txt(
'global_cache_configuration'));
2118 $cache_form->addCommandButton(
'saveCache', $this->lng->txt(
'save'));
2119 $cache_form->setFormAction(
'setup.php?cmd=gateway');
2121 $some_inactive =
false;
2123 $service_type =
new ilRadioGroupInputGUI($this->lng->txt(
'global_cache_service_type'),
'global_cache_service_type');
2126 $service_type->addOption($option);
2129 $option =
new ilRadioOption($this->lng->txt(
'global_cache_service_type_' . $type->getServiceType()), $type->getServiceType());
2130 $option->
setInfo($this->lng->txt(
'global_cache_install_info_' . $type->getServiceType()));
2131 if (!$type->isCacheServiceInstallable()) {
2133 $message .= $this->lng->txt(
'global_cache_service_type_' . $type->getServiceType()) .
': ' . $type->getInstallationFailureReason()
2135 $some_inactive =
true;
2137 $service_type->addOption($option);
2140 if ($some_inactive) {
2145 $service_type->setValue($ilGlobalCacheSettings->isActive() ? $ilGlobalCacheSettings->getService() : -1);
2146 $cache_form->addItem($service_type);
2147 if ($ilGlobalCacheSettings->isActive()) {
2149 $h->setTitle($this->lng->txt(
'cache_activated_components'));
2150 $cache_form->addItem(
$h);
2153 $cc =
new ilCheckboxInputGUI($this->lng->txt(
'cache_activate_' . $comp),
'activate[' . $comp .
']');
2154 $cc->
setChecked($ilGlobalCacheSettings->isComponentActivated($comp));
2155 $cache_form->addItem($cc);
2158 $cc =
new ilCheckboxInputGUI($this->lng->txt(
'cache_activate_all'),
'activate[all]');
2159 $cc->
setChecked($ilGlobalCacheSettings->areAllComponentActivated());
2160 $cache_form->addItem($cc);
2164 require_once(
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php');
2165 require_once(
'./Services/UIComponent/Button/classes/class.ilLinkButton.php');
2167 if ($ilGlobalCacheSettings->isActive()) {
2169 $b->setCaption(
'cache_flush');
2170 $b->setUrl(
'setup.php?cmd=flushCache');
2171 $ilToolbarGUI->addButtonInstance($b);
2175 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerTableGUI.php');
2177 $b->setCaption(
'memcache_add');
2178 $b->setUrl(
'setup.php?cmd=addMemcacheServer');
2179 $ilToolbarGUI->addButtonInstance($b);
2181 $table_html = $ilMemcacheServerTableGUI->getHTML();
2184 $this->tpl->setVariable(
'SETUP_CONTENT', $ilToolbarGUI->getHTML() . $cache_form->getHTML() . $table_html);
2190 require_once(
'Services/GlobalCache/classes/class.ilGlobalCache.php');
2191 ilGlobalCache::flushAll();
2198 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2201 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2207 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2210 $ilMemcacheServerFormGUI->setValuesByPost();
2211 if ($ilMemcacheServerFormGUI->saveObject()) {
2214 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2220 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2223 $ilMemcacheServerFormGUI->fillForm();
2224 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2230 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2234 $ilMemcacheServerFormGUI->setValuesByPost();
2235 if ($ilMemcacheServerFormGUI->saveObject()) {
2238 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2244 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServer.php');
2245 $ilMemcacheServer = ilMemcacheServer::find(
$_GET[
'mcsid']);
2246 $ilMemcacheServer->delete();
2251 public function saveCache()
2256 require_once(
'Services/GlobalCache/classes/class.ilGlobalCache.php');
2257 require_once(
'./Services/GlobalCache/classes/Settings/class.ilGlobalCacheSettings.php');
2258 ilGlobalCache::flushAll();
2259 $ini = $this->setup->getClient()->ini;
2262 $ilGlobalCacheSettings->readFromIniFile(
$ini);
2263 $service_type =
$_POST[
'global_cache_service_type'];
2264 $ilGlobalCacheSettings->setActive(($service_type >= 0) ?
true :
false);
2265 $ilGlobalCacheSettings->setService($service_type);
2266 $ilGlobalCacheSettings->resetActivatedComponents();
2267 if (is_array(
$_POST[
'activate']) && count(
$_POST[
'activate']) > 0) {
2268 foreach (
$_POST[
'activate'] as $comp => $a) {
2269 if ($comp ==
'all') {
2270 $ilGlobalCacheSettings->activateAll();
2273 $ilGlobalCacheSettings->addActivatedComponent($comp);
2277 $ilGlobalCacheSettings->writeToIniFile(
$ini);
2279 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'),
true);
2296 if (!$this->setup->getClient()->db_installed) {
2300 $this->setDbSubTabs(
"repl");
2302 if (!$a_from_save) {
2303 $ilDB = $this->setup->getClient()->db;
2304 $this->lng->setDbHandler($ilDB);
2309 if (!$a_from_save) {
2313 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
2327 $client = $this->setup->getClient();
2329 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2334 $ne->
setValue($lng->txt(
"db_" . $ilDB->getDbType()));
2335 $this->form->addItem($ne);
2340 $this->form->addItem($act);
2345 $ti->setMaxLength(120);
2346 $ti->setRequired(
true);
2347 $act->addSubItem($ti);
2352 $ti->setRequired(
true);
2353 $ti->setMaxLength(40);
2354 $act->addSubItem($ti);
2359 $ti->setMaxLength(40);
2360 $ti->setRequired(
true);
2361 $act->addSubItem($ti);
2366 $ti->setMaxLength(8);
2367 $act->addSubItem($ti);
2370 $set_pw =
new ilCheckboxInputGUI($this->lng->txt(
"db_set_password"),
"set_slave_password");
2376 $set_pw->addSubItem($ti);
2378 $this->form->addCommandButton(
"saveDbSlave", $lng->txt(
"save"));
2380 $this->form->setTitle($lng->txt(
"db_slave_settings"));
2381 $this->form->setFormAction(
"setup.php?cmd=gateway");
2391 $client = $this->setup->getClient();
2393 $ilDB = $this->setup->getClient()->db;
2394 $this->lng->setDbHandler($ilDB);
2397 if ($this->form->checkInput()) {
2398 $client->setDbSlaveActive($this->form->getInput(
"slave_active"));
2399 if ($this->form->getInput(
"slave_active")) {
2400 $client->setDbSlaveHost($this->form->getInput(
"slave_host"));
2401 $client->setDbSlaveUser($this->form->getInput(
"slave_user"));
2402 $client->setDbSlavePort($this->form->getInput(
"slave_port"));
2403 $client->setDbSlaveName($this->form->getInput(
"slave_name"));
2404 if ($this->form->getInput(
"set_slave_password")) {
2405 $client->setDbSlavePass($this->form->getInput(
"slave_pass"));
2410 ilUtil::sendSuccess($lng->txt(
"saved_successfully"),
true);
2413 $this->form->setValuesByPost();
2429 if ($ilDB->getDbType() ==
"mysql") {
2430 $this->tabs->addSubTab(
"db", $this->lng->txt(
"db_master"),
"setup.php?client_id=" . $this->client_id .
"&cmd=db");
2431 $this->tabs->addSubTab(
"repl", $this->lng->txt(
"db_slave"),
"setup.php?client_id=" . $this->client_id .
"&cmd=dbslave");
2434 $this->tabs->activateSubTab($a_subtab_id);
2442 public function initClientDbForm($a_install =
true, $dbupdate = null, $db_status =
false, $hotfix_available =
false, $custom_updates_available =
false)
2446 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2451 $this->form->addItem($ne);
2454 if ($this->setup->getClient()->getDBSetup()->isDatabaseInstalled()
2455 && in_array($this->setup->getClient()->getDbType(), array(
2461 $ilDB = $this->setup->getClient()->db;
2462 $ne->setValue($ilDB->getDBVersion());
2463 $this->form->addItem($ne);
2468 $this->form->addItem($ne);
2472 $this->form->addItem($ne);
2476 $this->form->addItem($ne);
2480 $this->form->addItem($ne);
2488 $collations = array(
2494 "utf8_icelandic_ci",
2496 "utf8_lithuanian_ci",
2502 "utf8_slovenian_ci",
2508 foreach ($collations as $collation) {
2513 $si->setInfo($this->lng->txt(
"info_text_db_collation2") .
" " .
2514 "<a target=\"_new\" href=\"http://dev.mysql.com/doc/mysql/en/charset-unicode-sets.html\">" .
2515 " MySQL Reference Manual :: 10.11.1 Unicode Character Sets</a>");
2516 $cb->addSubItem(
$si);
2518 $this->form->addItem($cb);
2522 $this->form->addCommandButton(
"installDatabase", $lng->txt(
"database_install"));
2524 $ilDB = $this->setup->getClient()->db;
2525 $this->lng->setDbHandler(
$ilDB);
2530 $ne->
setValue($dbupdate->currentVersion);
2531 $this->form->addItem($ne);
2535 $ne->
setValue($dbupdate->fileVersion);
2536 $this->form->addItem($ne);
2538 if (!$db_status = $dbupdate->getDBVersionStatus()) {
2541 for (
$i = $dbupdate->currentVersion + 1; $i <= $dbupdate->fileVersion;
$i++) {
2547 $si->setInfo($lng->txt(
"next_update_break_info"));
2548 $this->form->addItem(
$si);
2551 if ($dbupdate->getRunningStatus() > 0) {
2552 ilUtil::sendFailure($this->lng->txt(
"db_update_interrupted") .
" (Step " . $dbupdate->getRunningStatus() .
") <br /><br />" .
2553 $this->lng->txt(
"db_update_interrupted_avoid"));
2557 $this->form->addCommandButton(
"updateDatabase", $lng->txt(
"database_update"));
2558 $this->form->addCommandButton(
"showUpdateSteps", $lng->txt(
"show_update_steps"));
2559 } elseif ($hotfix_available) {
2562 $ne->
setValue($dbupdate->getHotfixCurrentVersion());
2563 $this->form->addItem($ne);
2567 $ne->
setValue($dbupdate->getHotfixFileVersion());
2568 $this->form->addItem($ne);
2570 $this->form->addCommandButton(
"applyHotfix", $lng->txt(
"apply_hotfixes"));
2571 $this->form->addCommandButton(
"showHotfixSteps", $lng->txt(
"show_update_steps"));
2573 } elseif ($custom_updates_available) {
2576 $ne->
setValue($dbupdate->getCustomUpdatesCurrentVersion());
2577 $this->form->addItem($ne);
2581 $ne->
setValue($dbupdate->getCustomUpdatesFileVersion());
2582 $this->form->addItem($ne);
2584 $this->form->addCommandButton(
"applyCustomUpdates", $lng->txt(
"apply_custom_updates"));
2587 if ($dbupdate->getHotfixFileVersion() > 0) {
2590 $ne->
setValue($dbupdate->getHotfixCurrentVersion());
2591 $this->form->addItem($ne);
2595 $ne->
setValue($dbupdate->getHotfixFileVersion());
2596 $this->form->addItem($ne);
2598 if ($dbupdate->getCustomUpdatesFileVersion() > 0) {
2601 $ne->
setValue($dbupdate->getCustomUpdatesCurrentVersion());
2602 $this->form->addItem($ne);
2606 $ne->
setValue($dbupdate->getCustomUpdatesFileVersion());
2607 $this->form->addItem($ne);
2609 ilUtil::sendSuccess($this->lng->txt(
"database_is_uptodate"));
2613 $this->form->setTitle($lng->txt(
"database"));
2614 $this->form->setFormAction(
"setup.php?cmd=gateway");
2624 $values[
"db_host"] = $this->setup->getClient()->getDbHost();
2625 $values[
"db_name"] = $this->setup->getClient()->getDbName();
2626 $values[
"db_user"] = $this->setup->getClient()->getDbUser();
2627 $values[
"db_port"] = $this->setup->getClient()->getDbPort();
2629 if (is_object($dbupdate)) {
2630 $values[
"update_break"] = $dbupdate->fileVersion;
2631 if (($dbupdate->fileVersion - $dbupdate->currentVersion) >= 200) {
2632 $values[
"update_break"] = $dbupdate->currentVersion + 200 -
2633 ($dbupdate->currentVersion % 100);
2637 $this->form->setValuesByArray(
$values);
2652 if (!$this->setup->getClient()->getDBSetup()->isDatabaseExisting()) {
2653 if (
$_POST[
"chk_db_create"]) {
2654 if (!$this->setup->createDatabase(
$_POST[
"collation"])) {
2655 echo "installation failed";
2664 if (!$this->setup->installDatabase()) {
2667 ilUtil::sendSuccess($this->lng->txt(
"database_installed"),
true);
2683 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
2684 include_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
2685 include_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
2686 include_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
2687 include_once
"./Services/Tree/classes/class.ilTree.php";
2688 include_once
"./Services/Xml/classes/class.ilSaxParser.php";
2689 include_once
"./Services/Object/classes/class.ilObjectDefinition.php";
2693 $ilDB = $this->setup->getClient()->db;
2694 $this->lng->setDbHandler(
$ilDB);
2700 if ($dbupdate->updateMsg ==
"no_changes") {
2701 $message = $this->lng->txt(
"no_changes") .
". " . $this->lng->txt(
"database_is_uptodate");
2704 foreach ($dbupdate->updateMsg as
$row) {
2705 if ($row[
"msg"] ==
"update_applied") {
2706 $a_message .= $sep . $row[
"nr"];
2709 $e_message .=
"<br/>" . $this->lng->txt($row[
"msg"]) .
": " . $row[
"nr"];
2712 if ($a_message !=
"") {
2713 $a_message = $this->lng->txt(
"update_applied") .
": " . $a_message;
2749 if ($this->setup->getClient()->db_installed) {
2750 $ilDB = $this->setup->getClient()->db;
2751 $this->lng->setDbHandler(
$ilDB);
2753 $db_status = $dbupdate->getDBVersionStatus();
2754 $hotfix_available = $dbupdate->hotfixAvailable();
2755 $custom_updates_available = $dbupdate->customUpdatesAvailable();
2759 $ntpl =
new ilTemplate(
"tpl.setup_steps.html",
true,
true,
"setup");
2761 $ntpl->setVariable(
"CONTENT", $dbupdate->getHotfixSteps());
2763 $ntpl->setVariable(
"CONTENT", $dbupdate->getUpdateSteps(
$_POST[
"update_break"]));
2765 $ntpl->setVariable(
"BACK", $this->lng->txt(
"back"));
2766 $ntpl->setVariable(
"HREF_BACK",
"./setup.php?client_id=&cmd=db");
2767 $this->tpl->setVariable(
"SETUP_CONTENT", $ntpl->get());
2783 $ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);
2785 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
2786 include_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
2787 include_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
2788 include_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
2789 include_once
"./Services/Tree/classes/class.ilTree.php";
2790 include_once
"./Services/Xml/classes/class.ilSaxParser.php";
2791 include_once
"./Services/Object/classes/class.ilObjectDefinition.php";
2794 $ilDB = $this->setup->getClient()->db;
2795 $this->lng->setDbHandler(
$ilDB);
2801 if ($dbupdate->updateMsg ==
"no_changes") {
2802 $message = $this->lng->txt(
"no_changes") .
". " . $this->lng->txt(
"database_is_uptodate");
2805 foreach ($dbupdate->updateMsg as
$row) {
2806 if ($row[
"msg"] ==
"update_applied") {
2807 $a_message .= $sep . $row[
"nr"];
2810 $e_message .=
"<br/>" . $this->lng->txt($row[
"msg"]) .
": " . $row[
"nr"];
2813 if ($a_message !=
"") {
2814 $a_message = $this->lng->txt(
"update_applied") .
": " . $a_message;
2831 require_once(
'Services/Authentication/classes/class.ilSessionControl.php');
2835 if (!$this->setup->getClient()->db_installed) {
2837 $message =
"No database found! Please install database first.";
2844 $settings = array();
2846 foreach ($setting_fields as $field) {
2847 if ($field ==
'session_allow_client_maintenance') {
2848 if (isset(
$_POST[$field])) {
2856 $settings[$field] =
$_POST[$field];
2864 $this->setup->setSessionSettings($settings);
2867 $settings = $this->setup->getSessionSettings();
2869 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2872 include_once
'Services/Authentication/classes/class.ilSession.php';
2883 $ssettings->addOption($fixed);
2890 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_max_session_count'),
"session_max_count");
2891 $ti->
setInfo($this->lng->txt(
'sess_max_session_count_info'));
2892 $ti->setMaxLength(5);
2894 $ti->
setValue($settings[
'session_max_count']);
2895 $ldsh->addSubItem($ti);
2900 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_min_session_idle'),
"session_min_idle");
2901 $ti->
setInfo($this->lng->txt(
'sess_min_session_idle_info'));
2902 $ti->setMaxLength(5);
2904 $ti->
setValue($settings[
'session_min_idle']);
2905 $ldsh->addSubItem($ti);
2910 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_max_session_idle'),
"session_max_idle");
2911 $ti->
setInfo($this->lng->txt(
'sess_max_session_idle_info'));
2912 $ti->setMaxLength(5);
2914 $ti->
setValue($settings[
'session_max_idle']);
2915 $ldsh->addSubItem($ti);
2919 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_max_session_idle_after_first_request'),
"session_max_idle_after_first_request");
2920 $ti->
setInfo($this->lng->txt(
'sess_max_session_idle_after_first_request_info'));
2921 $ti->setMaxLength(5);
2923 $ti->
setValue($settings[
'session_max_idle_after_first_request']);
2924 $ldsh->addSubItem($ti);
2927 $ssettings->addOption($ldsh);
2929 $form->addItem($ssettings);
2933 $chkb =
new ilCheckboxInputGUI($this->lng->txt(
'sess_allow_client_maintenance'),
"session_allow_client_maintenance");
2934 $chkb->
setInfo($this->lng->txt(
'sess_allow_client_maintenance_info'));
2935 $chkb->setChecked($settings[
'session_allow_client_maintenance'] ?
true :
false);
2936 $form->addItem($chkb);
2940 $form->addCommandButton(
"sess", $this->lng->txt(
'save'));
2942 $form->setTitle($this->lng->txt(
"sess_sessions"));
2943 $form->setFormAction(
'setup.php?client_id=' . $this->client_id .
'&cmd=sess');
2945 $this->tpl->setVariable(
"TXT_SETUP_TITLE", ucfirst(trim($this->lng->txt(
'sess_sessions'))));
2946 $this->tpl->setVariable(
"TXT_INFO",
'');
2947 $this->tpl->setVariable(
"SETUP_CONTENT",
$form->getHTML());
2970 if (!$this->setup->getClient()->db_installed) {
2972 $message =
"No database found! Please install database first.";
2976 include_once(
"./setup/classes/class.ilSetupLanguageTableGUI.php");
2978 $this->tpl->setVariable(
"SETUP_CONTENT",
$tab->getHTML());
2980 $this->tpl->setVariable(
"TXT_SETUP_TITLE", ucfirst(trim($this->lng->txt(
"setup_languages"))));
2981 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_lang"));
2983 $installed_langs = $this->lng->getInstalledLanguages();
2984 $lang_count = count($installed_langs);
2985 if ($lang_count > 0) {
2986 $this->setup->getClient()->status[
"lang"][
"status"] =
true;
2987 $this->setup->getClient()->status[
"lang"][
"comment"] = $lang_count .
" " . $this->lng->txt(
"languages_installed");
2989 $this->setup->getClient()->status[
"lang"][
"status"] =
false;
2990 $this->setup->getClient()->status[
"lang"][
"comment"] = $this->lng->txt(
"lang_none_installed");
2993 $this->setButtonPrev(
"lang");
2995 if ($lang_count > 0) {
2996 $this->setButtonNext(
"contact");
3010 if (empty(
$_POST[
"form"][
"lang_id"])) {
3015 if (!in_array(
$_POST[
"form"][
"lang_default"],
$_POST[
"form"][
"lang_id"])) {
3020 $result = $this->lng->installLanguages(
$_POST[
"form"][
"lang_id"],
$_POST[
"form"][
"lang_local"]);
3027 $list .= $this->lng->txt(
"lang_" . $lang_key);
3029 if ($count >
$key + 1) {
3035 $this->setup->getClient()->setDefaultLanguage(
$_POST[
"form"][
"lang_default"]);
3036 $message = $this->lng->txt(
"languages_installed");
3039 $message .=
"<br/>(" . $this->lng->txt(
"langs_not_valid_not_installed") .
": " .
$list .
")";
3055 $settings = $this->setup->getClient()->getAllSettings();
3057 if (!$a_omit_init) {
3061 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
3062 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_contact"));
3063 $this->setButtonPrev(
"lang");
3065 $check = $this->setup->checkClientContact($this->setup->client);
3067 $this->setup->getClient()->status[
"contact"][
"status"] = $check[
"status"];
3068 $this->setup->getClient()->status[
"contact"][
"comment"] = $check[
"comment"];
3070 if ($check[
"status"]) {
3071 $this->setButtonNext(
"proxy");
3086 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3093 $ti->setRequired(
true);
3094 $this->form->addItem($ti);
3100 $this->form->addItem($ti);
3103 $ti =
new ilTextInputGUI($lng->txt(
"client_institution"),
"inst_institution");
3106 $this->form->addItem($ti);
3110 $sh->setTitle($lng->txt(
"contact_data"));
3111 $this->form->addItem($sh);
3114 $ti =
new ilTextInputGUI($lng->txt(
"firstname"),
"admin_firstname");
3117 $ti->setRequired(
true);
3118 $this->form->addItem($ti);
3121 $ti =
new ilTextInputGUI($lng->txt(
"lastname"),
"admin_lastname");
3124 $ti->setRequired(
true);
3125 $this->form->addItem($ti);
3128 "title" => array(
"max" => 64,
"size" => 30),
3129 "position" => array(
"max" => 64,
"size" => 30),
3130 "institution" => array(
"max" => 200,
"size" => 30),
3131 "street" => array(
"max" => 64,
"size" => 30),
3132 "zipcode" => array(
"max" => 10,
"size" => 5),
3133 "city" => array(
"max" => 64,
"size" => 30),
3134 "country" => array(
"max" => 64,
"size" => 30),
3135 "phone" => array(
"max" => 64,
"size" => 30)
3137 foreach ($fs as
$f => $op) {
3141 $ti->setSize($op[
"size"]);
3142 $ti->setInfo($lng->txt(
""));
3143 $this->form->addItem($ti);
3147 $ti =
new ilEmailInputGUI($lng->txt(
"email"),
"admin_email");
3148 $ti->setRequired(
true);
3149 $ti->allowRFC822(
true);
3150 $this->form->addItem($ti);
3164 $this->form->addCommandButton(
"saveContact", $lng->txt(
"save"));
3166 $this->form->setTitle($lng->txt(
"client_data"));
3167 $this->form->setFormAction(
"setup.php?cmd=gateway");
3175 $settings = $this->setup->getClient()->getAllSettings();
3179 $values[
"inst_name"] = ($this->setup->getClient()->getName())
3180 ? $this->setup->getClient()->getName()
3181 : $this->setup->getClient()->getId();
3182 $values[
"inst_info"] = $this->setup->getClient()->getDescription();
3184 $this->form->setValuesByArray(
$values);
3195 if ($this->form->checkInput()) {
3196 $this->setup->getClient()->setSetting(
"admin_firstname",
$_POST[
"admin_firstname"]);
3197 $this->setup->getClient()->setSetting(
"admin_lastname",
$_POST[
"admin_lastname"]);
3198 $this->setup->getClient()->setSetting(
"admin_title",
$_POST[
"admin_title"]);
3199 $this->setup->getClient()->setSetting(
"admin_position",
$_POST[
"admin_position"]);
3200 $this->setup->getClient()->setSetting(
"admin_institution",
$_POST[
"admin_institution"]);
3201 $this->setup->getClient()->setSetting(
"admin_street",
$_POST[
"admin_street"]);
3202 $this->setup->getClient()->setSetting(
"admin_zipcode",
$_POST[
"admin_zipcode"]);
3203 $this->setup->getClient()->setSetting(
"admin_city",
$_POST[
"admin_city"]);
3204 $this->setup->getClient()->setSetting(
"admin_country",
$_POST[
"admin_country"]);
3205 $this->setup->getClient()->setSetting(
"admin_phone",
$_POST[
"admin_phone"]);
3206 $this->setup->getClient()->setSetting(
"admin_email",
$_POST[
"admin_email"]);
3207 $this->setup->getClient()->setSetting(
"inst_institution",
$_POST[
"inst_institution"]);
3208 $this->setup->getClient()->setSetting(
"inst_name",
$_POST[
"inst_name"]);
3213 $this->setup->getClient()->setName(
$_POST[
"inst_name"]);
3214 $this->setup->getClient()->setDescription(
$_POST[
"inst_info"]);
3215 $this->setup->getClient()->ini->write();
3217 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
3221 $this->form->setValuesByPost();
3235 $settings = $this->setup->getClient()->getAllSettings();
3236 $nic_key = $this->setup->getClient()->getNICkey();
3239 $settings = $this->setup->getClient()->getAllSettings();
3241 if ($settings[
"nic_enabled"] ==
"1" && $settings[
"inst_id"] > 0) {
3242 $this->no_second_nav =
true;
3243 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_nic3") .
" " . $settings[
"inst_id"] .
".");
3246 $settings = $this->setup->getClient()->getAllSettings();
3248 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_nic"));
3249 if (!$a_omit_init) {
3253 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
3255 if (isset($settings[
"nic_enabled"])) {
3256 $this->setup->getClient()->status[
"nic"][
"status"] =
true;
3260 $this->setButtonPrev(
"proxy");
3262 if ($this->setup->getClient()->status[
"nic"][
"status"]) {
3263 $this->setButtonNext(
"finish",
"finish");
3278 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3285 $radg->addOption($op1);
3286 $op1 =
new ilRadioOption($lng->txt(
"nic_reg_disable"), 0, $lng->txt(
"nic_reg_disable_info"));
3287 $radg->addOption($op1);
3288 $this->form->addItem($radg);
3290 $this->form->addCommandButton(
"saveRegistration", $lng->txt(
"save"));
3291 $this->form->setFormAction(
"setup.php?cmd=gateway");
3299 $settings = $this->setup->getClient()->getAllSettings();
3300 $nic_key = $this->setup->getClient()->getNICkey();
3305 if (!isset($settings[
"nic_enabled"])
or $settings[
"nic_enabled"] ==
"1") {
3316 $this->form->setValuesByArray(
$values);
3327 if ($this->form->checkInput()) {
3329 if (
$_POST[
"register"] == 1) {
3331 $this->setup->getClient()->updateNIC($this->setup->ilias_nic_server);
3334 if (empty($this->setup->getClient()->nic_status[2])) {
3335 $this->setup->getClient()->setSetting(
"nic_enabled",
"-1");
3339 $this->setup->getClient()->setSetting(
"inst_id", $this->setup->getClient()->nic_status[2]);
3340 $this->setup->getClient()->setSetting(
"nic_enabled",
"1");
3341 $this->setup->getClient()->status[
"nic"][
"status"] =
true;
3342 ilUtil::sendSuccess($this->lng->txt(
"nic_reg_enabled"),
true);
3364 $this->setup->getClient()->setSetting(
"inst_id",
"0");
3365 $this->setup->getClient()->setSetting(
"nic_enabled",
"0");
3366 ilUtil::sendSuccess($this->lng->txt(
"nic_reg_disabled"),
true);
3371 $this->form->setValuesByPost();
3394 $this->tpl->setVariable(
3396 $ctrl_structure_form->getHTML() .
"<br />" .
3397 $settings_type_form->getHTML() .
'<br />' .
3398 $mp_ns_form->getHTML()
3404 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3407 $form->setId(
'tree_impl');
3408 $form->setTitle($this->lng->txt(
'tree_implementation'));
3409 $form->setFormAction(
'setup.php?cmd=gateway');
3413 #$options->setRequired(true); 3416 $type = ($set->get(
'main_tree_impl',
'ns') ==
'ns' ?
'ns' :
'mp');
3421 $ns =
new ilRadioOption($this->lng->txt(
'tree_implementation_ns'),
'ns');
3424 $mp =
new ilRadioOption($this->lng->txt(
'tree_implementation_mp'),
'mp');
3428 $form->addCommandButton(
'switchTree', $this->lng->txt(
'tree_implementation_switch_btn'));
3429 $form->setShowTopButtons(
false);
3437 $type = ($set->get(
'main_tree_impl',
'ns') ==
'ns' ?
'ns' :
'mp');
3441 include_once
'./Services/Tree/classes/class.ilMaterializedPathTree.php';
3444 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'lft'));
3445 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'path'));
3446 $GLOBALS[
'ilDB']->addIndex(
'tree', array(
'path'),
'i4');
3448 $set->set(
'main_tree_impl',
'mp');
3450 include_once
'./Services/Tree/classes/class.ilTree.php';
3452 $GLOBALS[
"DIC"][
"ilSetting"] =
function (
$c) {
3458 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'lft'));
3459 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'path'));
3460 $GLOBALS[
'ilDB']->addIndex(
'tree', array(
'lft'),
'i4');
3462 $set->set(
'main_tree_impl',
'ns');
3476 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3479 $form->setId(
"control_structure");
3480 $form->setTitle($this->lng->txt(
"ctrl_structure"));
3481 $form->setFormAction(
"setup.php?cmd=gateway");
3483 $ilDB = $this->setup->getClient()->db;
3484 $cset =
$ilDB->query(
"SELECT count(*) as cnt FROM ctrl_calls");
3485 $crec =
$ilDB->fetchAssoc($cset);
3488 if ($crec[
"cnt"] == 0) {
3489 $item->
setInfo($this->lng->txt(
"ctrl_missing_desc"));
3491 $item->setInfo($this->lng->txt(
"ctrl_structure_desc"));
3493 $form->addItem($item);
3495 $form->addCommandButton(
"reloadStructure", $this->lng->txt(
"reload"));
3507 if (!$this->setup->getClient()->db_installed) {
3514 $GLOBALS[
"ilDB"] = $this->setup->getClient()->getDB();
3520 require_once
"./setup/classes/class.ilModuleReader.php";
3521 require_once
"./setup/classes/class.ilServiceReader.php";
3522 require_once
"./setup/classes/class.ilCtrlStructureReader.php";
3524 require_once
"./Services/Component/classes/class.ilModule.php";
3525 require_once
"./Services/Component/classes/class.ilService.php";
3529 $ilCtrlStructureReader->readStructure(
true);
3534 foreach ($modules as
$module) {
3536 ILIAS_ABSOLUTE_PATH .
"/Modules/" . $module[
"subdir"] .
"/module.xml",
3547 foreach ($services as $service) {
3549 ILIAS_ABSOLUTE_PATH .
"/Services/" . $service[
"subdir"] .
"/service.xml",
3569 include_once(
"./Services/Administration/classes/class.ilSetting.php");
3572 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3575 $form->setId(
"settings_type");
3576 $form->setTitle($this->lng->txt(
"settings_type"));
3577 $form->setFormAction(
"setup.php?cmd=gateway");
3582 if (
$type ==
"clob") {
3583 $item->setInfo($this->lng->txt(
'settings_info_clob'));
3584 $form->addCommandButton(
"showLongerSettings", $this->lng->txt(
"settings_show_longer"));
3585 $form->addCommandButton(
"changeSettingsType", $this->lng->txt(
"settings_change_text"));
3587 $item->setInfo($this->lng->txt(
'settings_info_text'));
3588 $form->addCommandButton(
"changeSettingsType", $this->lng->txt(
"settings_change_clob"));
3590 $form->addItem($item);
3592 if (is_array($this->longer_settings)) {
3595 if (count($this->longer_settings)) {
3596 foreach ($this->longer_settings as
$row) {
3597 $subitem =
new ilCustomInputGUI(sprintf($this->lng->txt(
'settings_key_info'), $row[
'module'], $row[
'keyword']));
3598 $subitem->setInfo($row[
'value']);
3599 $item->addSubItem($subitem);
3602 $item->setHTML($this->lng->txt(
'settings_no_longer_values'));
3604 $form->addItem($item);
3616 include_once(
"./Services/Administration/classes/class.ilSetting.php");
3619 if ($old_type ==
"clob") {
3621 if (count($longer_settings)) {
3622 $this->longer_settings = $longer_settings;
3645 include_once(
"./Services/Administration/classes/class.ilSetting.php");
3655 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
3656 $form = new \ilPropertyFormGUI();
3657 $form->setTitle($this->lng->txt(
'change_password'));
3659 $currentPassword = new \ilPasswordInputGUI($this->lng->txt(
'set_oldpasswd'),
'pass_old');
3660 $currentPassword->setDisableHtmlAutoComplete(
true);
3661 $currentPassword->setValidateAuthPost(
false);
3662 $currentPassword->setSkipSyntaxCheck(
true);
3663 $currentPassword->setRequired(
true);
3664 $currentPassword->setRetype(
false);
3665 $form->addItem($currentPassword);
3667 $newPassword = new \ilPasswordInputGUI($this->lng->txt(
'set_newpasswd'),
'pass');
3668 $newPassword->setDisableHtmlAutoComplete(
true);
3669 $newPassword->setValidateAuthPost(
false);
3670 $newPassword->setSkipSyntaxCheck(
true);
3671 $newPassword->setRequired(
true);
3672 $newPassword->setRetype(
true);
3673 $form->addItem($newPassword);
3675 $form->setFormAction(
'setup.php?cmd=gateway');
3676 $form->addCommandButton(
'savemasterpassword', $this->lng->txt(
'save'));
3688 $isValid =
$form->checkInput();
3689 $form->setValuesByPost();
3695 $cp =
$form->getInput(
'pass_old');
3696 $np =
$form->getInput(
'pass');
3698 if (!$this->setup->verifyMasterPassword($cp)) {
3703 if (!$this->setup->storeMasterPassword($np)) {
3718 if (null ===
$form) {
3722 $this->tpl->addBlockFile(
'CONTENT',
'content',
'tpl.std_layout.html',
'setup');
3723 $this->tpl->setVariable(
'TXT_HEADER', $this->lng->txt(
'password_new_master'));
3724 $this->tpl->setVariable(
'TXT_INFO', $this->lng->txt(
'info_text_password'));
3725 $this->tpl->setVariable(
'SETUP_CONTENT',
$form->getHTML());
3734 $this->no_second_nav =
true;
3737 $txt_info = $this->lng->txt(
"info_text_finish1") .
"<br /><br />" .
3738 "<p>" . $this->lng->txt(
"user") .
": <b>root</b><br />" .
3739 $this->lng->txt(
"password") .
": <b>homer</b></p>";
3740 $this->setButtonNext(
"login_new",
"login");
3742 $this->setup->getClient()->reconnect();
3745 $this->setup->getClient()->setSetting(
"setup_ok", 1);
3748 $this->setup->getClient()->status[
"finish"][
"status"] =
true;
3751 $txt_info = $this->lng->txt(
"info_text_finish2");
3756 $this->tpl->addBlockFile(
"SETUP_CONTENT",
"setup_content",
"tpl.clientsetup_finish.html",
"setup");
3757 $this->tpl->setVariable(
"TXT_INFO", $txt_info);
3759 $this->setButtonPrev(
"nic");
3773 if (
$_POST[
"form"][
"delete"]) {
3798 $msg = $this->setup->getClient()->delete(
$ini, $db,
$files);
3804 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_delete"));
3807 $this->tpl->addBlockFile(
"SETUP_CONTENT",
"setup_content",
"tpl.form_delete_client.html",
"setup");
3810 $this->tpl->setVariable(
"FORMACTION",
"setup.php?cmd=gateway");
3811 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"delete"));
3812 $this->tpl->setVariable(
"TXT_DELETE_CONFIRM", $this->lng->txt(
"delete_confirm"));
3813 $this->tpl->setVariable(
"TXT_DELETE_INFO", $this->lng->txt(
"delete_info"));
3825 if ($this->setup->getClient()->status[
"finish"][
"status"]) {
3826 $val = ($this->setup->getClient()->ini->readVariable(
"client",
"access")) ?
"0" :
true;
3827 $this->setup->getClient()->ini->setVariable(
"client",
"access", $val);
3828 $this->setup->getClient()->ini->write();
3829 $message =
"client_access_mode_changed";
3831 $message =
"client_setup_not_finished";
3852 $status = $this->setup->getStatus(
$client);
3854 if ($status[
"finish"][
"status"]) {
3855 $this->setup->ini->setVariable(
"clients",
"default",
$client->getId());
3856 $this->setup->ini->write();
3857 $message =
"default_client_changed";
3859 $message =
"client_setup_not_finished";
3874 foreach ($this->setup->getClient()->status as
$key => $val) {
3875 if ($key !=
"finish" and $key !=
"access") {
3876 if ($val[
"status"] !=
true) {
3883 $clientlist =
new ilClientList($this->setup->db_connections);
3885 $list = $clientlist->getClients();
3887 if (count(
$list) == 1) {
3888 $this->setup->ini->setVariable(
"clients",
"default", $this->setup->getClient()->getId());
3889 $this->setup->ini->write();
3891 $this->setup->getClient()->ini->setVariable(
"client",
"access", 1);
3892 $this->setup->getClient()->ini->write();
3903 if (!$this->setup->getClient()->status[
"db"][
"status"]) {
3907 } elseif (!$this->setup->getClient()->status[
"lang"][
"status"]) {
3908 $this->cmd =
"lang";
3911 } elseif (!$this->setup->getClient()->status[
"contact"][
"status"]) {
3912 $this->cmd =
"contact";
3915 } elseif (!$this->setup->getClient()->status[
'proxy'][
'status']) {
3916 $this->cmd =
"proxy";
3919 } elseif (!$this->setup->getClient()->status[
"nic"][
"status"]) {
3923 } elseif (!$this->setup->getClient()->status[
"finish"][
"status"]) {
3924 $this->cmd =
"finish";
3937 if ($this->setup->ini->readVariable(
"clients",
"list")) {
3938 $this->setup->ini->setVariable(
"clients",
"list",
"0");
3939 $this->setup->ini->write();
3942 $this->setup->ini->setVariable(
"clients",
"list",
"1");
3943 $this->setup->ini->write();
3958 $ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);
3960 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
3961 include_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
3962 include_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
3963 include_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
3964 include_once
"./Services/Tree/classes/class.ilTree.php";
3965 include_once
"./Services/Xml/classes/class.ilSaxParser.php";
3966 include_once
"./Services/Object/classes/class.ilObjectDefinition.php";
3969 $ilDB = $this->setup->getClient()->db;
3970 $this->lng->setDbHandler(
$ilDB);
3977 if ($dbupdate->updateMsg ==
"no_changes") {
3978 $message = $this->lng->txt(
"no_changes") .
". " . $this->lng->txt(
"database_is_uptodate");
3981 foreach ($dbupdate->updateMsg as
$row) {
3982 if ($row[
"msg"] ==
"update_applied") {
3983 $a_message .= $sep . $row[
"nr"];
3986 $e_message .=
"<br/>" . $this->lng->txt($row[
"msg"]) .
": " . $row[
"nr"];
3989 if ($a_message !=
"") {
3990 $a_message = $this->lng->txt(
"update_applied") .
": " . $a_message;
4007 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
4010 $this->form->setId(
"clone_form");
4011 $this->form->setFormAction(
"setup.php?cmd=gateway");
4013 if ($this->setup->getClient()->status[
"access"][
"status"] ===
false and stripos($this->setup->getClient()->getName(),
"master") ===
false and $this->setup->getClient()->getdbType() ==
"mysql" and $this->setup->getClient()->db_exists) {
4014 $this->form->setTitle($this->lng->txt(
"clone_source"));
4016 $clientlist =
new ilClientList($this->setup->db_connections);
4017 $list = $clientlist->getClients();
4018 $clientlistarray = array();
4021 if ((strcmp(
$key, $this->setup->getClient()->getId()) !=
'0') && (
$client->getDbType() ==
'mysql')) {
4028 $si->setOptions(array_merge(
4029 array(
"" =>
"-- " . $lng->txt(
"please_select") .
" --"),
4032 $si->setRequired(
true);
4033 $this->form->addItem(
$si);
4037 $this->form->addItem($cb);
4039 $this->form->addCommandButton(
"cloneSaveSource", $lng->txt(
"cloneit"));
4041 $disabledmessage =
"<h1>" . $this->lng->txt(
"clone_disabledmessage") .
"</h1><br>";
4042 if (!$this->setup->getClient()->status[
"access"][
"status"] ===
false) {
4043 $disabledmessage .= $this->lng->txt(
"clone_clientnotdisabled") .
"<br>";
4045 if (!stripos($this->setup->getClient()->getName(),
"aster") ===
false) {
4046 $disabledmessage .= $this->lng->txt(
"clone_clientismaster") .
"<br>";
4048 if ($this->setup->getClient()->getdbType() !=
"mysql") {
4049 $disabledmessage .= $this->lng->txt(
"clone_clientisnotmysql") .
"<br>";
4051 if (!$this->setup->getClient()->db_exists) {
4052 $disabledmessage .= $this->lng->txt(
"clone_clientnodatabase") .
"<br>";
4054 $this->form->setTitle($disabledmessage);
4060 if (!$this->setup->isAdmin()) {
4065 $this->form->setValuesByPost();
4066 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_clone"));
4067 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4074 if (!$this->setup->isAdmin()) {
4080 if ($this->form->checkInput()) {
4083 if ($this->form->getInput(
"iamsure") !=
"1") {
4084 $error = $this->lng->txt(
'clone_youmustcheckiamsure');
4087 if (!$this->setup->cloneFromSource($this->form->getInput(
"source"))) {
4088 $error = $this->lng->txt(
'clone_error') .
' -> ' . $this->setup->error;
4091 if (0 === strlen($error)) {
4097 $this->form->setValuesByPost();
4098 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_clone"));
4099 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4105 $settings = $this->setup->getClient()->getAllSettings();
4107 if (!$a_omit_init) {
4108 include_once(
"./Services/Administration/classes/class.ilSetting.php");
4110 $this->form->setValuesByArray(array(
4111 'proxy_status' => (
bool) $settings[
'proxy_status'],
4112 'proxy_host' => $settings[
'proxy_host'],
4113 'proxy_port' => $settings[
'proxy_port']
4115 if ((
bool) $settings[
'proxy_status']) {
4116 $this->setup->printProxyStatus($this->setup->client);
4119 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4120 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_proxy"));
4123 $check = $this->setup->checkClientProxySettings($this->setup->client);
4125 $this->setup->getClient()->status[
"proxy"][
"status"] = $check[
"status"];
4126 $this->setup->getClient()->status[
"proxy"][
"comment"] = $check[
"comment"];
4127 $this->setup->getClient()->status[
"proxy"][
"text"] = $check[
"comment"];
4129 if ($check[
"status"]) {
4130 $this->setButtonNext(
"nic");
4133 $this->setButtonPrev(
"contact");
4140 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
4142 $this->form->setFormAction(
"setup.php?cmd=gateway");
4146 $proxs->
setInfo($lng->txt(
'proxy_status_info'));
4147 $proxs->setValue(1);
4148 $this->form->addItem($proxs);
4152 $proxs->addSubItem($proxa);
4155 $prox =
new ilTextInputGUI($lng->txt(
'proxy_host'),
'proxy_host');
4156 $prox->
setInfo($lng->txt(
'proxy_host_info'));
4157 $proxs->addSubItem($prox);
4160 $proxp =
new ilTextInputGUI($lng->txt(
'proxy_port'),
'proxy_port');
4161 $proxp->
setInfo($lng->txt(
'proxy_port_info'));
4162 $proxp->setSize(10);
4163 $proxp->setMaxLength(10);
4164 $proxs->addSubItem($proxp);
4167 $this->form->addCommandButton(
'saveProxy', $lng->txt(
'save'));
4182 $isFormValid = $this->form->checkInput();
4184 $new_settings[
'proxy_status'] = (int) $this->form->getInput(
'proxy_status');
4185 $new_settings[
'proxy_host'] = trim($this->form->getInput(
'proxy_host'));
4186 $new_settings[
'proxy_port'] = trim($this->form->getInput(
'proxy_port'));
4189 if ($new_settings[
'proxy_status'] ==
true) {
4190 if (!strlen($new_settings[
'proxy_host'])) {
4191 $isFormValid =
false;
4192 $this->form->getItemByPostVar(
'proxy_host')->setAlert($lng->txt(
'msg_input_is_required'));
4194 if (!strlen($new_settings[
'proxy_port'])) {
4195 $isFormValid =
false;
4196 $this->form->getItemByPostVar(
'proxy_port')->setAlert($lng->txt(
'msg_input_is_required'));
4198 if (!preg_match(
'/[0-9]{1,}/', $new_settings[
'proxy_port']) ||
4199 $new_settings[
'proxy_port'] < 0 ||
4200 $new_settings[
'proxy_port'] > 65535) {
4201 $isFormValid =
false;
4202 $this->form->getItemByPostVar(
'proxy_port')->setAlert($lng->txt(
'proxy_port_numeric'));
4207 $this->setup->saveProxySettings($new_settings);
4209 ilUtil::sendSuccess($lng->txt(
'saved_successfully'));
4210 $settings = $this->setup->getClient()->getAllSettings();
4211 if ($settings[
'proxy_status'] ==
true) {
4212 $this->setup->printProxyStatus($this->setup->client);
4219 $this->form->setValuesByPost();
4220 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4229 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
4231 include_once(
"./setup/classes/class.ilBackgroundTaskTableGUI.php");
4234 $this->tpl->setVariable(
"SETUP_CONTENT", $this->
bt_tabs()->
get() .
$table->getHTML());
4243 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
4246 $form->setTitle($this->lng->txt(
'background_task_configuration'));
4247 $form->addCommandButton(
'save_background_tasks', $this->lng->txt(
'save'));
4248 $form->addCommandButton(
'background_tasks', $this->lng->txt(
'cancel'));
4249 $form->setFormAction(
'setup.php?cmd=gateway');
4254 $rgroup->addOption($cc);
4257 $rgroup->addOption($cc);
4259 $form->addItem($rgroup);
4261 $i =
new ilNumberInputGUI($this->lng->txt(
'max_number_of_concurrent_tasks'),
'number_of_concurrent_tasks');
4269 require_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
4271 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
4276 $this->tpl->setVariable(
"SETUP_CONTENT", $this->
bt_tabs(
true)->
get() .
$form->getHTML());
4284 $n_of_tasks = $this->setup->ini->readVariable(
"background_tasks",
"number_of_concurrent_tasks");
4285 $sync = $this->setup->ini->readVariable(
"background_tasks",
"concurrency");
4287 $n_of_tasks = $n_of_tasks ? $n_of_tasks : 5;
4290 $form->setValuesByArray([
4291 'concurrency' =>
$sync,
4292 'number_of_concurrent_tasks' => $n_of_tasks
4299 $form->setValuesByPost();
4302 if (!
$form->checkInput()) {
4303 $this->tpl->setVariable(
'CONTENT', $this->
bt_tabs(
true)->
get() .
$form->getHTML());
4308 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'),
true);
4322 if (!$this->setup->ini->groupExists(
'background_tasks')) {
4323 $this->setup->ini->addGroup(
'background_tasks');
4324 var_dump($this->setup->ini->getError());
4325 $this->setup->ini->write();
4326 var_dump($this->setup->ini->getError());
4329 $this->setup->ini->setVariable(
"background_tasks",
"concurrency",
$form->getInput(
'concurrency'));
4330 $this->setup->ini->setVariable(
"background_tasks",
"number_of_concurrent_tasks",
$form->getInput(
'number_of_concurrent_tasks'));
4332 return $this->setup->ini->write();
4339 $client = $this->setup->getClient();
4343 $bucket_ids = $persistence->getBucketIdsByState(State::SCHEDULED);
4344 foreach ($bucket_ids as $bucket_id) {
4345 $persistence->deleteBucketById($bucket_id);
4348 ilUtil::sendSuccess($this->lng->txt(
'terminated_waiting_tasks'),
true);
Class ilMemcacheServerTableGUI.
checkDisplayMode($a_title="")
determine display mode and load according html layout
This class represents an option in a radio group.
changeDefaultClient()
set defualt client
if(isset($_REQUEST['delete'])) $list
determineToolsPathInstall()
Determine tools paths.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
setValue($a_value)
Set Value.
getMasterPasswordForm()
return
displayError($a_message)
display error page
jumpToFirstUnfinishedSetupStep()
if setting up a client was not finished, jump back to the first uncompleted setup step ...
displayPreliminaries()
display preliminaries page
static _getLongerSettings($a_limit='4000')
get a list of setting records with values loger than a limit
setDisplayMode($a_mode)
set display mode to 'view' or 'setup' 'setup' -> show status panel and (prev/next) navigation buttons...
static _changeValueType($a_new_type='text')
change the type of the value column in the database
static _getValueType()
Get the type of the value column in the database.
displayIni($a_omit_form_init=false)
display setup in step
getRegistrationValues()
Get current values for registration from.
changeMasterPassword(\ilPropertyFormGUI $form=null)
display change password form and process form input
initDbSlaveForm()
Init db slave form.
displayClientOverview()
display client overview panel
Class ilGlobalCacheSettings.
installDatabase()
Install the database.
fillBackgroundTasksForm(&$form)
setInfo($a_info)
Set Information Text.
updateBasicSettings()
Update basic settings form.
displayFinishSetup()
display finish setup page
initDBSelectionForm()
Init db selection form.
displayDatabaseSlave($a_from_save=false)
Display database slave.
showUpdateSteps($a_hotfix=false)
Update database.
toggleClientList()
enable/disable client list on index page
initSettingsTypeForm()
Init the form to change the settings value type.
static getAllTypes($only_available=true)
getClientDbFormValues($dbupdate=null)
Get current values for client db from.
saveBasicSettings()
Save basic settings form.
initClientLoginForm()
Init client login form.
static init($a_tpl=null)
Init.
applyHotfix()
Apply hotfixes.
applyHotfix()
Apply hotfix.
static getSettingFields()
returns the array of setting fields
saveLanguages()
Save languages.
const SESSION_HANDLING_FIXED
static _getShortTimeZoneList()
get short timezone list
displaySessions()
display sessions form and process form input
setInfo($a_info)
Set Info.
static createFromParentReleation()
if($_SERVER['argc']< 4) $client
determineTools($a_tools=array())
Determine Tools.
displayTools()
display tools
initContactDataForm()
Init contact data form.
displayLanguages()
display language form and process form input
static isWindows()
check wether the current client system is a windows system
showLongerSettings()
show a list of setting values that are loger than 4000 characters
displayDatabase()
display database form and process form input
if($modEnd===false) $module
determineToolsPath()
Determine tools paths.
__construct()
Constructor.
Class ilBackgroundTaskTableGUI.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
displayFooter()
page output and set title
saveProxy()
Save proxy settings.
catch(Exception $e) $message
setValue($a_value)
Set Value.
displayLogout()
display logout page
if(isset($_POST['submit'])) $form
saveContact()
Save contact form.
displayMasterSetup($a_omit_init=false)
display master setup form & process form input
initBasicSettingsForm($a_install=false)
Init basic settings form.
initTreeImplementationForm()
getClientIniValues()
Get current values for client ini from.
static getAvailableComponents()
displayHeader()
display header with admin links and language flags
static getAvailableCoreServices()
Get all available core services.
checkPanelMode()
determine display mode and load correct panel
changeMasterSettings($a_omit_init=false)
display master settings and process form input
special template class to simplify handling of ITX/PEAR
SetButtonPrev($a_cmd=0, $a_lng=0)
set previous navigation button
showHotfixSteps()
Show hotfix steps.
Class ilSetupPasswordManager.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static initDomEvent()
Init YUI DomEvent.
cmdAdmin()
process valid commands for admins
changeAccessMode($a_back)
enable/disable access to a client
displayProxy($a_omit_init=false)
displayDeleteConfirmation()
display delete client confirmation form and process form input
setMaxLength($a_maxlength)
Set Max Length.
static getAvailableTypes($with_descriptions=true)
initControlStructureForm()
Init the form to reload the control structure.
displayProcessPanel()
display process panel
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
displayContactData($a_omit_init=false)
display contact data form and process form input
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
performMLogin()
Master Login.
cmdClient()
process valid commands for all clients
displaySubTabs()
Show subtabs.
updateDatabase()
Update database.
initMasterLoginForm()
Init master login form.
saveClientIni()
Save client ini form.
initClientOverviewForm()
Init client overview form.
if(!empty($this->data['faventry'])) $tabs
getBasicSettingsValues()
Get current values for basic settings from.
loginClient()
login to a client
reloadControlStructure()
reload control structure
This class represents a non editable value in a property form.
saveRegistration()
Save registration form.
displayStartup()
display intro page for the first client installation
displayStatusPanel()
display status panel
cloneInitForm()
Initialize clone form.
cmdInstall()
process valid commands for pre-installation status
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
displayNavButtons()
display navigation buttons
displayNIC($a_omit_init=false)
display nic registration form and process form input
const SESSION_HANDLING_LOAD_DEPENDENT
if(empty($password)) $table
setDbSubtabs($a_subtab_id="db")
Set db subtabs.
displayClientList()
display client list and process form input
SetButtonNext($a_cmd, $a_lng=0)
set next navigation button
static getInstallableTypes()
setValue($a_value)
Set Value.
createBackgroundTasksForm()
static redirect($a_script)
initClientIniForm()
Init client ini form.
initClientDbForm($a_install=true, $dbupdate=null, $db_status=false, $hotfix_available=false, $custom_updates_available=false)
Init client db form.
changeSettingsType()
change the type of the value field in settings table
saveDbSlave()
Save db slave form.
getContactValues()
Get current values for contact from.
selectDBType()
Select database type.
validateSetup()
validatesetup status again and set access mode of the first client to online
initRegistrationForm($a_mode="edit")
Init registration form.
const UI_PASSWORD_PLACEHOLDER
applyUpdate($a_break=0)
Apply update.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static getAvailableCoreModules()
Get all available core modules.
Class ilSetupPasswordManager.
displayLogin($a_omit_minit=false, $a_omit_cinit=false)
display login form and process form