5 if(! function_exists('home_init')) {
6 function home_init(App $a) {
9 call_hooks('home_init',$ret);
11 if (local_user() && ($a->user['nickname'])) {
12 goaway(App::get_baseurl()."/network");
15 if (strlen(get_config('system','singleuser'))) {
16 goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser'));
21 if(! function_exists('home_content')) {
22 function home_content(App $a) {
26 if (x($_SESSION,'theme')) {
27 unset($_SESSION['theme']);
29 if (x($_SESSION,'mobile-theme')) {
30 unset($_SESSION['mobile-theme']);
33 /// @TODO No absolute path used, maybe risky (security)
34 if (file_exists('home.html')) {
35 if (file_exists('home.css')) {
36 $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.App::get_baseurl().'/home.css'.'" media="all" />';
39 $o .= file_get_contents('home.html');
41 $o .= '<h1>'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'</h1>';
45 $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
47 call_hooks("home_content",$o);