X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhome.php;h=cdf4b371588900a95938fecfb0dfd306ad3718a1;hb=e5a6d91cc4dc8f8546580c656ed6acc7016d4a28;hp=4fca1cbc23a3b8e37e7290e578217103b4a4038e;hpb=9f7878057f356ba785de26877a660bb025cae31d;p=friendica.git diff --git a/mod/home.php b/mod/home.php index 4fca1cbc23..cdf4b37158 100644 --- a/mod/home.php +++ b/mod/home.php @@ -3,11 +3,15 @@ if(! function_exists('home_init')) { function home_init(&$a) { + $ret = array(); + call_hooks('home_init',$ret); + if(local_user() && ($a->user['nickname'])) - goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); + goaway($a->get_baseurl()."/network"); + //goaway($a->get_baseurl()."/profile/".$a->user['nickname']); if(strlen(get_config('system','singleuser'))) - goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser')); + goaway($a->get_baseurl()."/profile/" . get_config('system','singleuser')); }} @@ -19,16 +23,23 @@ function home_content(&$a) { if(x($_SESSION,'theme')) unset($_SESSION['theme']); + if(x($_SESSION,'mobile-theme')) + unset($_SESSION['mobile-theme']); + + if(file_exists('home.html')){ + if(file_exists('home.css')){ + $a->page['htmlhead'] .= '';} + + $o .= file_get_contents('home.html');} + + else $o .= '

'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'

'; - $o .= '

' . ((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"),$a->config['sitename']) : "" ) . '

'; - if(file_exists('home.html')) - $o .= file_get_contents('home.html'); $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1); - + call_hooks("home_content",$o); - + return $o; - -}} + +}}