3 if(! function_exists('home_init')) {
4 function home_init(App &$a) {
7 call_hooks('home_init',$ret);
9 if (local_user() && ($a->user['nickname'])) {
10 goaway(App::get_baseurl()."/network");
13 if (strlen(get_config('system','singleuser'))) {
14 goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser'));
19 if(! function_exists('home_content')) {
20 function home_content(App &$a) {
24 if (x($_SESSION,'theme')) {
25 unset($_SESSION['theme']);
27 if (x($_SESSION,'mobile-theme')) {
28 unset($_SESSION['mobile-theme']);
31 /// @TODO No absolute path used, maybe risky (security)
32 if (file_exists('home.html')) {
33 if (file_exists('home.css')) {
34 $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.App::get_baseurl().'/home.css'.'" media="all" />';
37 $o .= file_get_contents('home.html');
39 $o .= '<h1>'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'</h1>';
43 $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
45 call_hooks("home_content",$o);