remove requirement for DI::app() in addon_install()

see https://github.com/friendica/friendica-addons/pull/1364
This commit is contained in:
Art4 2024-11-23 08:38:37 +00:00
parent 5f829ac1cd
commit f93915075e

View file

@ -155,7 +155,12 @@ class Addon
@include_once($addon_file_path); @include_once($addon_file_path);
if (function_exists($addon . '_install')) { if (function_exists($addon . '_install')) {
$func = $addon . '_install'; $func = $addon . '_install';
$func(DI::app());
// Addon webdav_storage has an unused but required parameter.
// @TODO: Remove $param after the required parameter is removed.
// See https://github.com/friendica/friendica-addons/pull/1364
$param = null;
$func($param);
} }
DI::config()->set('addons', $addon, [ DI::config()->set('addons', $addon, [