]> git.mxchange.org Git - friendica.git/commitdiff
Move rawContent before theme initialization
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 20 Jan 2019 03:03:49 +0000 (22:03 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 20 Jan 2019 03:03:49 +0000 (22:03 -0500)
src/App.php

index bc8b444db3838994c3fae66f45534c362f0e848e..c41cfdc6c0d4bf0bf7a5eed15b1a4f3009ad7c8d 100644 (file)
@@ -1728,6 +1728,12 @@ class App
                        Core\Addon::callHooks($this->module . '_mod_init', $placeholder);
 
                        call_user_func([$this->module_class, 'init']);
+
+                       // "rawContent" is especially meant for technical endpoints.
+                       // This endpoint doesn't need any theme initialization or other comparable stuff.
+                       if (!$this->error) {
+                               call_user_func([$this->module_class, 'rawContent']);
+                       }
                }
 
                // Load current theme info after module has been initialized as theme could have been set in module
@@ -1742,12 +1748,6 @@ class App
                }
 
                if ($this->module_loaded) {
-                       // "rawContent" is especially meant for technical endpoints.
-                       // This endpoint doesn't need any theme initialization or other comparable stuff.
-                       if (!$this->error) {
-                               call_user_func([$this->module_class, 'rawContent']);
-                       }
-
                        if (! $this->error && $_SERVER['REQUEST_METHOD'] === 'POST') {
                                Core\Addon::callHooks($this->module . '_mod_post', $_POST);
                                call_user_func([$this->module_class, 'post']);