diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 6edef06fc6..776ce3e80a 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -332,7 +332,6 @@ class Conversation $tpl = Renderer::getMarkupTemplate('jot-header.tpl'); $this->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ '$newpost' => 'true', - '$baseurl' => $this->baseURL, '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => $this->l10n->t('Visible to everybody'), @@ -405,7 +404,6 @@ class Conversation '$posttype' => $notes_cid ? ItemModel::PT_PERSONAL_NOTE : ItemModel::PT_ARTICLE, '$content' => $x['content'] ?? '', '$post_id' => $x['post_id'] ?? '', - '$baseurl' => $this->baseURL, '$defloc' => $x['default_location'], '$visitor' => $x['visitor'], '$pvisit' => $notes_cid ? 'none' : $x['visitor'], @@ -591,7 +589,6 @@ class Conversation } $o = Renderer::replaceMacros($page_template, [ - '$baseurl' => $this->baseURL, '$return_path' => $this->args->getQueryString(), '$live_update' => $live_update_div, '$remove' => $this->l10n->t('remove'), diff --git a/src/Core/Renderer.php b/src/Core/Renderer.php index 7f15d60df0..11a7d0a2d6 100644 --- a/src/Core/Renderer.php +++ b/src/Core/Renderer.php @@ -75,8 +75,11 @@ class Renderer { DI::profiler()->startRecording('rendering'); - // pass $baseurl to all templates if it isn't set - $vars = array_merge(['$baseurl' => DI::baseUrl(), '$APP' => DI::app()], $vars); + // Default template variables + $vars = array_merge([ + '$baseurl' => DI::baseUrl(), + '$VERSION' => \Friendica\App::VERSION, + ], $vars); $t = self::getTemplateEngine(); diff --git a/src/Module/Admin/Federation.php b/src/Module/Admin/Federation.php index f6b77aeb66..9240453948 100644 --- a/src/Module/Admin/Federation.php +++ b/src/Module/Admin/Federation.php @@ -221,7 +221,6 @@ class Federation extends BaseAdmin '$page' => DI::l10n()->t('Federation Statistics'), '$intro' => $intro, '$counts' => $counts, - '$version' => App::VERSION, '$legendtext' => DI::l10n()->tt('Currently this node is aware of %2$s node (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:', 'Currently this node is aware of %2$s nodes (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:', $total, number_format($total), number_format($month), number_format($halfyear), number_format($users)), ]); } diff --git a/src/Module/Admin/Summary.php b/src/Module/Admin/Summary.php index 4939bc39cc..638af8842a 100644 --- a/src/Module/Admin/Summary.php +++ b/src/Module/Admin/Summary.php @@ -196,7 +196,7 @@ class Summary extends BaseAdmin '$title' => DI::l10n()->t('Administration'), '$page' => DI::l10n()->t('Summary'), '$queues' => $queues, - '$version' => [DI::l10n()->t('Version'), App::VERSION], + '$version_label' => DI::l10n()->t('Version'), '$platform' => App::PLATFORM, '$codename' => App::CODENAME, '$build' => DI::config()->get('system', 'build'), diff --git a/src/Module/Moderation/Blocklist/Contact.php b/src/Module/Moderation/Blocklist/Contact.php index 253f1dba04..d726b4d9b3 100644 --- a/src/Module/Moderation/Blocklist/Contact.php +++ b/src/Module/Moderation/Blocklist/Contact.php @@ -124,8 +124,6 @@ class Contact extends BaseModeration '$form_security_token' => self::getFormSecurityToken('moderation_contactblock'), // values // - '$baseurl' => $this->baseUrl, - '$contacts' => $contacts, '$total_contacts' => $this->tt('%s total blocked contact', '%s total blocked contacts', $total), '$paginate' => $pager->renderFull($total), diff --git a/src/Module/Moderation/Blocklist/Server/Add.php b/src/Module/Moderation/Blocklist/Server/Add.php index 9a56a7516f..6f498ac29a 100644 --- a/src/Module/Moderation/Blocklist/Server/Add.php +++ b/src/Module/Moderation/Blocklist/Server/Add.php @@ -138,7 +138,6 @@ class Add extends BaseModeration '$newreason' => ['reason', $this->t('Block reason'), $request['reason'] ?? '', $this->t('The reason why you blocked this server domain pattern. This reason will be shown publicly in the server information page.'), $this->t('Required'), '', ''], '$pattern' => $pattern, '$gservers' => $gservers, - '$baseurl' => $this->baseUrl, '$form_security_token' => self::getFormSecurityToken('moderation_blocklist_add') ]); } diff --git a/src/Module/Moderation/Blocklist/Server/Import.php b/src/Module/Moderation/Blocklist/Server/Import.php index 10c1f36ee6..1131855c08 100644 --- a/src/Module/Moderation/Blocklist/Server/Import.php +++ b/src/Module/Moderation/Blocklist/Server/Import.php @@ -130,7 +130,6 @@ class Import extends \Friendica\Module\BaseModeration '$mode_append' => ['mode', $this->t('Append'), 'append', $this->t('Imports patterns from the file that weren\'t already existing in the current blocklist.'), 'checked="checked"'], '$mode_replace' => ['mode', $this->t('Replace'), 'replace', $this->t('Replaces the current blocklist by the imported patterns.')], '$blocklist' => $this->blocklist, - '$baseurl' => $this->baseUrl, '$form_security_token' => self::getFormSecurityToken('moderation_blocklist_import') ]); } diff --git a/src/Module/Moderation/Blocklist/Server/Index.php b/src/Module/Moderation/Blocklist/Server/Index.php index 3b6dc735dd..466748ea1f 100644 --- a/src/Module/Moderation/Blocklist/Server/Index.php +++ b/src/Module/Moderation/Blocklist/Server/Index.php @@ -115,7 +115,6 @@ class Index extends BaseModeration '$listfile' => ['listfile', $this->t('Server domain pattern blocklist CSV file'), '', '', $this->t('Required'), '', 'file'], '$newdomain' => ['pattern', $this->t('Server Domain Pattern'), '', $this->t('The domain pattern of the new server to add to the blocklist. Do not include the protocol.'), $this->t('Required'), '', ''], '$entries' => $blocklistform, - '$baseurl' => $this->baseUrl, '$form_security_token' => self::getFormSecurityToken('moderation_blocklist'), '$form_security_token_import' => self::getFormSecurityToken('moderation_blocklist_import'), diff --git a/src/Module/Moderation/Reports.php b/src/Module/Moderation/Reports.php index 8c0f6cde66..c9aa92df9c 100644 --- a/src/Module/Moderation/Reports.php +++ b/src/Module/Moderation/Reports.php @@ -95,8 +95,6 @@ class Reports extends BaseModeration '$th_reports' => [$this->t('Created'), $this->t('Photo'), $this->t('Name'), $this->t('Comment'), $this->t('Category')], // values // - '$baseurl' => $this->baseUrl, - '$reports' => $reports, '$total_reports' => $this->tt('%s total report', '%s total reports', $total), '$paginate' => $pager->renderFull($total), diff --git a/src/Module/Moderation/Users/Active.php b/src/Module/Moderation/Users/Active.php index e90baf8c68..f3bed0f989 100644 --- a/src/Module/Moderation/Users/Active.php +++ b/src/Module/Moderation/Users/Active.php @@ -150,7 +150,6 @@ class Active extends BaseUsers '$form_security_token' => self::getFormSecurityToken('moderation_users_active'), // values // - '$baseurl' => $this->baseUrl, '$query_string' => $this->args->getQueryString(), '$users' => $users, diff --git a/src/Module/Settings/Channels.php b/src/Module/Settings/Channels.php index 34c9aabd01..c2b6cc4e64 100644 --- a/src/Module/Settings/Channels.php +++ b/src/Module/Settings/Channels.php @@ -228,7 +228,6 @@ class Channels extends BaseSettings 'confirm_delete' => $this->t('Delete entry from the channel list?'), ], '$entries' => $channels, - '$baseurl' => $this->baseUrl, '$form_security_token' => self::getFormSecurityToken('settings_channels'), ]); diff --git a/view/templates/admin/federation.tpl b/view/templates/admin/federation.tpl index 7757691ea5..6a006ebc34 100644 --- a/view/templates/admin/federation.tpl +++ b/view/templates/admin/federation.tpl @@ -1,4 +1,4 @@ - +