X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FLegacyModule.php;h=22d393ef9eda1e5706360e209efc74dc264cfcc6;hb=dbd6d10536ddc476307e82381b3b7950c38aa03d;hp=38c3e9a8fb4d0b8ff68309f25aa95418a37322b4;hpb=8f741c8b78e37fc8a93061fae96195bb7a82d3bb;p=friendica.git diff --git a/src/LegacyModule.php b/src/LegacyModule.php index 38c3e9a8fb..22d393ef9e 100644 --- a/src/LegacyModule.php +++ b/src/LegacyModule.php @@ -1,6 +1,6 @@ setModuleFile($file_path); + + $this->runModuleFunction('init'); } /** @@ -61,18 +68,15 @@ class LegacyModule extends BaseModule require_once $file_path; } - public function init() - { - $this->runModuleFunction('init'); - } - - public function content(): string + protected function content(array $request = []): string { return $this->runModuleFunction('content'); } - public function post() + protected function post(array $request = []) { + parent::post($request); + $this->runModuleFunction('post'); } @@ -89,9 +93,9 @@ class LegacyModule extends BaseModule if (\function_exists($function_name)) { $a = DI::app(); - return $function_name($a); - } else { - return parent::{$function_suffix}($this->parameters); + return $function_name($a) ?? ''; } + + return ''; } }