X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhome.php;h=5f8d6a64ff9826751d098b2479e0b951cd92c029;hb=3b23f89ca257f972aa9c7beffdd308b1fd1b37e6;hp=f703263a2c6a532831bcfc5431c1e944e53ee0ae;hpb=4e3d0018c69eaaa122f004357c5c68dacef59fc7;p=friendica.git diff --git a/mod/home.php b/mod/home.php index f703263a2c..5f8d6a64ff 100644 --- a/mod/home.php +++ b/mod/home.php @@ -1,44 +1,54 @@ user['nickname'])) - goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); + if (local_user() && ($a->user['nickname'])) { + goaway(System::baseUrl()."/network"); + } - if(strlen(get_config('system','singleuser'))) - goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser')); + if (strlen(Config::get('system','singleuser'))) { + goaway(System::baseUrl()."/profile/" . Config::get('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'] .= ''; + } - 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 .= file_get_contents('home.html'); + } else { + $o .= '

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

'; + } + + $o .= Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1); - $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1); - call_hooks("home_content",$o); - + return $o; - -}} +}}