3 if(! function_exists('home_init')) {
4 function home_init(&$a) {
7 call_hooks('home_init',$ret);
9 if(local_user() && ($a->user['nickname']))
10 goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
12 if(strlen(get_config('system','singleuser')))
13 goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser'));
18 if(! function_exists('home_content')) {
19 function home_content(&$a) {
23 if(x($_SESSION,'theme'))
24 unset($_SESSION['theme']);
25 if(x($_SESSION,'mobile-theme'))
26 unset($_SESSION['mobile-theme']);
28 $o .= '<h1>' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '</h1>';
29 if(file_exists('home.html'))
30 $o .= file_get_contents('home.html');
32 $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
34 call_hooks("home_content",$o);