]> git.mxchange.org Git - friendica.git/blobdiff - mod/home.php
Fixes:
[friendica.git] / mod / home.php
index f3138d18675fdc13565f0d82ffb138e3a20bb310..d28bf3cb43a9fc62b694fae2c2af0d59806b6c97 100644 (file)
@@ -1,7 +1,11 @@
 <?php
-
+/**
+ * @file mod/home.php
+ */
 use Friendica\App;
+use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Module\Login;
 
@@ -9,7 +13,7 @@ if(! function_exists('home_init')) {
 function home_init(App $a) {
 
        $ret = [];
-       call_hooks('home_init',$ret);
+       Addon::callHooks('home_init',$ret);
 
        if (local_user() && ($a->user['nickname'])) {
                goaway(System::baseUrl()."/network");
@@ -31,22 +35,22 @@ function home_content(App $a) {
                unset($_SESSION['mobile-theme']);
        }
 
-       $customhome = False;
-       $defaultheader = '<h1>'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'</h1>';
+       $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->basepath . "/home.html";
+       $cssfilepath = $a->basepath . "/home.css";
        if (file_exists($homefilepath)) {
                $customhome = $homefilepath;
                if (file_exists($cssfilepath)) {
                        $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.System::baseUrl().'/home.css'.'" media="all" />';
                }
-       } 
+       }
 
-       $login = Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
+       $login = Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? 0 : 1);
 
        $content = '';
-       call_hooks("home_content",$content);
+       Addon::callHooks("home_content",$content);
 
 
        $tpl = get_markup_template('home.tpl');