18 : void
19 {
20 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
21 if ($client_ini) {
22 $storage->storeConfigText(
23 "type",
24 $client_ini->readVariable("db", "type") ?? "mysql",
25 "The storage backend that is used for the database."
26 );
27 $storage->storeConfigText(
28 "host",
29 $client_ini->readVariable("db", "host"),
30 "The host where the storage backend is located."
31 );
32 $storage->storeConfigText(
33 "port",
34 $client_ini->readVariable("db", "port"),
35 "The port where the storage backend is located at the host."
36 );
37 $storage->storeConfigText(
38 "name",
39 $client_ini->readVariable("db", "name"),
40 "The name of the database in the storage backend."
41 );
42 $storage->storeConfigText(
43 "user",
44 $client_ini->readVariable("db", "user"),
45 "The user to be used for the storage backend."
46 );
47 $storage->storeConfigText(
48 "pass",
49 PHP_SAPI === 'cli' ? $client_ini->readVariable("db", "pass") : '********',
50 "The password for the user for the storage backend."
51 );
52 }
53
54
55 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
56 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
58 return;
59 }
60 $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
61
62
63
64
65
67 $GLOBALS[
"DIC"] =
new DI\Container();
71 $GLOBALS[
"DIC"][
"ilLog"] =
new class() {
72 public function write()
73 {
74 }
75 public function info()
76 {
77 }
78 public function warning($msg)
79 {
80 }
81 public function error($msg)
82 {
83 }
84 };
86 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
new class() {
87 public function getRootLogger()
88 {
89 return new class() {
90 public function write()
91 {
92 }
93 };
94 }
95 };
96 $GLOBALS[
"ilCtrlStructureReader"] =
new class() {
97 public function getStructure()
98 {
99 }
100 public function setIniFile()
101 {
102 }
103 };
104 if (!defined("CLIENT_DATA_DIR")) {
105 define(
"CLIENT_DATA_DIR",
$ini->readVariable(
"clients",
"datadir") .
"/" .
$client_id);
106 }
107 if (!defined("CLIENT_WEB_DIR")) {
108 define(
"CLIENT_WEB_DIR", dirname(__DIR__, 4) .
"/data/" .
$client_id);
109 }
110 if (!defined("ILIAS_ABSOLUTE_PATH")) {
111 define("ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
112 }
113 if (!defined("ILIAS_LOG_ENABLED")) {
114 define("ILIAS_LOG_ENABLED", false);
115 }
116 if (!defined("ROOT_FOLDER_ID")) {
117 define("ROOT_FOLDER_ID", $client_ini->readVariable("system", "ROOT_FOLDER_ID"));
118 }
119 if (!defined("ROLE_FOLDER_ID")) {
120 define("ROLE_FOLDER_ID", $client_ini->readVariable("system", "ROLE_FOLDER_ID"));
121 }
122 if (!defined("SYSTEM_FOLDER_ID")) {
123 define("SYSTEM_FOLDER_ID", $client_ini->readVariable("system", "SYSTEM_FOLDER_ID"));
124 }
125
126 $db_update =
new class($db, $client_ini) extends
ilDBUpdate {
127 public function loadXMLInfo()
128 {
129 }
130 };
132
133 $storage->storeStableCounter(
134 "version",
135 $db_update->getCurrentVersion(),
136 "The version of the database schema that is currently installed."
137 );
138 $storage->storeStableCounter(
139 "available_version",
140 $db_update->getFileVersion(),
141 "The version of the database schema that is available in the current source."
142 );
143 $storage->storeStableBool(
144 "update_required",
145 !$db_update->getDBVersionStatus(),
146 "Does the database require an update?"
147 );
148 $storage->storeStableCounter(
149 "hotfix_version",
150 $db_update->getHotfixCurrentVersion() ?? 0,
151 "The version of the hotfix database schema that is currently installed."
152 );
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."
157 );
158 $storage->storeStableBool(
159 "hotfix_required",
160 $db_update->hotfixAvailable(),
161 "Does the database require a hotfix update?"
162 );
163 $storage->storeStableCounter(
164 "custom_version",
165 $db_update->getCustomUpdatesCurrentVersion() ?? 0,
166 "The version of the custom database schema that is currently installed."
167 );
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."
172 );
173 $storage->storeStableBool(
174 "custom_update_required",
175 $db_update->customUpdatesAvailable(),
176 "Does the database require a custom update?"
177 );
178
180 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
error($a_errmsg)
set error message @access public
readCustomUpdatesInfo($a_force=false)