From: Roland Häder Date: Tue, 20 Dec 2016 10:14:30 +0000 (+0100) Subject: added curly braces + space between "if" and brace + added TODO X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e05a8e99749d3518056c93ddcbfc0b2abac78de9;p=friendica.git added curly braces + space between "if" and brace + added TODO Signed-off-by: Roland Häder --- diff --git a/mod/home.php b/mod/home.php index 62ee9868fb..0e83340cc3 100644 --- a/mod/home.php +++ b/mod/home.php @@ -6,12 +6,13 @@ function home_init(&$a) { $ret = array(); call_hooks('home_init',$ret); - if(local_user() && ($a->user['nickname'])) + if (local_user() && ($a->user['nickname'])) { goaway(App::get_baseurl()."/network"); - //goaway(App::get_baseurl()."/profile/".$a->user['nickname']); + } - if(strlen(get_config('system','singleuser'))) + if (strlen(get_config('system','singleuser'))) { goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser')); + } }} @@ -21,18 +22,24 @@ function home_content(&$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']); + } - if(file_exists('home.html')){ - if(file_exists('home.css')){ - $a->page['htmlhead'] .= '';} + /// @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');} + $o .= file_get_contents('home.html');} - else $o .= '

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

'; + else { + $o .= '

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

'; + } $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);