X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FLegacyModule.php;h=22d393ef9eda1e5706360e209efc74dc264cfcc6;hb=0956d1dd64ec54a6a099fdc21cc2fac0c0e22094;hp=53f76766044cde16a55f9d17ccd6bbc0f7d2b7d7;hpb=766b3f0d01ac48fdb8d696277bfc6244333b9f8b;p=friendica.git diff --git a/src/LegacyModule.php b/src/LegacyModule.php index 53f7676604..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}(); + return $function_name($a) ?? ''; } + + return ''; } }