<?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;
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");
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>'.((x($a->config,'sitename')) ? L10n::t("Welcome to %s", $a->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)) {
$login = Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
$content = '';
- call_hooks("home_content",$content);
+ Addon::callHooks("home_content",$content);
$tpl = get_markup_template('home.tpl');