7require_once
"./setup/classes/class.ilSetup.php";
8require_once(
'./Services/Database/classes/class.ilDBConstants.php');
51 include_once(
"./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
53 $this->tabs->setSetupMode(
true);
55 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
57 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
60 $tpl->addJavaScript(
"./Services/JavaScript/js/Basic.js", 0);
62 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
66 $this->revision =
'$Revision$';
67 $this->version =
"2 " . substr(substr($this->revision, 1), 0, -2);
68 $this->lang = $this->lng->lang_key;
75 if (
$_POST[
"client_id"] !=
"") {
86 $this->setup->ini_client_exists = $this->setup->newClient(
$client_id);
87 if (is_object($this->setup->getClient())) {
88 $this->setup->getClient()->status = $this->setup->getStatus(
$client_id);
92 if (($this->cmd =
$_GET[
"cmd"]) ==
"gateway") {
94 @$this->cmd = key(
$_POST[
"cmd"]);
100 if ($this->setup->isAuthenticated() and !$this->setup->getClient()->status[
"finish"][
"status"] and $this->cmd !=
"clientlist" and $this->cmd !=
"") {
110 if (!$this->setup->isAuthenticated() or !$this->setup->isInstalled()) {
112 if (!$this->setup->isInstalled() or !($this->setup->ini->readVariable(
"clients",
"path"))) {
115 if ($this->cmd ==
"performLogin" || $this->cmd ==
"performMLogin") {
123 if ($this->setup->isAdmin()) {
134 echo
"cmd: " . $this->cmd .
" | access: " . $this->setup->access_mode .
" | display: " .
$this->display_mode;
135 var_dump($this->setup->getClient()->status);
152 switch ($this->cmd) {
154 case "preliminaries":
155 $this->setup->checkPreliminaries();
163 case "determineToolsPathInstall":
167 case "saveBasicSettings":
172 $this->
displayError($this->lng->txt(
"unknown_command") .
": '" . $this->cmd .
"'");
183 switch ($this->cmd) {
189 $this->active_tab =
"clientlist";
192 case "savemasterpassword":
195 $this->active_tab =
"password";
198 case "changemasterpassword":
201 $this->active_tab =
"password";
204 case "mastersettings":
207 $this->active_tab =
"basicsettings";
210 case "determineToolsPath":
215 case "changedefault":
220 $this->cmd =
"selectdb";
222 $this->setup->ini_client_exists = $this->setup->newClient();
236 $this->setup->ini_client_exists = $this->setup->newClient();
250 case "preliminaries":
251 $this->setup->checkPreliminaries();
253 $this->active_tab =
"preliminaries";
256 case "updateBasicSettings":
258 case "performMLogin":
274 switch ($this->cmd) {
277 if ($this->setup->getClient()->db_installed) {
308 if (!isset(
$_GET[
"lang"]) and !$this->setup->getClient()->status[
"finish"][
"status"] and
$_GET[
"cmd"] ==
"sess" and $this->setup->error ===
true) {
316 if (!isset(
$_GET[
"lang"]) and !$this->setup->getClient()->status[
"finish"][
"status"] and
$_GET[
"cmd"] ==
"lang" and $this->setup->error ===
true) {
324 if (!isset(
$_GET[
"lang"]) and !$this->setup->getClient()->status[
"finish"][
"status"] and
$_GET[
"cmd"] ==
"contact") {
332 if (!isset(
$_GET[
"lang"]) and !$this->setup->getClient()->status[
"finish"][
"status"] and
$_GET[
"cmd"] ==
"proxy") {
340 $this->displayCache();
345 if (!isset(
$_GET[
"lang"]) and !$this->setup->getClient()->status[
"finish"][
"status"] and
$_GET[
"cmd"] ==
"nic") {
353 if (!isset(
$_GET[
"lang"]) and !$this->setup->getClient()->status[
"finish"][
"status"] and
$_GET[
"cmd"] ==
"finish") {
370 ilUtil::redirect(ILIAS_HTTP_PATH .
"/login.php?client_id=" . $this->setup->getClient()->getId());
374 if ($this->setup->getClient()->ini->readVariable(
"client",
"access") !=
"1") {
375 $this->setup->getClient()->ini->setVariable(
"client",
"access",
"1");
376 $this->setup->getClient()->ini->write();
380 ilUtil::redirect(ILIAS_HTTP_PATH .
"/login.php?client_id=" . $this->setup->getClient()->getId());
387 case "reloadStructure":
395 case "saveClientIni":
396 case "installDatabase":
397 case "displayDatabase":
398 case "updateDatabase":
399 case "showUpdateSteps":
400 case "saveLanguages":
402 case "displayContactData":
404 case "saveRegistration":
406 case "showHotfixSteps":
407 case "applyCustomUpdates":
408 case "changeSettingsType":
409 case "showLongerSettings":
410 case "cloneSelectSource":
411 case "cloneSaveSource":
413 case "displayPassword":
417 case "addMemcacheServer":
418 case "deleteMemcacheServer":
419 case "editMemcacheServer":
420 case "createMemcacheServer":
421 case "updateMemcacheServer":
423 case "background_tasks":
424 case "edit_background_tasks":
425 case "save_background_tasks":
426 case "kill_waiting_tasks":
432 $this->
displayError($this->lng->txt(
"unknown_command") .
": '" . $this->cmd .
"'");
454 if ($a_mode !=
"view" and $a_mode !=
"setup") {
458 $this->display_mode = $a_mode;
469 $languages = $this->lng->getLanguages();
471 $count = (int) round(count($languages) / 2);
475 foreach ($languages as $lang_key) {
482 $this->tpl->setCurrentBlock(
"languages");
483 $this->tpl->setVariable(
"LINK_LANG",
"./setup.php?cmd=" . $this->cmd .
"&lang=" . $lang_key);
484 $this->tpl->setVariable(
"LANG_NAME", $this->lng->txt(
"meta_l_" . $lang_key));
485 $this->tpl->setVariable(
"LANG_ICON", $lang_key);
486 $this->tpl->setVariable(
"LANG_KEY", $lang_key);
487 $this->tpl->setVariable(
"BORDER", 0);
488 $this->tpl->setVariable(
"VSPACE", 0);
489 $this->tpl->parseCurrentBlock();
494 if ($this->cmd !=
"logout" and $this->setup->isInstalled() and $this->setup->isAuthenticated()) {
496 if ($this->setup->isAdmin()) {
497 if ($this->display_mode ==
"view" ||
498 $this->cmd ==
"clientlist" ||
499 $this->cmd ==
"changemasterpassword" ||
500 $this->cmd ==
'savemasterpassword' ||
501 $this->cmd ==
"mastersettings") {
502 $this->tpl->setCurrentBlock(
"add_client");
503 $this->tpl->setVariable(
"TXT_ADD_CLIENT", ucfirst($this->lng->txt(
"new_client")));
504 $this->tpl->parseCurrentBlock();
508 $class = ($this->active_tab ==
"clientlist")
511 $this->tpl->setCurrentBlock(
"display_list");
512 $this->tpl->setVariable(
"TXT_LIST", ucfirst($this->lng->txt(
"list_clients")));
513 $this->tpl->setVariable(
"TAB_CLASS", $class);
514 $this->tpl->parseCurrentBlock();
517 $class = ($this->active_tab ==
"background_tasks")
520 $this->tpl->setCurrentBlock(
"display_list");
521 $this->tpl->setVariable(
"TXT_BACKGROUND_TASKS", ucfirst($this->lng->txt(
"background_tasks")));
522 $this->tpl->setVariable(
"BACKGROUND_TASKS_CLASS", $class);
523 $this->tpl->parseCurrentBlock();
526 $class = ($this->active_tab ==
"basicsettings")
529 $this->tpl->setCurrentBlock(
"edit_pathes");
530 $this->tpl->setVariable(
"TXT_EDIT_PATHES", $this->lng->txt(
"basic_settings"));
531 $this->tpl->setVariable(
"TAB_CLASS", $class);
532 $this->tpl->parseCurrentBlock();
535 $class = ($this->active_tab ==
"preliminaries")
538 $this->tpl->setCurrentBlock(
"preliminaries");
539 $this->tpl->setVariable(
"TXT_PRELIMINARIES", $this->lng->txt(
"preliminaries"));
540 $this->tpl->setVariable(
"TAB_CLASS", $class);
541 $this->tpl->parseCurrentBlock();
544 $class = ($this->active_tab ==
"password")
547 $this->tpl->setCurrentBlock(
"change_password");
548 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", ucfirst($this->lng->txt(
"password")));
549 $this->tpl->setVariable(
"TAB_CLASS", $class);
550 $this->tpl->parseCurrentBlock();
554 if ($this->setup->isAuthenticated()) {
555 $this->tpl->setCurrentBlock(
"logout");
556 $this->tpl->setVariable(
"TXT_LOGOUT", $this->lng->txt(
"logout"));
557 $this->tpl->parseCurrentBlock();
561 $this->tpl->setVariable(
"VAL_CMD", htmlspecialchars(
$_GET[
"cmd"]));
562 $this->tpl->setVariable(
"TXT_OK", $this->lng->txt(
"change"));
563 $this->tpl->setVariable(
"TXT_CHOOSE_LANGUAGE", $this->lng->txt(
"choose_language"));
564 $this->tpl->setVariable(
"PAGETITLE",
"Setup");
566 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"../templates/default/delos.css");
567 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"./css/setup.css");
568 $this->tpl->setVariable(
"TXT_ILIAS_VERSION",
"ILIAS " .
ILIAS_VERSION);
569 $this->tpl->setVariable(
"TXT_SETUP", $this->lng->txt(
"setup"));
570 $this->tpl->setVariable(
"VERSION", $this->version);
571 $this->tpl->setVariable(
"TXT_VERSION", $this->lng->txt(
"version"));
572 $this->tpl->setVariable(
"LANG", $this->lang);
581 if ($this->cmd !=
"logout") {
582 if ($this->setup->ini_ilias_exists and $this->display_mode ==
"setup" and $this->setup->getClient()->getId() !=
"") {
583 $this->tpl->setVariable(
"TXT_ACCESS_MODE",
"(" . $this->lng->txt(
"client_id") .
": " . $this->setup->getClient()->getId() .
")");
584 } elseif ($this->setup->isAdmin()) {
585 $this->tpl->setVariable(
"TXT_ACCESS_MODE",
"(" . $this->lng->txt(
"root_access") .
")");
601 if (!$this->btn_prev_on and !$this->btn_next_on) {
605 $ntpl =
new ilTemplate(
"tpl.navbuttons.html",
true,
true,
"setup");
608 $ntpl->setVariable(
"FORMACTION_BUTTONS",
"setup.php?cmd=gateway");
610 if ($this->btn_prev_on) {
611 $ntpl->setCurrentBlock(
"btn_back");
612 $ntpl->setVariable(
"TXT_PREV", $this->btn_prev_lng);
613 $ntpl->setVariable(
"CMD_PREV", $this->btn_prev_cmd);
614 $ntpl->parseCurrentBlock();
617 if ($this->btn_next_on) {
618 $ntpl->setCurrentBlock(
"btn_forward");
619 $ntpl->setVariable(
"TXT_NEXT", $this->btn_next_lng);
620 $ntpl->setVariable(
"CMD_NEXT", $this->btn_next_cmd);
621 $ntpl->parseCurrentBlock();
624 $nav_html = $ntpl->get();
625 $this->tpl->setVariable(
"NAVBUTTONS", $nav_html);
626 if (!$this->no_second_nav) {
627 $this->tpl->setVariable(
"NAVBUTTONS2", $nav_html);
640 $this->btn_prev_on =
true;
641 $this->btn_prev_cmd = ($a_cmd) ? $a_cmd :
"gateway";
642 $this->btn_prev_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt(
"prev");
653 $this->btn_next_on =
true;
654 $this->btn_next_cmd = ($a_cmd) ? $a_cmd :
"gateway";
655 $this->btn_next_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt(
"next");
670 $btpl =
new ilTemplate(
"tpl.buttons.html",
true,
true,
"setup");
671 $btpl->setCurrentBlock(
"btn");
672 $btpl->setVariable(
"CMD",
"changeaccess");
673 $access_button = ($this->setup->getClient()->status[
"access"][
"status"]) ?
"disable" :
"enable";
674 $btpl->setVariable(
"TXT", $this->lng->txt($access_button));
675 $btpl->setVariable(
"FORMACTION",
"setup.php?cmd=gateway");
676 $btpl->parseCurrentBlock();
677 $this->tpl->setVariable(
"BUTTONS", $btpl->get());
680 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
692 $settings = $this->setup->getClient()->getAllSettings();
694 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
697 $this->form->setTitle(
$lng->txt(
"client_info"));
701 $ne->setValue(($this->setup->getClient()->getName())
702 ? $this->setup->getClient()->getName()
703 :
"<" . $this->lng->txt(
"no_client_name") .
">");
704 $ne->setInfo($this->setup->getClient()->getDescription());
705 $this->form->addItem($ne);
709 $ne->setValue($this->setup->getClient()->getId());
710 $this->form->addItem($ne);
714 $ne->setValue(($this->setup->getClient()->db_installed)
715 ? $settings[
"inst_id"]
717 $this->form->addItem($ne);
721 $ne->setValue(($this->setup->getClient()->db_installed)
722 ? $settings[
"db_version"]
724 $this->form->addItem($ne);
729 $access_status = ($this->setup->getClient()->status[
"access"][
"status"]) ?
"online" :
"disabled";
730 $ne->setValue($this->lng->txt($access_status) . $access_link);
731 $this->form->addItem($ne);
735 $sh->setTitle($this->lng->txt(
"server_info"));
736 $this->form->addItem($sh);
741 $this->form->addItem($ne);
745 $ne->setValue(
$_SERVER[
"SERVER_NAME"]);
746 $this->form->addItem($ne);
752 $this->form->addItem($ne);
756 $ne->setValue(
$_SERVER[
"SERVER_SOFTWARE"]);
757 $this->form->addItem($ne);
761 $ne->setValue(ILIAS_HTTP_PATH);
762 $this->form->addItem($ne);
766 $ne->setValue(ILIAS_ABSOLUTE_PATH);
767 $this->form->addItem($ne);
771 $sh->setTitle($this->lng->txt(
"3rd_party_software"));
772 $this->form->addItem($sh);
774 $tools = array(
"convert",
"zip",
"unzip",
"ghostscript",
"java",
"ffmpeg",
"phantomjs");
776 foreach ($tools as $tool) {
779 $p = $this->setup->ini->readVariable(
"tools", $tool);
780 $ne->setValue($p ? $p : $this->lng->txt(
"not_configured"));
781 $this->form->addItem($ne);
786 $p = $this->setup->ini->readVariable(
"tools",
"latex");
787 $ne->setValue($p ? $p : $this->lng->txt(
"not_configured"));
788 $this->form->addItem($ne);
792 $ne->setValue($this->setup->ini->readVariable(
"tools",
"vscantype"));
793 $this->form->addItem($ne);
797 $p = $this->setup->ini->readVariable(
"tools",
"scancommand");
798 $ne->setValue($p ? $p : $this->lng->txt(
"not_configured"));
799 $this->form->addItem($ne);
803 $p = $this->setup->ini->readVariable(
"tools",
"cleancommand");
804 $ne->setValue($p ? $p : $this->lng->txt(
"not_configured"));
805 $this->form->addItem($ne);
810 $sh->setTitle($this->lng->txt(
"system_styles"));
811 $this->form->addItem($sh);
815 $p = $this->setup->ini->readVariable(
"tools",
"enable_system_styles_management");
816 $ne->setValue($p ? $this->lng->txt(
"enabled") : $this->lng->txt(
"not_enabled"));
817 $this->form->addItem($ne);
821 $p = $this->setup->ini->readVariable(
"tools",
"lessc");
822 $ne->setValue($p ? $p : $this->lng->txt(
"not_configured"));
823 $this->form->addItem($ne);
826 $this->form->setFormAction(
"setup.php?cmd=gateway");
838 $OK =
"<font color=\"green\"><strong>OK</strong></font>";
839 $FAILED =
"<strong><font color=\"red\">FAILED</font></strong>";
841 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.preliminaries.html",
"setup");
843 $this->tpl->setVariable(
"TXT_SETUP_TITLE", $this->lng->txt(
"ilias_setup"));
844 $this->tpl->setVariable(
"TXT_SETUP_WELCOME", $this->lng->txt(
"setup_welcome"));
845 $this->tpl->setVariable(
"TXT_SETUP_INIFILE_DESC", $this->lng->txt(
"setup_inifile_desc"));
846 $this->tpl->setVariable(
"TXT_SETUP_DATABASE_DESC", $this->lng->txt(
"setup_database_desc"));
847 $this->tpl->setVariable(
"TXT_SETUP_LANGUAGES_DESC", $this->lng->txt(
"setup_languages_desc"));
848 $this->tpl->setVariable(
"TXT_SETUP_PASSWORD_DESC", $this->lng->txt(
"setup_password_desc"));
849 $this->tpl->setVariable(
"TXT_SETUP_NIC_DESC", $this->lng->txt(
"setup_nic_desc"));
851 $server_os = php_uname();
852 $server_web =
$_SERVER[
"SERVER_SOFTWARE"];
853 $environment = $this->lng->txt(
"env_using") .
" " . $server_os .
" <br/>" . $this->lng->txt(
"with") .
" " . $server_web;
855 if ((stristr($server_os,
"linux") || stristr($server_os,
"windows")) && stristr($server_web,
"apache")) {
856 $env_comment = $this->lng->txt(
"env_ok");
858 $env_comment =
"<font color=\"red\">" . $this->lng->txt(
"env_warning") .
"</font>";
861 $this->tpl->setVariable(
"TXT_ENV_TITLE", $this->lng->txt(
"environment"));
862 $this->tpl->setVariable(
"TXT_ENV_INTRO", $environment);
863 $this->tpl->setVariable(
"TXT_ENV_COMMENT", $env_comment);
865 $this->tpl->setVariable(
"TXT_PRE_TITLE", $this->lng->txt(
"preliminaries"));
866 $this->tpl->setVariable(
"TXT_PRE_INTRO", $this->lng->txt(
"pre_intro"));
868 $preliminaries = array(
"php",
"root",
"folder_create",
869 "cookies_enabled",
"dom",
"xsl",
"gd",
"memory");
870 if ($this->setup->hasOpCacheEnabled()) {
871 $preliminaries[] =
'load_comments';
874 foreach ($preliminaries as $preliminary) {
875 $this->tpl->setCurrentBlock(
"preliminary");
876 $this->tpl->setVariable(
"TXT_PRE", $this->lng->txt(
"pre_" . $preliminary));
877 if ($this->setup->preliminaries_result[$preliminary][
"status"] ==
true) {
878 $this->tpl->setVariable(
"STATUS_PRE", $OK);
880 $this->tpl->setVariable(
"STATUS_PRE", $FAILED);
882 $this->tpl->setVariable(
"COMMENT_PRE", $this->setup->preliminaries_result[$preliminary][
"comment"]);
883 $this->tpl->parseCurrentBlock();
887 if ($this->setup->preliminaries ===
true) {
888 if ($this->setup->isInstalled()) {
889 $cmd =
"mastersettings";
893 $btn_text = ($this->cmd ==
"preliminaries") ?
"" :
"installation";
895 $this->setButtonNext(
$cmd, $btn_text);
897 $this->tpl->setCurrentBlock(
"premessage");
898 $this->tpl->setVariable(
"TXT_PRE_ERR",
sprintf(
899 $this->lng->txt(
"pre_error"),
900 "http://www.ilias.de/docu/goto.php?target=pg_6531_367&client_id=docu"
902 $this->tpl->parseCurrentBlock();
915 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
916 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"basic_settings"));
917 $this->tpl->setVariable(
919 $this->lng->txt(
"info_text_first_install") .
"<br/>" . $this->lng->txt(
"info_text_pathes")
922 $this->setButtonPrev(
"preliminaries");
924 if ($this->setup->isInstalled()) {
925 $this->setButtonNext(
"list");
931 $this->tpl->setVariable(
"SETUP_CONTENT",
"<br>" . $this->form->getHTML() .
"<br>");
939 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
940 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"basic_settings"));
941 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_pathes"));
943 $this->btn_next_on =
true;
944 $this->btn_next_lng = $this->lng->txt(
"create_new_client") .
"...";
945 $this->btn_next_cmd =
"newclient";
951 $this->tpl->setVariable(
"SETUP_CONTENT",
"<br>" . $this->form->getHTML() .
"<br>");
961 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
967 $ne->setInfo($this->lng->txt(
"data_directory_in_ws_info"));
970 ? str_replace(
"\\",
"/", getcwd())
973 $ne->setValue($cwd .
"/data");
974 $this->form->addItem($ne);
979 $ti->setInfo(
$lng->txt(
"data_directory_info"));
980 $ti->setRequired(
true);
981 $this->form->addItem($ti);
984 $this->form->addItem($ne);
994 $sh->setTitle(
$lng->txt(
"logging"));
995 $this->form->addItem($sh);
999 $ti->setInfo(
$lng->txt(
"log_path_comment" . $lvext));
1000 $this->form->addItem($ti);
1004 $this->form->addItem($cb);
1008 $ti->setInfo(
$lng->txt(
"error_log_path_comment" . $lvext));
1009 $this->form->addItem($ti);
1013 $sh->setTitle(
$lng->txt(
"server_settings"));
1014 $this->form->addItem($sh);
1017 include_once(
"./Services/Calendar/classes/class.ilCalendarUtil.php");
1019 $si->setOptions(array_merge(
1020 array(
"" =>
"-- " .
$lng->txt(
"please_select") .
" --"),
1023 $si->setRequired(
true);
1024 $this->form->addItem(
$si);
1028 $sh->setTitle(
$lng->txt(
"https_settings"));
1029 $this->form->addItem($sh);
1032 $check->setOptionTitle(
$lng->txt(
'ps_auto_https_description'));
1033 $check->setValue(1);
1037 $text->setMaxLength(64);
1038 $text->setRequired(
true);
1039 $check->addSubItem(
$text);
1043 $text->setMaxLength(64);
1044 $text->setRequired(
true);
1045 $check->addSubItem(
$text);
1047 $this->form->addItem($check);
1051 $sh->setTitle(
$lng->txt(
"3rd_party_software_req"));
1052 $this->form->addItem($sh);
1056 $ti->setInfo(
$lng->txt(
"convert_path_comment" . $lvext));
1057 $ti->setRequired(
true);
1058 $this->form->addItem($ti);
1062 $ti->setInfo(
$lng->txt(
"zip_path_comment" . $lvext));
1063 $ti->setRequired(
true);
1064 $this->form->addItem($ti);
1068 $ti->setInfo(
$lng->txt(
"unzip_path_comment" . $lvext));
1069 $ti->setRequired(
true);
1070 $this->form->addItem($ti);
1074 $sh->setTitle(
$lng->txt(
"3rd_party_software_opt"));
1075 $this->form->addItem($sh);
1079 $ti->setInfo(
$lng->txt(
"ghostscript_path_comment" . $lvext));
1080 $this->form->addItem($ti);
1084 $ti->setInfo(
$lng->txt(
"ffmpeg_path_comment"));
1085 $this->form->addItem($ti);
1089 $pj->setInfo(
$lng->txt(
"phantomjs_path_comment"));
1090 $this->form->addItem($pj);
1094 $ti->setInfo(
$lng->txt(
"latex_url_comment"));
1095 $this->form->addItem($ti);
1099 "none" =>
$lng->txt(
"none"),
1100 "sophos" =>
$lng->txt(
"sophos"),
1101 "antivir" =>
$lng->txt(
"antivir"),
1102 "clamav" =>
$lng->txt(
"clamav")
1106 $this->form->addItem(
$si);
1110 $this->form->addItem($ti);
1114 $this->form->addItem($ti);
1118 $sh->setTitle($this->lng->txt(
"system_styles"));
1119 $this->form->addItem($sh);
1122 $check =
new ilCheckboxInputGUI(
$lng->txt(
'enable_system_styles_management'),
'enable_system_styles_management');
1123 $check->setInfo(
$lng->txt(
'enable_system_styles_management_info'));
1124 $check->setValue(1);
1128 $lessc->setInfo(
$lng->txt(
"lessc_path_comment"));
1129 $check->addSubItem($lessc);
1131 $this->form->addItem($check);
1136 $sh->setTitle(
$lng->txt(
"master_password"));
1137 $this->form->addItem($sh);
1141 $pi->setRequired(
true);
1142 $pi->setSkipSyntaxCheck(
true);
1143 $pi->setInfo(
$lng->txt(
"password_info"));
1144 $this->form->addItem($pi);
1148 $this->form->addCommandButton(
"saveBasicSettings",
$lng->txt(
"save"));
1150 $this->form->addCommandButton(
"updateBasicSettings",
$lng->txt(
"save"));
1151 $this->form->addCommandButton(
"determineToolsPath",
$lng->txt(
"determine_tools_paths"));
1154 $this->form->setTitle(
$lng->txt(
"data_directories"));
1155 $this->form->setFormAction(
"setup.php?cmd=gateway");
1159 $this->form->setValuesByArray($det);
1170 $values[
"webspace_dir"] = getcwd() .
"/data";
1171 $values[
"data_dir"] = $this->setup->ini->readVariable(
"clients",
"datadir");
1172 $values[
"convert_path"] = $this->setup->ini->readVariable(
"tools",
"convert");
1173 $values[
"zip_path"] = $this->setup->ini->readVariable(
"tools",
"zip");
1174 $values[
"unzip_path"] = $this->setup->ini->readVariable(
"tools",
"unzip");
1175 $values[
"ghostscript_path"] = $this->setup->ini->readVariable(
"tools",
"ghostscript");
1177 $values[
"ffmpeg_path"] = $this->setup->ini->readVariable(
"tools",
"ffmpeg");
1178 $values[
"phantomjs_path"] = $this->setup->ini->readVariable(
"tools",
"phantomjs");
1179 $values[
"latex_url"] = $this->setup->ini->readVariable(
"tools",
"latex");
1180 $values[
"fop_path"] = $this->setup->ini->readVariable(
"tools",
"fop");
1181 $values[
"vscanner_type"] = $this->setup->ini->readVariable(
"tools",
"vscantype");
1182 $values[
"scan_command"] = $this->setup->ini->readVariable(
"tools",
"scancommand");
1183 $values[
"clean_command"] = $this->setup->ini->readVariable(
"tools",
"cleancommand");
1184 $values[
"enable_system_styles_management"] = $this->setup->ini->readVariable(
"tools",
"enable_system_styles_management");
1185 $values[
"lessc_path"] = $this->setup->ini->readVariable(
"tools",
"lessc");
1186 $values[
"log_path"] = $this->setup->ini->readVariable(
"log",
"path") .
"/" .
1187 $this->setup->ini->readVariable(
"log",
"file");
1188 $values[
"chk_log_status"] = !$this->setup->ini->readVariable(
"log",
"enabled");
1189 $values[
"error_log_path"] = $this->setup->ini->readVariable(
"log",
"error_path");
1190 $values[
"time_zone"] = $this->setup->ini->readVariable(
"server",
"timezone");
1193 $values[
"auto_https_detect_enabled"] = $this->setup->ini->readVariable(
"https",
"auto_https_detect_enabled");
1194 $values[
"auto_https_detect_header_name"] = $this->setup->ini->readVariable(
"https",
"auto_https_detect_header_name");
1195 $values[
"auto_https_detect_header_value"] = $this->setup->ini->readVariable(
"https",
"auto_https_detect_header_value");
1197 $this->form->setValuesByArray($values);
1209 if ($this->form->checkInput()) {
1212 $fs = array(
"datadir_path",
"log_path",
"convert_path",
"zip_path",
1213 "unzip_path",
"ghostscript_path",
"ffmpeg_path",
"lessc_path",
"phantomjs_path");
1214 foreach ($fs as $f) {
1220 if (!$this->setup->checkDataDirSetup(
$_POST)) {
1221 $i = $this->form->getItemByPostVar(
"datadir_path");
1222 $i->setAlert($this->lng->txt($this->setup->getError()));
1224 } elseif (!$this->setup->checkLogSetup(
$_POST)) {
1225 $i = $this->form->getItemByPostVar(
"log_path");
1226 $i->setAlert($this->lng->txt($this->setup->getError()));
1228 } elseif (!$this->setup->checkErrorLogSetup(
$_POST[
"error_log_path"])) {
1229 $i = $this->form->getItemByPostVar(
"error_log_path");
1230 $i->setAlert($this->lng->txt($this->setup->getError()));
1232 } elseif (!$this->setup->checkPasswordSetup(
$_POST)) {
1234 } elseif (!$this->setup->saveMasterSetup(
$_POST)) {
1242 $this->form->setValuesByPost();
1255 if ($this->form->checkInput()) {
1257 $fs = array(
"datadir_path",
"log_path",
"convert_path",
"zip_path",
1258 "unzip_path",
"ghostscript_path",
"ffmpeg_path",
"lessc_path",
"phantomjs_path");
1259 foreach ($fs as $f) {
1264 if (!$this->setup->checkLogSetup(
$_POST)) {
1265 $i = $this->form->getItemByPostVar(
"log_path");
1266 $i->setAlert($this->lng->txt($this->setup->getError()));
1268 } elseif (!$this->setup->checkErrorLogSetup(
$_POST[
"error_log_path"])) {
1269 $i = $this->form->getItemByPostVar(
"error_log_path");
1270 $i->setAlert($this->lng->txt($this->setup->getError()));
1272 } elseif (!$this->setup->updateMasterSettings(
$_POST)) {
1280 $this->form->setValuesByPost();
1295 ilUtil::redirect(ILIAS_HTTP_PATH .
"/login.php?client_id=" . $this->setup->getClient()->getId());
1304 $this->tpl->setVariable(
"SETUP_LOGIN_CLASS",
" ilSetupLogin");
1305 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
1307 if ($a_omit_minit) {
1308 $m_form = $this->form->getHTML();
1310 if (!$a_omit_cinit) {
1313 $cl_form = $this->form->getHTML();
1314 if (!$a_omit_minit) {
1316 $m_form = $this->form->getHTML();
1318 $this->tpl->setVariable(
"SETUP_CONTENT", $cl_form .
"<br>" . $m_form);
1319 $this->tpl->setVariable(
"TXT_HEADER",
$lng->txt(
"login"));
1328 if ($this->form->checkInput()) {
1329 $i = $this->form->getItemByPostVar(
"mpassword");
1330 if (!$this->setup->loginAsAdmin(
$_POST[
"mpassword"])) {
1331 $i->setAlert($this->lng->txt(
"login_invalid"));
1339 $this->form->setValuesByPost();
1349 if ($this->form->checkInput()) {
1350 $i = $this->form->getItemByPostVar(
"password");
1351 if (!$this->setup->loginAsClient(
1352 array(
"client_id" =>
$_POST[
"client_id"],
1353 "username" =>
$_POST[
"username"],
"password" =>
$_POST[
"password"])
1355 $i->setAlert($this->setup->getError());
1363 $this->form->setValuesByPost();
1374 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1376 $this->form->setId(
"client_login");
1380 $ti->setMaxLength(32);
1382 $this->form->addItem($ti);
1387 $this->form->addItem($ti);
1392 $pi->setRetype(
false);
1393 $pi->setSkipSyntaxCheck(
true);
1394 $this->form->addItem($pi);
1396 $this->form->addCommandButton(
"performLogin",
$lng->txt(
"login"));
1398 $this->form->setTitle(
$lng->txt(
"client_login"));
1399 $this->form->setFormAction(
"setup.php?cmd=gateway");
1409 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1411 $this->form->setId(
"master_login");
1415 $pi->setRetype(
false);
1416 $pi->setSkipSyntaxCheck(
true);
1417 $this->form->addItem($pi);
1419 $this->form->addCommandButton(
"performMLogin",
$lng->txt(
"login"));
1421 $this->form->setTitle(
$lng->txt(
"admin_login"));
1422 $this->form->setFormAction(
"setup.php?cmd=gateway");
1436 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientlist.html",
"setup");
1437 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_list"));
1441 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"list_clients"));
1442 $this->tpl->setVariable(
"TXT_LISTSTATUS", ($this->setup->ini->readVariable(
"clients",
"list")) ? $this->lng->txt(
"display_clientlist") : $this->lng->txt(
"hide_clientlist"));
1443 $this->tpl->setVariable(
"TXT_TOGGLELIST", ($this->setup->ini->readVariable(
"clients",
"list")) ? $this->lng->txt(
"disable") : $this->lng->txt(
"enable"));
1445 include_once(
"./setup/classes/class.ilClientListTableGUI.php");
1447 $this->tpl->setVariable(
"CLIENT_LIST",
$tab->getHTML());
1450 $this->btn_next_on =
true;
1451 $this->btn_next_lng = $this->lng->txt(
"create_new_client") .
"...";
1452 $this->btn_next_cmd =
"newclient";
1478 ? str_replace(
"\\",
"/", getcwd())
1481 $tools = array(
"convert" =>
"convert",
1482 "zip" =>
"zip",
"unzip" =>
"unzip",
"ghostscript" =>
"gs",
1483 "java" =>
"java",
"ffmpeg" =>
"ffmpeg",
"lessc"=>
"lessc",
"phantomjs"=>
"phantomjs");
1484 $dirs = array(
"/usr/local",
"/usr/local/bin",
"/usr/bin",
"/bin",
"/sw/bin",
"/usr/bin");
1486 $tools = array(
"convert" =>
"convert.exe",
1487 "zip" =>
"zip.exe",
"unzip" =>
"unzip.exe");
1490 foreach ($tools as $k => $tool) {
1493 @exec(
"which " . $tool,
$ret);
1494 if (substr(
$ret[0], 0, 3) !=
"no " && substr(
$ret[0], 0, 1) ==
"/") {
1495 $a_tools[$k .
"_path"] =
$ret[0];
1500 foreach ($dirs as $dir) {
1501 if (@is_file($dir .
"/" . $tool)) {
1502 $a_tools[$k .
"_path"] = $dir .
"/" . $tool;
1525 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
1527 if ($this->setup->getClient()->status[
"ini"][
"status"]) {
1528 $this->setButtonNext(
"db");
1541 require_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1542 require_once(
'./Services/Database/classes/class.ilDBConstants.php');
1550 $this->form->addItem(
$si);
1552 $this->form->addCommandButton(
"selectdbtype",
$lng->txt(
"save"));
1554 $this->form->setTitle(
$lng->txt(
"db_selection"));
1555 $this->form->setFormAction(
"setup.php?cmd=gateway");
1569 if (
$_POST[
"db_type"] !=
"") {
1575 $has_ini = $this->setup->getClient()->status[
"ini"][
"status"];
1578 if (!
$_SESSION[
"db_type"] && $has_ini) {
1579 $_SESSION[
"db_type"] = $this->setup->getClient()->getDbType();
1582 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_ini"));
1583 if (!$a_omit_form_init) {
1587 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
1590 $this->setButtonNext(
"db");
1603 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1607 if ($this->setup->ini_client_exists) {
1609 $hi->setValue($this->client_id);
1610 $this->form->addItem($hi);
1613 $ne->setValue($this->client_id);
1614 $this->form->addItem($ne);
1617 $ti->setMaxLength(32);
1618 $ti->setRequired(
true);
1619 $this->form->addItem($ti);
1624 $sh->setTitle(
$lng->txt(
"db_conn"));
1625 $this->form->addItem($sh);
1630 $ne->setValue($at[
$_SESSION[
"db_type"]]);
1631 $this->form->addItem($ne);
1635 $ti->setMaxLength(120);
1636 $ti->setRequired(
true);
1637 $this->form->addItem($ti);
1640 require_once(
'./Services/Database/classes/class.ilDBConstants.php');
1643 $ti->setRequired(
true);
1647 $ti->setMaxLength(40);
1648 $this->form->addItem($ti);
1652 $ti->setMaxLength(40);
1653 $ti->setRequired(
true);
1654 $this->form->addItem($ti);
1658 $ti->setMaxLength(8);
1659 $this->form->addItem($ti);
1663 $ti->setMaxLength(40);
1664 $this->form->addItem($ti);
1666 $this->form->addCommandButton(
"saveClientIni",
$lng->txt(
"save"));
1668 $this->form->setTitle(
$lng->txt(
"inst_identification"));
1669 $this->form->setFormAction(
"setup.php?cmd=gateway");
1679 $values[
"db_host"] = $this->setup->getClient()->getDbHost();
1680 $values[
"db_user"] = $this->setup->getClient()->getDbUser();
1681 $values[
"db_port"] = $this->setup->getClient()->getDbPort();
1682 $values[
"db_pass"] = $this->setup->getClient()->getDbPass();
1683 $values[
"db_name"] = $this->setup->getClient()->getDbName();
1684 $values[
"client_id"] = $this->setup->getClient()->getId();
1686 $this->form->setValuesByArray($values);
1695 if ($this->form->checkInput()) {
1696 if (strlen(
$_POST[
"client_id"]) != strlen(urlencode((
$_POST[
"client_id"])))
1697 || !$this->setup->isValidClientId(
$_POST[
"client_id"])
1699 $i = $this->form->getItemByPostVar(
"client_id");
1700 $i->setAlert($this->lng->txt(
"ini_client_id_invalid"));
1703 if (strlen(
$_POST[
"client_id"]) < 4) {
1704 $i = $this->form->getItemByPostVar(
"client_id");
1705 $i->setAlert($this->lng->txt(
"ini_client_id_too_short"));
1708 if (strlen(
$_POST[
"client_id"]) > 32) {
1709 $i = $this->form->getItemByPostVar(
"client_id");
1710 $i->setAlert($this->lng->txt(
"ini_client_id_too_long"));
1713 if (!$this->setup->ini_client_exists && file_exists(ILIAS_ABSOLUTE_PATH .
"/" . ILIAS_WEB_DIR .
"/" .
$_POST[
"client_id"])) {
1714 $i = $this->form->getItemByPostVar(
"client_id");
1715 $i->setAlert($this->lng->txt(
"ini_client_id_exists"));
1720 $old_db_name = $this->setup->getClient()->getDbName();
1721 $old_db_type = $this->setup->getClient()->getDbType();
1722 $old_client_id = $this->setup->getClient()->getId();
1725 if (!$this->setup->ini_client_exists) {
1731 $this->setup->getClient()->setId(
$_POST[
"client_id"]);
1732 $this->setup->getClient()->setDbHost(
$_POST[
"db_host"]);
1733 $this->setup->getClient()->setDbName(
$_POST[
"db_name"]);
1734 $this->setup->getClient()->setDbUser(
$_POST[
"db_user"]);
1735 $this->setup->getClient()->setDbPort(
$_POST[
"db_port"]);
1736 $this->setup->getClient()->setDbPass(
$_POST[
"db_pass"]);
1737 $this->setup->getClient()->setDbType(
$_SESSION[
"db_type"]);
1738 $this->setup->getClient()->setDSN();
1741 if (!$this->setup->getClient()->getDBSetup()->isConnectable()) {
1742 $i = $this->form->getItemByPostVar(
"db_host");
1743 $i->setAlert($this->lng->txt($this->setup->getClient()->getError()));
1747 $db_installed = $this->setup->getClient()->getDBSetup()->isDatabaseInstalled();
1749 if ($db_installed and (!$this->setup->ini_ilias_exists or ($this->setup->getClient()->getDbName() != $old_db_name))) {
1750 $_POST[
"db_name"] = $old_db_name;
1751 $message = ucfirst($this->lng->txt(
"database")) .
" \"" . $this->setup->getClient()->getDbName() .
"\" "
1752 . $this->lng->txt(
"ini_db_name_exists");
1753 $i = $this->form->getItemByPostVar(
"db_name");
1758 if (!$this->setup->ini_client_exists) {
1759 if ($this->setup->saveNewClient()) {
1761 $this->setup->getClient()->status[
"ini"][
"status"] =
true;
1765 $err = $this->setup->getError();
1767 $this->setup->getClient()->status[
"ini"][
"status"] =
false;
1768 $this->setup->getClient()->status[
"ini"][
"comment"] = $err;
1771 if ($this->setup->getClient()->ini->write()) {
1773 $this->setup->getClient()->status[
"ini"][
"status"] =
true;
1776 $err = $this->setup->getClient()->ini->getError();
1778 $this->setup->getClient()->status[
"ini"][
"status"] =
false;
1779 $this->setup->getClient()->status[
"ini"][
"comment"] = $err;
1790 $this->form->setValuesByPost();
1803 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.error.html",
"setup");
1805 $this->tpl->setCurrentBlock(
"content");
1806 $this->tpl->setVariable(
"FORMACTION",
$_SESSION[
"referer"]);
1807 $this->tpl->setVariable(
"TXT_BACK", $this->lng->txt(
"back"));
1808 $this->tpl->setVariable(
"ERROR_MESSAGE", ($a_message));
1809 $this->tpl->parseCurrentBlock();
1820 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.logout.html",
"setup");
1824 $this->logged_out =
true;
1825 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"logged_out"));
1826 $this->tpl->setCurrentBlock(
"home_link");
1827 $this->tpl->setVariable(
"TXT_INDEX", $this->lng->txt(
"ilias_homepage"));
1828 $this->tpl->setVariable(
"LNK_INDEX", ILIAS_HTTP_PATH .
"/index.php");
1829 $this->tpl->parseCurrentBlock();
1837 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1839 $checklist->setHeading($this->lng->txt(
"setup_process_status"));
1842 $OK =
"<font color=\"green\"><strong>OK</strong></font>";
1844 $steps = $this->setup->getStatus();
1847 $first = array(
"selectdb" => array(
1848 "status" => ((
bool)
$_SESSION[
"db_type"] || (
bool)
$steps[
"ini"][
"status"]),
1849 "text" => $this->lng->txt(
"db_selection"),
1858 $steps[
"ini"][
"text"] = $this->lng->txt(
"setup_process_step_ini");
1859 $steps[
"db"][
"text"] = $this->lng->txt(
"setup_process_step_db");
1861 $steps[
"lang"][
"text"] = $this->lng->txt(
"setup_process_step_lang");
1862 $steps[
"contact"][
"text"] = $this->lng->txt(
"setup_process_step_contact");
1863 $steps[
"proxy"][
"text"] = $this->lng->txt(
"setup_process_step_proxy");
1864 $steps[
"nic"][
"text"] = $this->lng->txt(
"setup_process_step_nic");
1865 $steps[
"finish"][
"text"] = $this->lng->txt(
"setup_process_step_finish");
1867 $stpl =
new ilTemplate(
"tpl.process_panel.html",
true,
true,
"setup");
1872 $stpl->setCurrentBlock(
"menu_row");
1873 $stpl->setVariable(
"TXT_STEP", $this->lng->txt(
"step") .
" " . $num .
": ");
1874 $stpl->setVariable(
"TXT_ACTION", $val[
"text"]);
1875 $stpl->setVariable(
"IMG_ARROW",
"spacer.png");
1877 if ($this->cmd ==
$key and isset($this->cmd)) {
1878 $stpl->setVariable(
"HIGHLIGHT",
" style=\"font-weight:bold;\"");
1881 $status = ($val[
"status"]) ? $OK :
"";
1883 $stpl->setVariable(
"TXT_STATUS", $status);
1884 $stpl->parseCurrentBlock();
1886 $checklist->addEntry(
1887 $num .
". " . $val[
"text"],
1891 ($this->cmd ==
$key and isset($this->cmd)),
1898 $stpl->setVariable(
"TXT_SETUP_PROCESS_STATUS", $this->lng->txt(
"setup_process_status"));
1900 $this->tpl->setVariable(
"PROCESS_MENU", $checklist->getHTML());
1908 include_once(
"./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1910 $checklist->setHeading($this->lng->txt(
"overall_status"));
1912 $OK =
"<font color=\"green\"><strong>OK</strong></font>";
1916 $this->tpl->setVariable(
"TXT_OVERALL_STATUS", $this->lng->txt(
"overall_status"));
1918 if ($this->setup->getClient()->status) {
1919 foreach ($this->setup->getClient()->status as
$key => $val) {
1920 $status = ($val[
"status"]) ? $OK :
" ";
1929 $checklist->addEntry(
1930 $this->lng->txt(
"step_" .
$key),
1939 $this->tpl->setVariable(
"STATUS_PANEL", $checklist->getHTML());
1949 switch ($this->display_mode) {
1951 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientview.html",
"setup");
1953 include
"./setup/include/inc.client_tabs.php";
1954 $client_name = ($this->setup->getClient()->getName()) ? $this->setup->getClient()->getName() : $this->lng->txt(
"no_client_name");
1955 $this->tpl->setVariable(
"TXT_HEADER", $client_name .
" (" . $this->lng->txt(
"client_id") .
": " . $this->setup->getClient()->getId() .
")");
1959 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientsetup.html",
"setup");
1960 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($a_title));
1964 $this->
displayError($this->lng->txt(
"unknown_display_mode"));
1978 $sub_tab_html = $this->tabs->getSubTabHTML();
1979 if ($sub_tab_html !=
"") {
1980 $this->tpl->setVariable(
"SUBTABS", $sub_tab_html);
1990 switch ($this->display_mode) {
2006 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.clientsetup.html",
"setup");
2008 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_first_client"));
2009 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"setup_first_client"));
2013 $this->setButtonNext(
"ini");
2030 if ($this->setup->getClient()->getDBSetup()->isDatabaseInstalled()) {
2031 $this->setDbSubTabs(
"db");
2033 $ilDB = $this->setup->getClient()->getDB();
2034 $this->lng->setDbHandler(
$ilDB);
2035 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
2037 $db_status = $dbupdate->getDBVersionStatus();
2038 $hotfix_available = $dbupdate->hotfixAvailable();
2039 $custom_updates_available = $dbupdate->customUpdatesAvailable();
2040 $this->
initClientDbForm(
false, $dbupdate, $db_status, $hotfix_available, $custom_updates_available);
2042 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
2045 $this->setButtonNext(
"lang");
2048 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_db") .
"<br />" .
2049 "<p><code>CREATE DATABASE <your_db> CHARACTER SET utf8 COLLATE <your_collation></code></p>" .
2050 "<p><b>" . $this->lng->txt(
"info_text_db2") .
"</b></p><br/>");
2054 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
2055 $this->setButtonPrev(
"ini");
2067 $tabs =
new ilTemplate(
"tpl.tabs.html",
true,
true,
"Services/UIComponent/Tabs");
2069 $tabs->setCurrentBlock(
"tab");
2070 $tabs->setVariable(
"TAB_TYPE", !$edit?
"active" :
"");
2071 $tabs->setVariable(
"TAB_TEXT", $this->lng->txt(
'overview'));
2072 $tabs->setVariable(
"TAB_LINK",
"setup.php?cmd=background_tasks");
2073 $tabs->parseCurrentBlock();
2075 $tabs->setCurrentBlock(
"tab");
2076 $tabs->setVariable(
"TAB_TYPE", $edit?
"active" :
"");
2077 $tabs->setVariable(
"TAB_TEXT", $this->lng->txt(
'settings'));
2078 $tabs->setVariable(
"TAB_LINK",
"setup.php?cmd=edit_background_tasks");
2079 $tabs->parseCurrentBlock();
2084 protected function displayCache()
2086 require_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
2087 require_once(
'Services/GlobalCache/classes/class.ilGlobalCache.php');
2088 require_once(
'./Services/GlobalCache/classes/Settings/class.ilGlobalCacheSettings.php');
2095 $ilGlobalCacheSettings->readFromIniFile($this->setup->getClient()->ini);
2098 $cache_form->setTitle($this->lng->txt(
'global_cache_configuration'));
2099 $cache_form->addCommandButton(
'saveCache', $this->lng->txt(
'save'));
2100 $cache_form->setFormAction(
'setup.php?cmd=gateway');
2102 $some_inactive =
false;
2104 $service_type =
new ilRadioGroupInputGUI($this->lng->txt(
'global_cache_service_type'),
'global_cache_service_type');
2107 $service_type->addOption($option);
2110 $option =
new ilRadioOption($this->lng->txt(
'global_cache_service_type_' .
$type->getServiceType()),
$type->getServiceType());
2111 $option->setInfo($this->lng->txt(
'global_cache_install_info_' .
$type->getServiceType()));
2112 if (!
$type->isCacheServiceInstallable()) {
2113 $option->setDisabled(
true);
2114 $message .= $this->lng->txt(
'global_cache_service_type_' .
$type->getServiceType()) .
': ' .
$type->getInstallationFailureReason()
2116 $some_inactive =
true;
2118 $service_type->addOption($option);
2121 if ($some_inactive) {
2126 $service_type->setValue($ilGlobalCacheSettings->isActive() ? $ilGlobalCacheSettings->getService() : -1);
2127 $cache_form->addItem($service_type);
2128 if ($ilGlobalCacheSettings->isActive()) {
2130 $h->setTitle($this->lng->txt(
'cache_activated_components'));
2131 $cache_form->addItem(
$h);
2134 $cc =
new ilCheckboxInputGUI($this->lng->txt(
'cache_activate_' . $comp),
'activate[' . $comp .
']');
2135 $cc->setChecked($ilGlobalCacheSettings->isComponentActivated($comp));
2136 $cache_form->addItem($cc);
2139 $cc =
new ilCheckboxInputGUI($this->lng->txt(
'cache_activate_all'),
'activate[all]');
2140 $cc->setChecked($ilGlobalCacheSettings->areAllComponentActivated());
2141 $cache_form->addItem($cc);
2145 require_once(
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php');
2146 require_once(
'./Services/UIComponent/Button/classes/class.ilLinkButton.php');
2148 if ($ilGlobalCacheSettings->isActive()) {
2150 $b->setCaption(
'cache_flush');
2151 $b->setUrl(
'setup.php?cmd=flushCache');
2152 $ilToolbarGUI->addButtonInstance($b);
2156 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerTableGUI.php');
2158 $b->setCaption(
'memcache_add');
2159 $b->setUrl(
'setup.php?cmd=addMemcacheServer');
2160 $ilToolbarGUI->addButtonInstance($b);
2162 $table_html = $ilMemcacheServerTableGUI->getHTML();
2165 $this->tpl->setVariable(
'SETUP_CONTENT', $ilToolbarGUI->getHTML() . $cache_form->getHTML() . $table_html);
2171 require_once(
'Services/GlobalCache/classes/class.ilGlobalCache.php');
2172 ilGlobalCache::flushAll();
2179 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2182 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2188 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2191 $ilMemcacheServerFormGUI->setValuesByPost();
2192 if ($ilMemcacheServerFormGUI->saveObject()) {
2195 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2201 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2204 $ilMemcacheServerFormGUI->fillForm();
2205 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2211 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServerFormGUI.php');
2215 $ilMemcacheServerFormGUI->setValuesByPost();
2216 if ($ilMemcacheServerFormGUI->saveObject()) {
2219 $this->tpl->setVariable(
'SETUP_CONTENT', $ilMemcacheServerFormGUI->getHTML());
2225 require_once(
'./Services/GlobalCache/classes/Memcache/class.ilMemcacheServer.php');
2226 $ilMemcacheServer = ilMemcacheServer::find(
$_GET[
'mcsid']);
2227 $ilMemcacheServer->delete();
2232 public function saveCache()
2237 require_once(
'Services/GlobalCache/classes/class.ilGlobalCache.php');
2238 require_once(
'./Services/GlobalCache/classes/Settings/class.ilGlobalCacheSettings.php');
2239 ilGlobalCache::flushAll();
2240 $ini = $this->setup->getClient()->ini;
2243 $ilGlobalCacheSettings->readFromIniFile(
$ini);
2244 $service_type =
$_POST[
'global_cache_service_type'];
2245 $ilGlobalCacheSettings->setActive(($service_type >= 0) ?
true :
false);
2246 $ilGlobalCacheSettings->setService($service_type);
2247 $ilGlobalCacheSettings->resetActivatedComponents();
2248 if (is_array(
$_POST[
'activate']) && count(
$_POST[
'activate']) > 0) {
2249 foreach (
$_POST[
'activate'] as $comp => $a) {
2250 if ($comp ==
'all') {
2251 $ilGlobalCacheSettings->activateAll();
2254 $ilGlobalCacheSettings->addActivatedComponent($comp);
2258 $ilGlobalCacheSettings->writeToIniFile(
$ini);
2277 if (!$this->setup->getClient()->db_installed) {
2281 $this->setDbSubTabs(
"repl");
2283 if (!$a_from_save) {
2284 $ilDB = $this->setup->getClient()->db;
2285 $this->lng->setDbHandler(
$ilDB);
2290 if (!$a_from_save) {
2294 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
2308 $client = $this->setup->getClient();
2310 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2315 $ne->setValue(
$lng->txt(
"db_" .
$ilDB->getDbType()));
2316 $this->form->addItem($ne);
2320 $act->setChecked(
$client->getDbSlaveActive());
2321 $this->form->addItem($act);
2325 $ti->setValue(
$client->getDbSlaveHost());
2326 $ti->setMaxLength(120);
2327 $ti->setRequired(
true);
2328 $act->addSubItem($ti);
2332 $ti->setValue(
$client->getDbSlaveName());
2333 $ti->setRequired(
true);
2334 $ti->setMaxLength(40);
2335 $act->addSubItem($ti);
2339 $ti->setValue(
$client->getDbSlaveUser());
2340 $ti->setMaxLength(40);
2341 $ti->setRequired(
true);
2342 $act->addSubItem($ti);
2346 $ti->setValue(
$client->getDbSlavePort());
2347 $ti->setMaxLength(8);
2348 $act->addSubItem($ti);
2351 $set_pw =
new ilCheckboxInputGUI($this->lng->txt(
"db_set_password"),
"set_slave_password");
2352 $act->addSubItem($set_pw);
2356 $ti->setMaxLength(40);
2357 $set_pw->addSubItem($ti);
2359 $this->form->addCommandButton(
"saveDbSlave",
$lng->txt(
"save"));
2361 $this->form->setTitle(
$lng->txt(
"db_slave_settings"));
2362 $this->form->setFormAction(
"setup.php?cmd=gateway");
2372 $client = $this->setup->getClient();
2374 $ilDB = $this->setup->getClient()->db;
2375 $this->lng->setDbHandler(
$ilDB);
2378 if ($this->form->checkInput()) {
2379 $client->setDbSlaveActive($this->form->getInput(
"slave_active"));
2380 if ($this->form->getInput(
"slave_active")) {
2381 $client->setDbSlaveHost($this->form->getInput(
"slave_host"));
2382 $client->setDbSlaveUser($this->form->getInput(
"slave_user"));
2383 $client->setDbSlavePort($this->form->getInput(
"slave_port"));
2384 $client->setDbSlaveName($this->form->getInput(
"slave_name"));
2385 if ($this->form->getInput(
"set_slave_password")) {
2386 $client->setDbSlavePass($this->form->getInput(
"slave_pass"));
2394 $this->form->setValuesByPost();
2410 if (
$ilDB->getDbType() ==
"mysql") {
2411 $this->tabs->addSubTab(
"db", $this->lng->txt(
"db_master"),
"setup.php?client_id=" . $this->client_id .
"&cmd=db");
2412 $this->tabs->addSubTab(
"repl", $this->lng->txt(
"db_slave"),
"setup.php?client_id=" . $this->client_id .
"&cmd=dbslave");
2415 $this->tabs->activateSubTab($a_subtab_id);
2423 public function initClientDbForm($a_install =
true, $dbupdate =
null, $db_status =
false, $hotfix_available =
false, $custom_updates_available =
false)
2427 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2432 $this->form->addItem($ne);
2435 if ($this->setup->getClient()->getDBSetup()->isDatabaseInstalled()
2436 && in_array($this->setup->getClient()->getDbType(), array(
2442 $ilDB = $this->setup->getClient()->db;
2443 $ne->setValue(
$ilDB->getDBVersion());
2444 $this->form->addItem($ne);
2449 $this->form->addItem($ne);
2453 $this->form->addItem($ne);
2457 $this->form->addItem($ne);
2461 $this->form->addItem($ne);
2469 $collations = array(
2475 "utf8_icelandic_ci",
2477 "utf8_lithuanian_ci",
2483 "utf8_slovenian_ci",
2489 foreach ($collations as $collation) {
2494 $si->setInfo($this->lng->txt(
"info_text_db_collation2") .
" " .
2495 "<a target=\"_new\" href=\"http://dev.mysql.com/doc/mysql/en/charset-unicode-sets.html\">" .
2496 " MySQL Reference Manual :: 10.11.1 Unicode Character Sets</a>");
2497 $cb->addSubItem(
$si);
2499 $this->form->addItem($cb);
2503 $this->form->addCommandButton(
"installDatabase",
$lng->txt(
"database_install"));
2505 $ilDB = $this->setup->getClient()->db;
2506 $this->lng->setDbHandler(
$ilDB);
2511 $ne->setValue($dbupdate->currentVersion);
2512 $this->form->addItem($ne);
2516 $ne->setValue($dbupdate->fileVersion);
2517 $this->form->addItem($ne);
2519 if (!$db_status = $dbupdate->getDBVersionStatus()) {
2522 for (
$i = $dbupdate->currentVersion + 1; $i <= $dbupdate->fileVersion;
$i++) {
2528 $si->setInfo(
$lng->txt(
"next_update_break_info"));
2529 $this->form->addItem(
$si);
2532 if ($dbupdate->getRunningStatus() > 0) {
2533 ilUtil::sendFailure($this->lng->txt(
"db_update_interrupted") .
" (Step " . $dbupdate->getRunningStatus() .
") <br /><br />" .
2534 $this->lng->txt(
"db_update_interrupted_avoid"));
2538 $this->form->addCommandButton(
"updateDatabase",
$lng->txt(
"database_update"));
2539 $this->form->addCommandButton(
"showUpdateSteps",
$lng->txt(
"show_update_steps"));
2540 } elseif ($hotfix_available) {
2543 $ne->setValue($dbupdate->getHotfixCurrentVersion());
2544 $this->form->addItem($ne);
2548 $ne->setValue($dbupdate->getHotfixFileVersion());
2549 $this->form->addItem($ne);
2551 $this->form->addCommandButton(
"applyHotfix",
$lng->txt(
"apply_hotfixes"));
2552 $this->form->addCommandButton(
"showHotfixSteps",
$lng->txt(
"show_update_steps"));
2554 } elseif ($custom_updates_available) {
2557 $ne->setValue($dbupdate->getCustomUpdatesCurrentVersion());
2558 $this->form->addItem($ne);
2562 $ne->setValue($dbupdate->getCustomUpdatesFileVersion());
2563 $this->form->addItem($ne);
2565 $this->form->addCommandButton(
"applyCustomUpdates",
$lng->txt(
"apply_custom_updates"));
2568 if ($dbupdate->getHotfixFileVersion() > 0) {
2571 $ne->setValue($dbupdate->getHotfixCurrentVersion());
2572 $this->form->addItem($ne);
2576 $ne->setValue($dbupdate->getHotfixFileVersion());
2577 $this->form->addItem($ne);
2579 if ($dbupdate->getCustomUpdatesFileVersion() > 0) {
2582 $ne->setValue($dbupdate->getCustomUpdatesCurrentVersion());
2583 $this->form->addItem($ne);
2587 $ne->setValue($dbupdate->getCustomUpdatesFileVersion());
2588 $this->form->addItem($ne);
2594 $this->form->setTitle(
$lng->txt(
"database"));
2595 $this->form->setFormAction(
"setup.php?cmd=gateway");
2605 $values[
"db_host"] = $this->setup->getClient()->getDbHost();
2606 $values[
"db_name"] = $this->setup->getClient()->getDbName();
2607 $values[
"db_user"] = $this->setup->getClient()->getDbUser();
2608 $values[
"db_port"] = $this->setup->getClient()->getDbPort();
2610 if (is_object($dbupdate)) {
2611 $values[
"update_break"] = $dbupdate->fileVersion;
2612 if (($dbupdate->fileVersion - $dbupdate->currentVersion) >= 200) {
2613 $values[
"update_break"] = $dbupdate->currentVersion + 200 -
2614 ($dbupdate->currentVersion % 100);
2618 $this->form->setValuesByArray($values);
2633 if (!$this->setup->getClient()->getDBSetup()->isDatabaseExisting()) {
2634 if (
$_POST[
"chk_db_create"]) {
2635 if (!$this->setup->createDatabase(
$_POST[
"collation"])) {
2636 echo
"installation failed";
2645 if (!$this->setup->installDatabase()) {
2666 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
2667 include_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
2668 include_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
2669 include_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
2670 include_once
"./Services/Tree/classes/class.ilTree.php";
2671 include_once
"./Services/Xml/classes/class.ilSaxParser.php";
2672 include_once
"./Services/Object/classes/class.ilObjectDefinition.php";
2676 $ilDB = $this->setup->getClient()->db;
2677 $this->lng->setDbHandler(
$ilDB);
2681 $dbupdate->applyUpdate((
int)
$_POST[
"update_break"]);
2683 if ($dbupdate->updateMsg ==
"no_changes") {
2684 $message = $this->lng->txt(
"no_changes") .
". " . $this->lng->txt(
"database_is_uptodate");
2687 foreach ($dbupdate->updateMsg as
$row) {
2688 if (
$row[
"msg"] ==
"update_applied") {
2689 $a_message.= $sep .
$row[
"nr"];
2692 $e_message.=
"<br/>" . $this->lng->txt(
$row[
"msg"]) .
": " .
$row[
"nr"];
2695 if ($a_message !=
"") {
2696 $a_message = $this->lng->txt(
"update_applied") .
": " . $a_message;
2732 if ($this->setup->getClient()->db_installed) {
2733 $ilDB = $this->setup->getClient()->db;
2734 $this->lng->setDbHandler(
$ilDB);
2736 $db_status = $dbupdate->getDBVersionStatus();
2737 $hotfix_available = $dbupdate->hotfixAvailable();
2738 $custom_updates_available = $dbupdate->customUpdatesAvailable();
2742 $ntpl =
new ilTemplate(
"tpl.setup_steps.html",
true,
true,
"setup");
2744 $ntpl->setVariable(
"CONTENT", $dbupdate->getHotfixSteps());
2746 $ntpl->setVariable(
"CONTENT", $dbupdate->getUpdateSteps(
$_POST[
"update_break"]));
2748 $ntpl->setVariable(
"BACK", $this->lng->txt(
"back"));
2749 $ntpl->setVariable(
"HREF_BACK",
"./setup.php?client_id=&cmd=db");
2750 $this->tpl->setVariable(
"SETUP_CONTENT", $ntpl->get());
2768 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
2769 include_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
2770 include_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
2771 include_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
2772 include_once
"./Services/Tree/classes/class.ilTree.php";
2773 include_once
"./Services/Xml/classes/class.ilSaxParser.php";
2774 include_once
"./Services/Object/classes/class.ilObjectDefinition.php";
2777 $ilDB = $this->setup->getClient()->db;
2778 $this->lng->setDbHandler(
$ilDB);
2782 $dbupdate->applyHotfix();
2784 if ($dbupdate->updateMsg ==
"no_changes") {
2785 $message = $this->lng->txt(
"no_changes") .
". " . $this->lng->txt(
"database_is_uptodate");
2788 foreach ($dbupdate->updateMsg as
$row) {
2789 if (
$row[
"msg"] ==
"update_applied") {
2790 $a_message.= $sep .
$row[
"nr"];
2793 $e_message.=
"<br/>" . $this->lng->txt(
$row[
"msg"]) .
": " .
$row[
"nr"];
2796 if ($a_message !=
"") {
2797 $a_message = $this->lng->txt(
"update_applied") .
": " . $a_message;
2814 require_once(
'Services/Authentication/classes/class.ilSessionControl.php');
2818 if (!$this->setup->getClient()->db_installed) {
2820 $message =
"No database found! Please install database first.";
2827 $settings = array();
2829 foreach ($setting_fields as $field) {
2830 if ($field ==
'session_allow_client_maintenance') {
2831 if (isset(
$_POST[$field])) {
2839 $settings[$field] =
$_POST[$field];
2847 $this->setup->setSessionSettings($settings);
2850 $settings = $this->setup->getSessionSettings();
2852 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2855 include_once
'Services/Authentication/classes/class.ilSession.php';
2866 $ssettings->addOption($fixed);
2873 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_max_session_count'),
"session_max_count");
2874 $ti->setInfo($this->lng->txt(
'sess_max_session_count_info'));
2875 $ti->setMaxLength(5);
2877 $ti->setValue($settings[
'session_max_count']);
2878 $ldsh->addSubItem($ti);
2883 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_min_session_idle'),
"session_min_idle");
2884 $ti->setInfo($this->lng->txt(
'sess_min_session_idle_info'));
2885 $ti->setMaxLength(5);
2887 $ti->setValue($settings[
'session_min_idle']);
2888 $ldsh->addSubItem($ti);
2893 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_max_session_idle'),
"session_max_idle");
2894 $ti->setInfo($this->lng->txt(
'sess_max_session_idle_info'));
2895 $ti->setMaxLength(5);
2897 $ti->setValue($settings[
'session_max_idle']);
2898 $ldsh->addSubItem($ti);
2902 $ti =
new ilTextInputGUI($this->lng->txt(
'sess_max_session_idle_after_first_request'),
"session_max_idle_after_first_request");
2903 $ti->setInfo($this->lng->txt(
'sess_max_session_idle_after_first_request_info'));
2904 $ti->setMaxLength(5);
2906 $ti->setValue($settings[
'session_max_idle_after_first_request']);
2907 $ldsh->addSubItem($ti);
2910 $ssettings->addOption($ldsh);
2912 $form->addItem($ssettings);
2916 $chkb =
new ilCheckboxInputGUI($this->lng->txt(
'sess_allow_client_maintenance'),
"session_allow_client_maintenance");
2917 $chkb->setInfo($this->lng->txt(
'sess_allow_client_maintenance_info'));
2918 $chkb->setChecked($settings[
'session_allow_client_maintenance'] ?
true :
false);
2919 $form->addItem($chkb);
2923 $form->addCommandButton(
"sess", $this->lng->txt(
'save'));
2925 $form->setTitle($this->lng->txt(
"sess_sessions"));
2926 $form->setFormAction(
'setup.php?client_id=' . $this->client_id .
'&cmd=sess');
2928 $this->tpl->setVariable(
"TXT_SETUP_TITLE", ucfirst(trim($this->lng->txt(
'sess_sessions'))));
2929 $this->tpl->setVariable(
"TXT_INFO",
'');
2930 $this->tpl->setVariable(
"SETUP_CONTENT",
$form->getHTML());
2953 if (!$this->setup->getClient()->db_installed) {
2955 $message =
"No database found! Please install database first.";
2959 include_once(
"./setup/classes/class.ilSetupLanguageTableGUI.php");
2961 $this->tpl->setVariable(
"SETUP_CONTENT",
$tab->getHTML());
2963 $this->tpl->setVariable(
"TXT_SETUP_TITLE", ucfirst(trim($this->lng->txt(
"setup_languages"))));
2964 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_lang"));
2966 $installed_langs = $this->lng->getInstalledLanguages();
2967 $lang_count = count($installed_langs);
2968 if ($lang_count > 0) {
2969 $this->setup->getClient()->status[
"lang"][
"status"] =
true;
2970 $this->setup->getClient()->status[
"lang"][
"comment"] = $lang_count .
" " . $this->lng->txt(
"languages_installed");
2972 $this->setup->getClient()->status[
"lang"][
"status"] =
false;
2973 $this->setup->getClient()->status[
"lang"][
"comment"] = $this->lng->txt(
"lang_none_installed");
2976 $this->setButtonPrev(
"lang");
2978 if ($lang_count > 0) {
2979 $this->setButtonNext(
"contact");
2993 if (empty(
$_POST[
"form"][
"lang_id"])) {
2998 if (!in_array(
$_POST[
"form"][
"lang_default"],
$_POST[
"form"][
"lang_id"])) {
3003 $result = $this->lng->installLanguages(
$_POST[
"form"][
"lang_id"],
$_POST[
"form"][
"lang_local"]);
3010 $list .= $this->lng->txt(
"lang_" . $lang_key);
3012 if ($count >
$key + 1) {
3018 $this->setup->getClient()->setDefaultLanguage(
$_POST[
"form"][
"lang_default"]);
3019 $message = $this->lng->txt(
"languages_installed");
3022 $message .=
"<br/>(" . $this->lng->txt(
"langs_not_valid_not_installed") .
": " .
$list .
")";
3038 $settings = $this->setup->getClient()->getAllSettings();
3040 if (!$a_omit_init) {
3044 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
3045 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_contact"));
3046 $this->setButtonPrev(
"lang");
3048 $check = $this->setup->checkClientContact($this->setup->client);
3050 $this->setup->getClient()->status[
"contact"][
"status"] = $check[
"status"];
3051 $this->setup->getClient()->status[
"contact"][
"comment"] = $check[
"comment"];
3053 if ($check[
"status"]) {
3054 $this->setButtonNext(
"proxy");
3069 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3074 $ti->setMaxLength(64);
3076 $ti->setRequired(
true);
3077 $this->form->addItem($ti);
3081 $ti->setMaxLength(64);
3083 $this->form->addItem($ti);
3087 $ti->setMaxLength(64);
3089 $this->form->addItem($ti);
3093 $sh->setTitle(
$lng->txt(
"contact_data"));
3094 $this->form->addItem($sh);
3098 $ti->setMaxLength(64);
3100 $ti->setRequired(
true);
3101 $this->form->addItem($ti);
3105 $ti->setMaxLength(64);
3107 $ti->setRequired(
true);
3108 $this->form->addItem($ti);
3111 "title" => array(
"max" => 64,
"size" => 30),
3112 "position" => array(
"max" => 64,
"size" => 30),
3113 "institution" => array(
"max" => 200,
"size" => 30),
3114 "street" => array(
"max" => 64,
"size" => 30),
3115 "zipcode" => array(
"max" => 10,
"size" => 5),
3116 "city" => array(
"max" => 64,
"size" => 30),
3117 "country" => array(
"max" => 64,
"size" => 30),
3118 "phone" => array(
"max" => 64,
"size" => 30)
3120 foreach ($fs as $f => $op) {
3123 $ti->setMaxLength($op[
"max"]);
3124 $ti->setSize($op[
"size"]);
3125 $ti->setInfo(
$lng->txt(
""));
3126 $this->form->addItem($ti);
3130 $ti =
new ilEmailInputGUI(
$lng->txt(
"email"),
"admin_email");
3131 $ti->setRequired(
true);
3132 $ti->allowRFC822(
true);
3133 $this->form->addItem($ti);
3147 $this->form->addCommandButton(
"saveContact",
$lng->txt(
"save"));
3149 $this->form->setTitle(
$lng->txt(
"client_data"));
3150 $this->form->setFormAction(
"setup.php?cmd=gateway");
3158 $settings = $this->setup->getClient()->getAllSettings();
3160 $values = $settings;
3162 $values[
"inst_name"] = ($this->setup->getClient()->getName())
3163 ? $this->setup->getClient()->getName()
3164 : $this->setup->getClient()->getId();
3165 $values[
"inst_info"] = $this->setup->getClient()->getDescription();
3167 $this->form->setValuesByArray($values);
3178 if ($this->form->checkInput()) {
3179 $this->setup->getClient()->setSetting(
"admin_firstname",
$_POST[
"admin_firstname"]);
3180 $this->setup->getClient()->setSetting(
"admin_lastname",
$_POST[
"admin_lastname"]);
3181 $this->setup->getClient()->setSetting(
"admin_title",
$_POST[
"admin_title"]);
3182 $this->setup->getClient()->setSetting(
"admin_position",
$_POST[
"admin_position"]);
3183 $this->setup->getClient()->setSetting(
"admin_institution",
$_POST[
"admin_institution"]);
3184 $this->setup->getClient()->setSetting(
"admin_street",
$_POST[
"admin_street"]);
3185 $this->setup->getClient()->setSetting(
"admin_zipcode",
$_POST[
"admin_zipcode"]);
3186 $this->setup->getClient()->setSetting(
"admin_city",
$_POST[
"admin_city"]);
3187 $this->setup->getClient()->setSetting(
"admin_country",
$_POST[
"admin_country"]);
3188 $this->setup->getClient()->setSetting(
"admin_phone",
$_POST[
"admin_phone"]);
3189 $this->setup->getClient()->setSetting(
"admin_email",
$_POST[
"admin_email"]);
3190 $this->setup->getClient()->setSetting(
"inst_institution",
$_POST[
"inst_institution"]);
3191 $this->setup->getClient()->setSetting(
"inst_name",
$_POST[
"inst_name"]);
3196 $this->setup->getClient()->setName(
$_POST[
"inst_name"]);
3197 $this->setup->getClient()->setDescription(
$_POST[
"inst_info"]);
3198 $this->setup->getClient()->ini->write();
3204 $this->form->setValuesByPost();
3218 $settings = $this->setup->getClient()->getAllSettings();
3219 $nic_key = $this->setup->getClient()->getNICkey();
3222 $settings = $this->setup->getClient()->getAllSettings();
3224 if ($settings[
"nic_enabled"] ==
"1" && $settings[
"inst_id"] > 0) {
3225 $this->no_second_nav =
true;
3226 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_nic3") .
" " . $settings[
"inst_id"] .
".");
3229 $settings = $this->setup->getClient()->getAllSettings();
3231 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_nic"));
3232 if (!$a_omit_init) {
3236 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
3238 if (isset($settings[
"nic_enabled"])) {
3239 $this->setup->getClient()->status[
"nic"][
"status"] =
true;
3243 $this->setButtonPrev(
"proxy");
3245 if ($this->setup->getClient()->status[
"nic"][
"status"]) {
3246 $this->setButtonNext(
"finish",
"finish");
3261 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3268 $radg->addOption($op1);
3270 $radg->addOption($op1);
3271 $this->form->addItem($radg);
3273 $this->form->addCommandButton(
"saveRegistration",
$lng->txt(
"save"));
3274 $this->form->setFormAction(
"setup.php?cmd=gateway");
3282 $settings = $this->setup->getClient()->getAllSettings();
3283 $nic_key = $this->setup->getClient()->getNICkey();
3288 if (!isset($settings[
"nic_enabled"]) or $settings[
"nic_enabled"] ==
"1") {
3289 $values[
"register"] = 1;
3296 $values[
"register"] = 0;
3299 $this->form->setValuesByArray($values);
3310 if ($this->form->checkInput()) {
3312 if (
$_POST[
"register"] == 1) {
3314 $this->setup->getClient()->updateNIC($this->setup->ilias_nic_server);
3317 if (empty($this->setup->getClient()->nic_status[2])) {
3318 $this->setup->getClient()->setSetting(
"nic_enabled",
"-1");
3322 $this->setup->getClient()->setSetting(
"inst_id", $this->setup->getClient()->nic_status[2]);
3323 $this->setup->getClient()->setSetting(
"nic_enabled",
"1");
3324 $this->setup->getClient()->status[
"nic"][
"status"] =
true;
3347 $this->setup->getClient()->setSetting(
"inst_id",
"0");
3348 $this->setup->getClient()->setSetting(
"nic_enabled",
"0");
3354 $this->form->setValuesByPost();
3377 $this->tpl->setVariable(
3379 $ctrl_structure_form->getHTML() .
"<br />" .
3380 $settings_type_form->getHTML() .
'<br />' .
3381 $mp_ns_form->getHTML()
3387 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3390 $form->setId(
'tree_impl');
3391 $form->setTitle($this->lng->txt(
'tree_implementation'));
3392 $form->setFormAction(
'setup.php?cmd=gateway');
3396 #$options->setRequired(true);
3399 $type = ($set->get(
'main_tree_impl',
'ns') ==
'ns' ?
'ns' :
'mp');
3404 $ns =
new ilRadioOption($this->lng->txt(
'tree_implementation_ns'),
'ns');
3407 $mp =
new ilRadioOption($this->lng->txt(
'tree_implementation_mp'),
'mp');
3411 $form->addCommandButton(
'switchTree', $this->lng->txt(
'tree_implementation_switch_btn'));
3412 $form->setShowTopButtons(
false);
3420 $type = ($set->get(
'main_tree_impl',
'ns') ==
'ns' ?
'ns' :
'mp');
3422 if (
$type ==
'ns' and
$_POST[
'tree_impl_type'] ==
'mp') {
3424 include_once
'./Services/Tree/classes/class.ilMaterializedPathTree.php';
3427 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'lft'));
3428 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'path'));
3429 $GLOBALS[
'ilDB']->addIndex(
'tree', array(
'path'),
'i4');
3431 $set->set(
'main_tree_impl',
'mp');
3432 } elseif (
$type ==
'mp' and
$_POST[
'tree_impl_type'] ==
'ns') {
3433 include_once
'./Services/Tree/classes/class.ilTree.php';
3435 $GLOBALS[
"DIC"][
"ilSetting"] =
function ($c) {
3441 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'lft'));
3442 $GLOBALS[
'ilDB']->dropIndexByFields(
'tree', array(
'path'));
3443 $GLOBALS[
'ilDB']->addIndex(
'tree', array(
'lft'),
'i4');
3445 $set->set(
'main_tree_impl',
'ns');
3459 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3462 $form->setId(
"control_structure");
3463 $form->setTitle($this->lng->txt(
"ctrl_structure"));
3464 $form->setFormAction(
"setup.php?cmd=gateway");
3466 $ilDB = $this->setup->getClient()->db;
3467 $cset =
$ilDB->query(
"SELECT count(*) as cnt FROM ctrl_calls");
3468 $crec =
$ilDB->fetchAssoc($cset);
3471 if ($crec[
"cnt"] == 0) {
3472 $item->setInfo($this->lng->txt(
"ctrl_missing_desc"));
3474 $item->setInfo($this->lng->txt(
"ctrl_structure_desc"));
3476 $form->addItem($item);
3478 $form->addCommandButton(
"reloadStructure", $this->lng->txt(
"reload"));
3490 if (!$this->setup->getClient()->db_installed) {
3497 $GLOBALS[
"ilDB"] = $this->setup->getClient()->getDB();
3498 $GLOBALS[
"DIC"][
"ilDB"] =
function ($c) {
3503 require_once
"./setup/classes/class.ilModuleReader.php";
3504 require_once
"./setup/classes/class.ilServiceReader.php";
3505 require_once
"./setup/classes/class.ilCtrlStructureReader.php";
3507 require_once
"./Services/Component/classes/class.ilModule.php";
3508 require_once
"./Services/Component/classes/class.ilService.php";
3515 foreach ($modules as
$module) {
3517 ILIAS_ABSOLUTE_PATH .
"/Modules/" .
$module[
"subdir"] .
"/module.xml",
3530 ILIAS_ABSOLUTE_PATH .
"/Services/" .
$service[
"subdir"] .
"/service.xml",
3551 include_once(
"./Services/Administration/classes/class.ilSetting.php");
3554 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3557 $form->setId(
"settings_type");
3558 $form->setTitle($this->lng->txt(
"settings_type"));
3559 $form->setFormAction(
"setup.php?cmd=gateway");
3562 $item->setValue(strtoupper(
$type));
3564 if (
$type ==
"clob") {
3565 $item->setInfo($this->lng->txt(
'settings_info_clob'));
3566 $form->addCommandButton(
"showLongerSettings", $this->lng->txt(
"settings_show_longer"));
3567 $form->addCommandButton(
"changeSettingsType", $this->lng->txt(
"settings_change_text"));
3569 $item->setInfo($this->lng->txt(
'settings_info_text'));
3570 $form->addCommandButton(
"changeSettingsType", $this->lng->txt(
"settings_change_clob"));
3572 $form->addItem($item);
3574 if (is_array($this->longer_settings)) {
3577 if (count($this->longer_settings)) {
3578 foreach ($this->longer_settings as
$row) {
3580 $subitem->setInfo(
$row[
'value']);
3581 $item->addSubItem($subitem);
3584 $item->setHTML($this->lng->txt(
'settings_no_longer_values'));
3586 $form->addItem($item);
3598 include_once(
"./Services/Administration/classes/class.ilSetting.php");
3601 if ($old_type ==
"clob") {
3603 if (count($longer_settings)) {
3604 $this->longer_settings = $longer_settings;
3627 include_once(
"./Services/Administration/classes/class.ilSetting.php");
3637 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
3638 $form = new \ilPropertyFormGUI();
3639 $form->setTitle($this->lng->txt(
'change_password'));
3641 $currentPassword = new \ilPasswordInputGUI($this->lng->txt(
'set_oldpasswd'),
'pass_old');
3642 $currentPassword->setDisableHtmlAutoComplete(
true);
3643 $currentPassword->setValidateAuthPost(
false);
3644 $currentPassword->setSkipSyntaxCheck(
true);
3645 $currentPassword->setRequired(
true);
3646 $currentPassword->setRetype(
false);
3647 $form->addItem($currentPassword);
3649 $newPassword = new \ilPasswordInputGUI($this->lng->txt(
'set_newpasswd'),
'pass');
3650 $newPassword->setDisableHtmlAutoComplete(
true);
3651 $newPassword->setValidateAuthPost(
false);
3652 $newPassword->setSkipSyntaxCheck(
true);
3653 $newPassword->setRequired(
true);
3654 $newPassword->setRetype(
true);
3655 $form->addItem($newPassword);
3657 $form->setFormAction(
'setup.php?cmd=gateway');
3658 $form->addCommandButton(
'savemasterpassword', $this->lng->txt(
'save'));
3670 $isValid =
$form->checkInput();
3671 $form->setValuesByPost();
3677 $cp =
$form->getInput(
'pass_old');
3678 $np =
$form->getInput(
'pass');
3680 if (md5($cp) != $this->setup->getPassword()) {
3685 if (!$this->setup->setPassword($np)) {
3700 if (
null ===
$form) {
3704 $this->tpl->addBlockFile(
'CONTENT',
'content',
'tpl.std_layout.html',
'setup');
3705 $this->tpl->setVariable(
'TXT_HEADER', $this->lng->txt(
'password_new_master'));
3706 $this->tpl->setVariable(
'TXT_INFO', $this->lng->txt(
'info_text_password'));
3707 $this->tpl->setVariable(
'SETUP_CONTENT',
$form->getHTML());
3716 $this->no_second_nav =
true;
3719 $txt_info = $this->lng->txt(
"info_text_finish1") .
"<br /><br />" .
3720 "<p>" . $this->lng->txt(
"user") .
": <b>root</b><br />" .
3721 $this->lng->txt(
"password") .
": <b>homer</b></p>";
3722 $this->setButtonNext(
"login_new",
"login");
3724 $this->setup->getClient()->reconnect();
3727 $this->setup->getClient()->setSetting(
"setup_ok", 1);
3730 $this->setup->getClient()->status[
"finish"][
"status"] =
true;
3733 $txt_info = $this->lng->txt(
"info_text_finish2");
3738 $this->tpl->addBlockFile(
"SETUP_CONTENT",
"setup_content",
"tpl.clientsetup_finish.html",
"setup");
3739 $this->tpl->setVariable(
"TXT_INFO", $txt_info);
3741 $this->setButtonPrev(
"nic");
3755 if (
$_POST[
"form"][
"delete"]) {
3780 $msg = $this->setup->getClient()->delete(
$ini, $db,
$files);
3786 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_delete"));
3789 $this->tpl->addBlockFile(
"SETUP_CONTENT",
"setup_content",
"tpl.form_delete_client.html",
"setup");
3792 $this->tpl->setVariable(
"FORMACTION",
"setup.php?cmd=gateway");
3793 $this->tpl->setVariable(
"TXT_DELETE", $this->lng->txt(
"delete"));
3794 $this->tpl->setVariable(
"TXT_DELETE_CONFIRM", $this->lng->txt(
"delete_confirm"));
3795 $this->tpl->setVariable(
"TXT_DELETE_INFO", $this->lng->txt(
"delete_info"));
3807 if ($this->setup->getClient()->status[
"finish"][
"status"]) {
3808 $val = ($this->setup->getClient()->ini->readVariable(
"client",
"access")) ?
"0" :
true;
3809 $this->setup->getClient()->ini->setVariable(
"client",
"access", $val);
3810 $this->setup->getClient()->ini->write();
3811 $message =
"client_access_mode_changed";
3813 $message =
"client_setup_not_finished";
3834 $status = $this->setup->getStatus(
$client);
3836 if ($status[
"finish"][
"status"]) {
3837 $this->setup->ini->setVariable(
"clients",
"default",
$client->getId());
3838 $this->setup->ini->write();
3839 $message =
"default_client_changed";
3841 $message =
"client_setup_not_finished";
3856 foreach ($this->setup->getClient()->status as
$key => $val) {
3857 if (
$key !=
"finish" and
$key !=
"access") {
3858 if ($val[
"status"] !=
true) {
3865 $clientlist =
new ilClientList($this->setup->db_connections);
3867 $list = $clientlist->getClients();
3869 if (count(
$list) == 1) {
3870 $this->setup->ini->setVariable(
"clients",
"default", $this->setup->getClient()->getId());
3871 $this->setup->ini->write();
3873 $this->setup->getClient()->ini->setVariable(
"client",
"access", 1);
3874 $this->setup->getClient()->ini->write();
3885 if (!$this->setup->getClient()->status[
"db"][
"status"]) {
3889 } elseif (!$this->setup->getClient()->status[
"lang"][
"status"]) {
3890 $this->cmd =
"lang";
3893 } elseif (!$this->setup->getClient()->status[
"contact"][
"status"]) {
3894 $this->cmd =
"contact";
3897 } elseif (!$this->setup->getClient()->status[
'proxy'][
'status']) {
3898 $this->cmd =
"proxy";
3901 } elseif (!$this->setup->getClient()->status[
"nic"][
"status"]) {
3905 } elseif (!$this->setup->getClient()->status[
"finish"][
"status"]) {
3906 $this->cmd =
"finish";
3919 if ($this->setup->ini->readVariable(
"clients",
"list")) {
3920 $this->setup->ini->setVariable(
"clients",
"list",
"0");
3921 $this->setup->ini->write();
3924 $this->setup->ini->setVariable(
"clients",
"list",
"1");
3925 $this->setup->ini->write();
3942 include_once
"./Services/Database/classes/class.ilDBUpdate.php";
3943 include_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
3944 include_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
3945 include_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
3946 include_once
"./Services/Tree/classes/class.ilTree.php";
3947 include_once
"./Services/Xml/classes/class.ilSaxParser.php";
3948 include_once
"./Services/Object/classes/class.ilObjectDefinition.php";
3951 $ilDB = $this->setup->getClient()->db;
3952 $this->lng->setDbHandler(
$ilDB);
3956 $dbupdate->applyCustomUpdates();
3958 if ($dbupdate->updateMsg ==
"no_changes") {
3959 $message = $this->lng->txt(
"no_changes") .
". " . $this->lng->txt(
"database_is_uptodate");
3962 foreach ($dbupdate->updateMsg as
$row) {
3963 if (
$row[
"msg"] ==
"update_applied") {
3964 $a_message.= $sep .
$row[
"nr"];
3967 $e_message.=
"<br/>" . $this->lng->txt(
$row[
"msg"]) .
": " .
$row[
"nr"];
3970 if ($a_message !=
"") {
3971 $a_message = $this->lng->txt(
"update_applied") .
": " . $a_message;
3988 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3991 $this->form->setId(
"clone_form");
3992 $this->form->setFormAction(
"setup.php?cmd=gateway");
3994 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) {
3995 $this->form->setTitle($this->lng->txt(
"clone_source"));
3997 $clientlist =
new ilClientList($this->setup->db_connections);
3998 $list = $clientlist->getClients();
3999 $clientlistarray = array();
4002 if ((strcmp(
$key, $this->setup->getClient()->getId()) !=
'0') && (
$client->getDbType() ==
'mysql')) {
4009 $si->setOptions(array_merge(
4010 array(
"" =>
"-- " .
$lng->txt(
"please_select") .
" --"),
4013 $si->setRequired(
true);
4014 $this->form->addItem(
$si);
4017 $cb->setRequired(
true);
4018 $this->form->addItem($cb);
4020 $this->form->addCommandButton(
"cloneSaveSource",
$lng->txt(
"cloneit"));
4022 $disabledmessage =
"<h1>" . $this->lng->txt(
"clone_disabledmessage") .
"</h1><br>";
4023 if (!$this->setup->getClient()->status[
"access"][
"status"] ===
false) {
4024 $disabledmessage .= $this->lng->txt(
"clone_clientnotdisabled") .
"<br>";
4026 if (!stripos($this->setup->getClient()->getName(),
"aster") ===
false) {
4027 $disabledmessage .= $this->lng->txt(
"clone_clientismaster") .
"<br>";
4029 if ($this->setup->getClient()->getdbType() !=
"mysql") {
4030 $disabledmessage .= $this->lng->txt(
"clone_clientisnotmysql") .
"<br>";
4032 if (!$this->setup->getClient()->db_exists) {
4033 $disabledmessage .= $this->lng->txt(
"clone_clientnodatabase") .
"<br>";
4035 $this->form->setTitle($disabledmessage);
4041 if (!$this->setup->isAdmin()) {
4046 $this->form->setValuesByPost();
4047 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_clone"));
4048 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4055 if (!$this->setup->isAdmin()) {
4061 if ($this->form->checkInput()) {
4064 if ($this->form->getInput(
"iamsure") !=
"1") {
4065 $error = $this->lng->txt(
'clone_youmustcheckiamsure');
4068 if (!$this->setup->cloneFromSource($this->form->getInput(
"source"))) {
4069 $error = $this->lng->txt(
'clone_error') .
' -> ' . $this->setup->error;
4072 if (0 === strlen(
$error)) {
4078 $this->form->setValuesByPost();
4079 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_clone"));
4080 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4086 $settings = $this->setup->getClient()->getAllSettings();
4088 if (!$a_omit_init) {
4089 include_once(
"./Services/Administration/classes/class.ilSetting.php");
4091 $this->form->setValuesByArray(array(
4092 'proxy_status' => (
bool) $settings[
'proxy_status'],
4093 'proxy_host' => $settings[
'proxy_host'],
4094 'proxy_port' => $settings[
'proxy_port']
4096 if ((
bool) $settings[
'proxy_status']) {
4097 $this->setup->printProxyStatus($this->setup->client);
4100 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4101 $this->tpl->setVariable(
"TXT_INFO", $this->lng->txt(
"info_text_proxy"));
4104 $check = $this->setup->checkClientProxySettings($this->setup->client);
4106 $this->setup->getClient()->status[
"proxy"][
"status"] = $check[
"status"];
4107 $this->setup->getClient()->status[
"proxy"][
"comment"] = $check[
"comment"];
4108 $this->setup->getClient()->status[
"proxy"][
"text"] = $check[
"comment"];
4110 if ($check[
"status"]) {
4111 $this->setButtonNext(
"nic");
4114 $this->setButtonPrev(
"contact");
4121 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
4123 $this->form->setFormAction(
"setup.php?cmd=gateway");
4127 $proxs->setInfo(
$lng->txt(
'proxy_status_info'));
4128 $proxs->setValue(1);
4129 $this->form->addItem($proxs);
4133 $proxs->addSubItem($proxa);
4137 $prox->setInfo(
$lng->txt(
'proxy_host_info'));
4138 $proxs->addSubItem($prox);
4142 $proxp->setInfo(
$lng->txt(
'proxy_port_info'));
4143 $proxp->setSize(10);
4144 $proxp->setMaxLength(10);
4145 $proxs->addSubItem($proxp);
4148 $this->form->addCommandButton(
'saveProxy',
$lng->txt(
'save'));
4163 $isFormValid = $this->form->checkInput();
4165 $new_settings[
'proxy_status'] = (int) $this->form->getInput(
'proxy_status');
4166 $new_settings[
'proxy_host'] = trim($this->form->getInput(
'proxy_host'));
4167 $new_settings[
'proxy_port'] = trim($this->form->getInput(
'proxy_port'));
4170 if ($new_settings[
'proxy_status'] ==
true) {
4171 if (!strlen($new_settings[
'proxy_host'])) {
4172 $isFormValid =
false;
4173 $this->form->getItemByPostVar(
'proxy_host')->setAlert(
$lng->txt(
'msg_input_is_required'));
4175 if (!strlen($new_settings[
'proxy_port'])) {
4176 $isFormValid =
false;
4177 $this->form->getItemByPostVar(
'proxy_port')->setAlert(
$lng->txt(
'msg_input_is_required'));
4179 if (!preg_match(
'/[0-9]{1,}/', $new_settings[
'proxy_port']) ||
4180 $new_settings[
'proxy_port'] < 0 ||
4181 $new_settings[
'proxy_port'] > 65535) {
4182 $isFormValid =
false;
4183 $this->form->getItemByPostVar(
'proxy_port')->setAlert(
$lng->txt(
'proxy_port_numeric'));
4188 $this->setup->saveProxySettings($new_settings);
4191 $settings = $this->setup->getClient()->getAllSettings();
4192 if ($settings[
'proxy_status'] ==
true) {
4193 $this->setup->printProxyStatus($this->setup->client);
4200 $this->form->setValuesByPost();
4201 $this->tpl->setVariable(
"SETUP_CONTENT", $this->form->getHTML());
4210 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
4212 include_once(
"./setup/classes/class.ilBackgroundTaskTableGUI.php");
4215 $this->tpl->setVariable(
"SETUP_CONTENT", $this->
bt_tabs()->
get() .
$table->getHTML());
4224 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
4227 $form->setTitle($this->lng->txt(
'background_task_configuration'));
4228 $form->addCommandButton(
'save_background_tasks', $this->lng->txt(
'save'));
4229 $form->addCommandButton(
'background_tasks', $this->lng->txt(
'cancel'));
4230 $form->setFormAction(
'setup.php?cmd=gateway');
4235 $rgroup->addOption($cc);
4238 $rgroup->addOption($cc);
4240 $form->addItem($rgroup);
4242 $i =
new ilNumberInputGUI($this->lng->txt(
'max_number_of_concurrent_tasks'),
'number_of_concurrent_tasks');
4250 require_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
4252 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.std_layout.html",
"setup");
4257 $this->tpl->setVariable(
"SETUP_CONTENT", $this->
bt_tabs(
true)->
get() .
$form->getHTML());
4265 $n_of_tasks = $this->setup->ini->readVariable(
"background_tasks",
"number_of_concurrent_tasks");
4266 $sync = $this->setup->ini->readVariable(
"background_tasks",
"concurrency");
4268 $n_of_tasks = $n_of_tasks ? $n_of_tasks : 5;
4271 $form->setValuesByArray([
4272 'concurrency' =>
$sync,
4273 'number_of_concurrent_tasks' => $n_of_tasks
4280 $form->setValuesByPost();
4283 if (!
$form->checkInput()) {
4284 $this->tpl->setVariable(
'CONTENT', $this->
bt_tabs(
true)->
get() .
$form->getHTML());
4303 if (!$this->setup->ini->groupExists(
'background_tasks')) {
4304 $this->setup->ini->addGroup(
'background_tasks');
4305 var_dump($this->setup->ini->getError());
4306 $this->setup->ini->write();
4307 var_dump($this->setup->ini->getError());
4310 $this->setup->ini->setVariable(
"background_tasks",
"concurrency",
$form->getInput(
'concurrency'));
4311 $this->setup->ini->setVariable(
"background_tasks",
"number_of_concurrent_tasks",
$form->getInput(
'number_of_concurrent_tasks'));
4313 return $this->setup->ini->write();
4320 $client = $this->setup->getClient();
4324 $bucket_ids = $persistence->getBucketIdsByState(State::SCHEDULED);
4325 foreach ($bucket_ids as $bucket_id) {
4326 $persistence->deleteBucketById($bucket_id);
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
Class ilBackgroundTaskTableGUI.
static _getShortTimeZoneList()
get short timezone list
static getAvailableTypes($with_descriptions=true)
static getInstallableTypes()
Class ilGlobalCacheSettings.
static getAllTypes($only_available=true)
static getAvailableComponents()
static createFromParentReleation()
Class ilMemcacheServerTableGUI.
static getAvailableCoreModules()
Get all available core modules.
This class represents a non editable value in a property form.
This class represents an option in a radio group.
static getAvailableCoreServices()
Get all available core services.
static getSettingFields()
returns the array of setting fields
const SESSION_HANDLING_LOAD_DEPENDENT
const SESSION_HANDLING_FIXED
static _getLongerSettings($a_limit='4000')
get a list of setting records with values loger than a limit
static _getValueType()
Get the type of the value column in the database.
static _changeValueType($a_new_type='text')
change the type of the value column in the database
checkDisplayMode($a_title="")
determine display mode and load according html layout
displayMasterSetup($a_omit_init=false)
display master setup form & process form input
applyHotfix()
Apply hotfixes.
initControlStructureForm()
Init the form to reload the control structure.
displayClientList()
display client list and process form input
initSettingsTypeForm()
Init the form to change the settings value type.
cmdInstall()
process valid commands for pre-installation status
displayError($a_message)
display error page
fillBackgroundTasksForm(&$form)
displayContactData($a_omit_init=false)
display contact data form and process form input
installDatabase()
Install the database.
initTreeImplementationForm()
displayClientOverview()
display client overview panel
loginClient()
login to a client
displayFinishSetup()
display finish setup page
initMasterLoginForm()
Init master login form.
saveProxy()
Save proxy settings.
setDisplayMode($a_mode)
set display mode to 'view' or 'setup' 'setup' -> show status panel and (prev/next) navigation buttons...
showUpdateSteps($a_hotfix=false)
Update database.
reloadControlStructure()
reload control structure
getMasterPasswordForm()
return \ilPropertyFormGUI
displayDeleteConfirmation()
display delete client confirmation form and process form input
getContactValues()
Get current values for contact from.
displayNavButtons()
display navigation buttons
getBasicSettingsValues()
Get current values for basic settings from.
displayTools()
display tools
displaySubTabs()
Show subtabs.
displayIni($a_omit_form_init=false)
display setup in step
displayHeader()
display header with admin links and language flags
updateDatabase()
Update database.
performMLogin()
Master Login.
displayProcessPanel()
display process panel
changeMasterPassword(\ilPropertyFormGUI $form=null)
display change password form and process form input
validateSetup()
validatesetup status again and set access mode of the first client to online
initDBSelectionForm()
Init db selection form.
displayStartup()
display intro page for the first client installation
jumpToFirstUnfinishedSetupStep()
if setting up a client was not finished, jump back to the first uncompleted setup step
initRegistrationForm($a_mode="edit")
Init registration form.
__construct()
Constructor.
setDbSubtabs($a_subtab_id="db")
Set db subtabs.
saveLanguages()
Save languages.
initDbSlaveForm()
Init db slave form.
saveRegistration()
Save registration form.
initClientLoginForm()
Init client login form.
initContactDataForm()
Init contact data form.
SetButtonPrev($a_cmd=0, $a_lng=0)
set previous navigation button
displayPreliminaries()
display preliminaries page
changeSettingsType()
change the type of the value field in settings table
showHotfixSteps()
Show hotfix steps.
getClientIniValues()
Get current values for client ini from.
selectDBType()
Select database type.
saveContact()
Save contact form.
getRegistrationValues()
Get current values for registration from.
displayStatusPanel()
display status panel
determineToolsPathInstall()
Determine tools paths.
changeAccessMode($a_back)
enable/disable access to a client
saveBasicSettings()
Save basic settings form.
saveDbSlave()
Save db slave form.
changeDefaultClient()
set defualt client
saveClientIni()
Save client ini form.
SetButtonNext($a_cmd, $a_lng=0)
set next navigation button
updateBasicSettings()
Update basic settings form.
initClientDbForm($a_install=true, $dbupdate=null, $db_status=false, $hotfix_available=false, $custom_updates_available=false)
Init client db form.
displayNIC($a_omit_init=false)
display nic registration form and process form input
initClientIniForm()
Init client ini form.
determineToolsPath()
Determine tools paths.
displaySessions()
display sessions form and process form input
initBasicSettingsForm($a_install=false)
Init basic settings form.
displayDatabase()
display database form and process form input
displayLanguages()
display language form and process form input
toggleClientList()
enable/disable client list on index page
createBackgroundTasksForm()
showLongerSettings()
show a list of setting values that are loger than 4000 characters
cloneInitForm()
Initialize clone form.
displayLogin($a_omit_minit=false, $a_omit_cinit=false)
display login form and process form
cmdClient()
process valid commands for all clients
determineTools($a_tools=array())
Determine Tools.
displayLogout()
display logout page
displayDatabaseSlave($a_from_save=false)
Display database slave.
initClientOverviewForm()
Init client overview form.
checkPanelMode()
determine display mode and load correct panel
displayProxy($a_omit_init=false)
getClientDbFormValues($dbupdate=null)
Get current values for client db from.
cmdAdmin()
process valid commands for admins
changeMasterSettings($a_omit_init=false)
display master settings and process form input
displayFooter()
page output and set title
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static init($a_tpl=null)
Init.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static isWindows()
check wether the current client system is a windows system
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static initDomEvent()
Init YUI DomEvent.
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if(!empty($this->data['faventry'])) $tabs
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
catch(Exception $e) $message
if($modEnd===false) $module
if(empty($password)) $table
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']