<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Network\HTTPException;
use Friendica\Util\Network;
use Friendica\Util\Strings;
+use Friendica\Util\Profiler;
/**
* Contains the page specific environment variables for the current Page
'$local_user' => local_user(),
'$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
'$delitem' => $l10n->t('Delete this item?'),
+ '$blockAuthor' => $l10n->t('Block this author? They won\'t be able to follow you nor see your public posts, and you won\'t be able to see their posts and their notifications.'),
'$update_interval' => $interval,
'$shortcut_icon' => $shortcut_icon,
'$touch_icon' => $touch_icon,
// If you're just visiting, let javascript take you home
if (!empty($_SESSION['visitor_home'])) {
$homebase = $_SESSION['visitor_home'];
- } elseif (!empty($app->user['nickname'])) {
- $homebase = 'profile/' . $app->user['nickname'];
+ } elseif (!empty($app->getLoggedInUserNickname())) {
+ $homebase = 'profile/' . $app->getLoggedInUserNickname();
}
if (isset($homebase)) {
*
* @throws HTTPException\InternalServerErrorException
*/
- public function run(App $app, BaseURL $baseURL, Mode $mode, Module $module, L10n $l10n, IConfig $config, IPConfig $pconfig)
+ public function run(App $app, BaseURL $baseURL, Mode $mode, Module $module, L10n $l10n, Profiler $profiler, IConfig $config, IPConfig $pconfig)
{
$moduleName = $module->getName();
*
* Sets the $Page->page['content'] variable
*/
+ $timestamp = microtime(true);
$this->initContent($module, $mode);
+ $profiler->set(microtime(true) - $timestamp, 'content');
// Load current theme info after module has been initialized as theme could have been set in module
$currentTheme = $app->getCurrentTheme();
}
$page = $this->page;
- $profile = $app->profile;
header("X-Friendica-Version: " . FRIENDICA_VERSION);
header("Content-type: text/html; charset=utf-8");