From f757f5ddd7a92baa307c16fc90da7cf4f1f5960e Mon Sep 17 00:00:00 2001 From: mjansen Date: Mon, 9 Dec 2024 11:30:10 +0100 Subject: [PATCH] Customizing/Init: Fix wrong path value in `ILIAS_WEB_DIR` constant See: https://mantis.ilias.de/view.php?id=43107#c110424 --- ...ss.ilComponentActivatePluginsObjective.php | 4 +++- ...lass.ilComponentInstallPluginObjective.php | 4 +++- ...class.ilComponentUpdatePluginObjective.php | 4 +++- ...class.ilPluginLanguageUpdatedObjective.php | 4 +++- ...class.ilResourceStorageMigrationHelper.php | 4 +++- .../databay/patches/ilias_web_dir_constant.md | 22 +++++++++++++++++++ 6 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 docs/databay/patches/ilias_web_dir_constant.md diff --git a/Services/Component/classes/Setup/class.ilComponentActivatePluginsObjective.php b/Services/Component/classes/Setup/class.ilComponentActivatePluginsObjective.php index 16d10a3def16..3cf7018a6d30 100644 --- a/Services/Component/classes/Setup/class.ilComponentActivatePluginsObjective.php +++ b/Services/Component/classes/Setup/class.ilComponentActivatePluginsObjective.php @@ -179,7 +179,9 @@ public function __construct() } if (!defined("ILIAS_WEB_DIR")) { - define('ILIAS_WEB_DIR', dirname(__DIR__, 4) . "/data/"); + // databay-patch: begin ilias_web_dir + define('ILIAS_WEB_DIR', 'data'); + // databay-patch: end ilias_web_dir } // initialise this last to make sure the environment defined here diff --git a/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php b/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php index 40fd97218ac2..f0d83115507f 100644 --- a/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php +++ b/Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php @@ -191,7 +191,9 @@ public function __construct() } if (!defined("ILIAS_WEB_DIR")) { - define('ILIAS_WEB_DIR', dirname(__DIR__, 4) . "/data/"); + // databay-patch: begin ilias_web_dir + define('ILIAS_WEB_DIR', 'data'); + // databay-patch: end ilias_web_dir } // initialise this last to make sure the environment defined here diff --git a/Services/Component/classes/Setup/class.ilComponentUpdatePluginObjective.php b/Services/Component/classes/Setup/class.ilComponentUpdatePluginObjective.php index 3aa556ac333e..1406e8f20bb5 100644 --- a/Services/Component/classes/Setup/class.ilComponentUpdatePluginObjective.php +++ b/Services/Component/classes/Setup/class.ilComponentUpdatePluginObjective.php @@ -211,7 +211,9 @@ public function __construct() } if (!defined("ILIAS_WEB_DIR")) { - define('ILIAS_WEB_DIR', dirname(__DIR__, 4) . "/data/"); + // databay-patch: begin ilias_web_dir + define('ILIAS_WEB_DIR', 'data'); + // databay-patch: end ilias_web_dir } // initialise this last to make sure the environment defined here diff --git a/Services/Language/classes/Setup/class.ilPluginLanguageUpdatedObjective.php b/Services/Language/classes/Setup/class.ilPluginLanguageUpdatedObjective.php index 18d77d231730..0b8f4ed95e4c 100644 --- a/Services/Language/classes/Setup/class.ilPluginLanguageUpdatedObjective.php +++ b/Services/Language/classes/Setup/class.ilPluginLanguageUpdatedObjective.php @@ -188,7 +188,9 @@ public function __construct() } if (!defined("ILIAS_WEB_DIR")) { - define('ILIAS_WEB_DIR', dirname(__DIR__, 4) . "/data/"); + // databay-patch: begin ilias_web_dir + define('ILIAS_WEB_DIR', 'data'); + // databay-patch: end ilias_web_dir } return [$ORIG_DIC, $ORIG_ilDB]; diff --git a/Services/ResourceStorage/classes/Setup/class.ilResourceStorageMigrationHelper.php b/Services/ResourceStorage/classes/Setup/class.ilResourceStorageMigrationHelper.php index f60e2da05dd2..9ac4c48393c2 100644 --- a/Services/ResourceStorage/classes/Setup/class.ilResourceStorageMigrationHelper.php +++ b/Services/ResourceStorage/classes/Setup/class.ilResourceStorageMigrationHelper.php @@ -72,7 +72,9 @@ public function __construct( define("CLIENT_WEB_DIR", dirname(__DIR__, 4) . "/data/" . $client_id); } if (!defined("ILIAS_WEB_DIR")) { - define("ILIAS_WEB_DIR", dirname(__DIR__, 4)); + // databay-patch: begin ilias_web_dir + define('ILIAS_WEB_DIR', 'data'); + // databay-patch: end ilias_web_dir } if (!defined("CLIENT_ID")) { define("CLIENT_ID", $client_id); diff --git a/docs/databay/patches/ilias_web_dir_constant.md b/docs/databay/patches/ilias_web_dir_constant.md new file mode 100644 index 000000000000..dafc0154d1ac --- /dev/null +++ b/docs/databay/patches/ilias_web_dir_constant.md @@ -0,0 +1,22 @@ +# Fix `ILIAS_WEB_DIR` constant + +Dieser Patch korrigiert eine falsche Belegung der globalen PHP-Konstante `ILIAS_WEB_DIR` im +Setup-Kontext. + +## Patch-Markierungen + +Patches wurden mit `databay-patch: begin ilias_web_dir` und `databay-patch: end ilias_web_dir` markiert. + +## Änderungen + +Angepasst wurden im Rahmen der Funktionalität folgende Dateien: + +* Services/Component/classes/Setup/class.ilComponentActivatePluginsObjective.php +* Services/Component/classes/Setup/class.ilComponentInstallPluginObjective.php +* Services/Component/classes/Setup/class.ilComponentUpdatePluginObjective.php +* Services/Language/classes/Setup/class.ilPluginLanguageUpdatedObjective.php +* Services/ResourceStorage/classes/Setup/class.ilResourceStorageMigrationHelper.php + +## Spezifikation + +See: https://mantis.ilias.de/view.php?id=43107#c110424 \ No newline at end of file