Kept the hook, ditched the init
This commit is contained in:
parent
708ffaff51
commit
35d4daa4f9
1 changed files with 13 additions and 19 deletions
|
@ -12,25 +12,6 @@ use Friendica\Core\Renderer;
|
||||||
*/
|
*/
|
||||||
class Home extends BaseModule
|
class Home extends BaseModule
|
||||||
{
|
{
|
||||||
public static function init()
|
|
||||||
{
|
|
||||||
// currently no returned data is used
|
|
||||||
$ret = [];
|
|
||||||
|
|
||||||
Hook::callAll('home_init', $ret);
|
|
||||||
|
|
||||||
$app = self::getApp();
|
|
||||||
$config = $app->getConfig();
|
|
||||||
|
|
||||||
if (local_user() && ($app->user['nickname'])) {
|
|
||||||
$app->internalRedirect('network');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen($config->get('system', 'singleuser'))) {
|
|
||||||
$app->internalRedirect('/profile/' . $config->get('system', 'singleuser'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function content()
|
public static function content()
|
||||||
{
|
{
|
||||||
if (!empty($_SESSION['theme'])) {
|
if (!empty($_SESSION['theme'])) {
|
||||||
|
@ -44,6 +25,19 @@ class Home extends BaseModule
|
||||||
$app = self::getApp();
|
$app = self::getApp();
|
||||||
$config = $app->getConfig();
|
$config = $app->getConfig();
|
||||||
|
|
||||||
|
// currently no returned data is used
|
||||||
|
$ret = [];
|
||||||
|
|
||||||
|
Hook::callAll('home_init', $ret);
|
||||||
|
|
||||||
|
if (local_user() && ($app->user['nickname'])) {
|
||||||
|
$app->internalRedirect('network');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($config->get('system', 'singleuser'))) {
|
||||||
|
$app->internalRedirect('/profile/' . $config->get('system', 'singleuser'));
|
||||||
|
}
|
||||||
|
|
||||||
$customHome = '';
|
$customHome = '';
|
||||||
$defaultHeader = ($config->get('config', 'sitename') ? L10n::t('Welcome to %s', $config->get('config', 'sitename')) : '');
|
$defaultHeader = ($config->get('config', 'sitename') ? L10n::t('Welcome to %s', $config->get('config', 'sitename')) : '');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue