]> git.mxchange.org Git - friendica.git/blobdiff - mod/home.php
Fix unused code in include
[friendica.git] / mod / home.php
index 3490c4faea52dad7712e933d0d484aa05e3ba17f..5f8d6a64ff9826751d098b2479e0b951cd92c029 100644 (file)
@@ -1,7 +1,9 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\Config;
 use Friendica\Core\System;
+use Friendica\Module\Login;
 
 if(! function_exists('home_init')) {
 function home_init(App $a) {
@@ -13,8 +15,8 @@ function home_init(App $a) {
                goaway(System::baseUrl()."/network");
        }
 
-       if (strlen(get_config('system','singleuser'))) {
-               goaway(System::baseUrl()."/profile/" . get_config('system','singleuser'));
+       if (strlen(Config::get('system','singleuser'))) {
+               goaway(System::baseUrl()."/profile/" . Config::get('system','singleuser'));
        }
 
 }}
@@ -42,8 +44,8 @@ function home_content(App $a) {
                $o .= '<h1>'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'</h1>';
        }
 
+       $o .= Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
 
-       $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
 
        call_hooks("home_content",$o);