]> git.mxchange.org Git - friendica.git/commitdiff
Move module post call before rawContent
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 08:31:28 +0000 (03:31 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 13:24:16 +0000 (08:24 -0500)
- This was preventing API POST request to be processed

src/App/Module.php

index 868520c0257b23e5b77c6fa6c7ec7a24f52d1fae..a8648d0aa0cc54778b689f4bf457626750d77663 100644 (file)
@@ -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);
        }
 }