There is now "rawContent" for technical endpoints
This commit is contained in:
parent
cb44aa83c7
commit
a8b776c189
10
index.php
10
index.php
|
@ -342,15 +342,21 @@ if ($a->module_loaded) {
|
|||
$a->page['page_title'] = $a->module;
|
||||
$placeholder = '';
|
||||
|
||||
Addon::callHooks($a->module . '_mod_init', $placeholder);
|
||||
|
||||
if ($a->module_class) {
|
||||
Addon::callHooks($a->module . '_mod_init', $placeholder);
|
||||
call_user_func([$a->module_class, 'init']);
|
||||
} else if (function_exists($a->module . '_init')) {
|
||||
Addon::callHooks($a->module . '_mod_init', $placeholder);
|
||||
$func = $a->module . '_init';
|
||||
$func($a);
|
||||
}
|
||||
|
||||
// "rawContent" is especially meant for technical endpoints.
|
||||
// This endpoint doesn't need any theme initialization or other comparable stuff.
|
||||
if (!$a->error && $a->module_class) {
|
||||
call_user_func([$a->module_class, 'rawContent']);
|
||||
}
|
||||
|
||||
if (function_exists(str_replace('-', '_', $a->getCurrentTheme()) . '_init')) {
|
||||
$func = str_replace('-', '_', $a->getCurrentTheme()) . '_init';
|
||||
$func($a);
|
||||
|
|
|
@ -14,7 +14,7 @@ use Friendica\Model\User;
|
|||
*/
|
||||
class Followers extends BaseModule
|
||||
{
|
||||
public static function init()
|
||||
public static function rawContent()
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ use Friendica\Model\User;
|
|||
*/
|
||||
class Following extends BaseModule
|
||||
{
|
||||
public static function init()
|
||||
public static function rawContent()
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ use Friendica\Util\HTTPSignature;
|
|||
*/
|
||||
class Inbox extends BaseModule
|
||||
{
|
||||
public static function init()
|
||||
public static function rawContent()
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ use Friendica\Database\DBA;
|
|||
*/
|
||||
class Object extends BaseModule
|
||||
{
|
||||
public static function init()
|
||||
public static function rawContent()
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ use Friendica\Model\User;
|
|||
*/
|
||||
class Outbox extends BaseModule
|
||||
{
|
||||
public static function init()
|
||||
public static function rawContent()
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
|
|
Loading…
Reference in a new issue