X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhome.php;h=bd77a840d0db221cca2c04043c2f2719e95f8814;hb=638e6491cc305b0455ae890351183e03e0bce52b;hp=6ed36b7638c1ce39c62adb3be61cc6f0a9f4e764;hpb=d3699498ac8fdbbce2883ac07c8a3aac9b11a8e4;p=friendica.git diff --git a/mod/home.php b/mod/home.php index 6ed36b7638..bd77a840d0 100644 --- a/mod/home.php +++ b/mod/home.php @@ -1,39 +1,51 @@ user['nickname'])) - goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); + if (local_user() && ($a->user['nickname'])) { + goaway(App::get_baseurl()."/network"); + } - if(strlen(get_config('system','singleuser'))) - goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser')); + if (strlen(get_config('system','singleuser'))) { + goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser')); + } }} - if(! function_exists('home_content')) { -function home_content(&$a) { +function home_content(App $a) { $o = ''; - if(x($_SESSION,'theme')) + if (x($_SESSION,'theme')) { unset($_SESSION['theme']); - if(x($_SESSION,'mobile-theme')) + } + if (x($_SESSION,'mobile-theme')) { unset($_SESSION['mobile-theme']); + } + + /// @TODO No absolute path used, maybe risky (security) + 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; - -}} +}}