20 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
22 $storage->storeConfigText(
24 $client_ini->readVariable(
"db",
"type") ??
"mysql",
25 "The storage backend that is used for the database." 27 $storage->storeConfigText(
29 $client_ini->readVariable(
"db",
"host"),
30 "The host where the storage backend is located." 32 $storage->storeConfigText(
34 $client_ini->readVariable(
"db",
"port"),
35 "The port where the storage backend is located at the host." 37 $storage->storeConfigText(
39 $client_ini->readVariable(
"db",
"name"),
40 "The name of the database in the storage backend." 42 $storage->storeConfigText(
44 $client_ini->readVariable(
"db",
"user"),
45 "The user to be used for the storage backend." 47 $storage->storeConfigText(
49 PHP_SAPI ===
'cli' ? $client_ini->readVariable(
"db",
"pass") :
'********',
50 "The password for the user for the storage backend." 55 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
56 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
60 $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
67 $GLOBALS[
"DIC"] =
new DI\Container();
71 $GLOBALS[
"DIC"][
"ilLog"] =
new class() {
72 public function write()
75 public function info()
78 public function warning($msg)
81 public function error($msg)
86 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
new class() {
87 public function getRootLogger()
90 public function write()
96 $GLOBALS[
"ilCtrlStructureReader"] =
new class() {
97 public function getStructure()
100 public function setIniFile()
104 if (!defined(
"CLIENT_DATA_DIR")) {
105 define(
"CLIENT_DATA_DIR",
$ini->readVariable(
"clients",
"datadir") .
"/" .
$client_id);
107 if (!defined(
"CLIENT_WEB_DIR")) {
108 define(
"CLIENT_WEB_DIR", dirname(__DIR__, 4) .
"/data/" .
$client_id);
110 if (!defined(
"ILIAS_ABSOLUTE_PATH")) {
111 define(
"ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
113 if (!defined(
"ILIAS_LOG_ENABLED")) {
114 define(
"ILIAS_LOG_ENABLED",
false);
116 if (!defined(
"ROOT_FOLDER_ID")) {
117 define(
"ROOT_FOLDER_ID", $client_ini->readVariable(
"system",
"ROOT_FOLDER_ID"));
119 if (!defined(
"ROLE_FOLDER_ID")) {
120 define(
"ROLE_FOLDER_ID", $client_ini->readVariable(
"system",
"ROLE_FOLDER_ID"));
122 if (!defined(
"SYSTEM_FOLDER_ID")) {
123 define(
"SYSTEM_FOLDER_ID", $client_ini->readVariable(
"system",
"SYSTEM_FOLDER_ID"));
126 $db_update =
new class(
$db, $client_ini) extends
ilDBUpdate {
127 public function loadXMLInfo()
133 $storage->storeStableCounter(
135 $db_update->getCurrentVersion(),
136 "The version of the database schema that is currently installed." 138 $storage->storeStableCounter(
140 $db_update->getFileVersion(),
141 "The version of the database schema that is available in the current source." 143 $storage->storeStableBool(
145 !$db_update->getDBVersionStatus(),
146 "Does the database require an update?" 148 $storage->storeStableCounter(
150 $db_update->getHotfixCurrentVersion() ?? 0,
151 "The version of the hotfix database schema that is currently installed." 153 $storage->storeStableCounter(
154 "available_hotfix_version",
155 $db_update->getHotfixFileVersion() ?? 0,
156 "The version of the hotfix database schema that is available in the current source." 158 $storage->storeStableBool(
160 $db_update->hotfixAvailable(),
161 "Does the database require a hotfix update?" 163 $storage->storeStableCounter(
165 $db_update->getCustomUpdatesCurrentVersion() ?? 0,
166 "The version of the custom database schema that is currently installed." 168 $storage->storeStableCounter(
169 "available_custom_version",
170 $db_update->getCustomUpdatesFileVersion() ?? 0,
171 "The version of the custom database schema that is available in the current source." 173 $storage->storeStableBool(
174 "custom_update_required",
175 $db_update->customUpdatesAvailable(),
176 "Does the database require a custom update?"
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
readCustomUpdatesInfo($a_force=false)