]> git.mxchange.org Git - friendica.git/blobdiff - mod/home.php
Renamed System::redirect() to $a->redirect()
[friendica.git] / mod / home.php
index c386763ca3aaae556ccfd1058d95cfa99b7e6006..868bc9e488b1d82b212b1f1ca99c6b3cfe355c3f 100644 (file)
@@ -16,11 +16,11 @@ function home_init(App $a) {
        Addon::callHooks('home_init',$ret);
 
        if (local_user() && ($a->user['nickname'])) {
-               goaway(System::baseUrl()."/network");
+               $a->redirect('network');
        }
 
        if (strlen(Config::get('system','singleuser'))) {
-               goaway(System::baseUrl()."/profile/" . Config::get('system','singleuser'));
+               $a->redirect('profile/' . Config::get('system','singleuser'));
        }
 
 }}
@@ -38,8 +38,8 @@ function home_content(App $a) {
        $customhome = false;
        $defaultheader = '<h1>' . (Config::get('config', 'sitename') ? L10n::t('Welcome to %s', Config::get('config', 'sitename')) : '') . '</h1>';
 
-       $homefilepath = $a->basepath . "/home.html";
-       $cssfilepath = $a->basepath . "/home.css";
+       $homefilepath = $a->getBasePath() . "/home.html";
+       $cssfilepath = $a->getBasePath() . "/home.css";
        if (file_exists($homefilepath)) {
                $customhome = $homefilepath;
                if (file_exists($cssfilepath)) {
@@ -47,7 +47,7 @@ function home_content(App $a) {
                }
        }
 
-       $login = Login::form($a->query_string, Config::get('config', 'register_policy') === REGISTER_CLOSED ? 0 : 1);
+       $login = Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? 0 : 1);
 
        $content = '';
        Addon::callHooks("home_content",$content);