]> git.mxchange.org Git - friendica.git/blob - mod/home.php
Merge branch 'erikl-master'
[friendica.git] / mod / home.php
1 <?php
2
3 if(! function_exists('home_init')) {
4 function home_init(&$a) {
5
6         if(local_user() && ($a->user['nickname']))
7                 goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
8
9         if(strlen(get_config('system','singleuser')))
10                 goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser'));
11
12 }}
13
14
15 if(! function_exists('home_content')) {
16 function home_content(&$a) {
17
18         $o = '';
19
20         if(x($_SESSION,'theme'))
21                 unset($_SESSION['theme']);
22
23         $o .= '<h1>' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '</h1>';
24         if(file_exists('home.html'))
25                 $o .= file_get_contents('home.html');
26
27         $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
28         
29         call_hooks("home_content",$o);
30         
31         return $o;
32
33         
34 }}