From: Hypolite Petovan Date: Wed, 11 Dec 2019 08:31:28 +0000 (-0500) Subject: Move module post call before rawContent X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be93914c7d4664a7a082d74437b4aaee3a5a6f55;p=friendica.git Move module post call before rawContent - This was preventing API POST request to be processed --- diff --git a/src/App/Module.php b/src/App/Module.php index 868520c025..a8648d0aa0 100644 --- a/src/App/Module.php +++ b/src/App/Module.php @@ -251,10 +251,6 @@ class Module call_user_func([$this->module_class, 'init'], $this->module_parameters); - // "rawContent" is especially meant for technical endpoints. - // This endpoint doesn't need any theme initialization or other comparable stuff. - call_user_func([$this->module_class, 'rawContent'], $this->module_parameters); - if ($server['REQUEST_METHOD'] === 'POST') { Core\Hook::callAll($this->module . '_mod_post', $post); call_user_func([$this->module_class, 'post'], $this->module_parameters); @@ -262,5 +258,9 @@ class Module Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder); call_user_func([$this->module_class, 'afterpost'], $this->module_parameters); + + // "rawContent" is especially meant for technical endpoints. + // This endpoint doesn't need any theme initialization or other comparable stuff. + call_user_func([$this->module_class, 'rawContent'], $this->module_parameters); } }