Remove duplicate $baseurl template variable
- Remove unused $overwriteURL parameter in Renderer::replaceMacros
This commit is contained in:
parent
d8125eb3db
commit
9774c95b80
41 changed files with 38 additions and 101 deletions
|
@ -90,7 +90,6 @@ function cal_content(App $a)
|
|||
|
||||
$htpl = Renderer::getMarkupTemplate('event_head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$module_url' => '/cal/' . $a->data['user']['nickname'],
|
||||
'$modparams' => 2,
|
||||
'$i18n' => $i18n,
|
||||
|
@ -268,7 +267,6 @@ function cal_content(App $a)
|
|||
}
|
||||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => L10n::t('Events'),
|
||||
'$view' => L10n::t('View'),
|
||||
|
|
|
@ -8,7 +8,6 @@ use Friendica\Content\Feature;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\FileTag;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -48,7 +47,6 @@ function editpost_content(App $a)
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('jot-header.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$ispublic' => ' ', // L10n::t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
|
@ -91,7 +89,6 @@ function editpost_content(App $a)
|
|||
'$posttype' => $item['post-type'],
|
||||
'$content' => undo_post_tagging($item['body']),
|
||||
'$post_id' => $post_id,
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$defloc' => $a->user['default-location'],
|
||||
'$visitor' => 'none',
|
||||
'$pvisit' => 'none',
|
||||
|
|
|
@ -237,7 +237,6 @@ function events_content(App $a)
|
|||
|
||||
$htpl = Renderer::getMarkupTemplate('event_head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$module_url' => '/events',
|
||||
'$modparams' => 1,
|
||||
'$i18n' => $i18n,
|
||||
|
@ -379,7 +378,6 @@ function events_content(App $a)
|
|||
}
|
||||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => L10n::t('Events'),
|
||||
'$view' => L10n::t('View'),
|
||||
|
|
|
@ -104,7 +104,6 @@ function fbrowser_content(App $a)
|
|||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$type' => 'image',
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => $path,
|
||||
'$folders' => $albums,
|
||||
'$files' => $files,
|
||||
|
@ -134,7 +133,6 @@ function fbrowser_content(App $a)
|
|||
$tpl = Renderer::getMarkupTemplate($template_file);
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$type' => 'file',
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => [ [ "", L10n::t("Files")] ],
|
||||
'$folders' => false,
|
||||
'$files' => $files,
|
||||
|
|
|
@ -139,7 +139,6 @@ function lostpass_generate_password($user)
|
|||
'$lbl5' => '<a href="' . System::baseUrl() . '">' . L10n::t('click here to login') . '</a>.',
|
||||
'$lbl6' => L10n::t('Your password may be changed from the <em>Settings</em> page after successful login.'),
|
||||
'$newpass' => $new_password,
|
||||
'$baseurl' => System::baseUrl()
|
||||
]);
|
||||
|
||||
info("Your password has been reset." . EOL);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function opensearch_content(App $a) {
|
||||
|
||||
|
@ -11,7 +10,6 @@ function opensearch_content(App $a) {
|
|||
header("Content-type: application/opensearchdescription+xml");
|
||||
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$nodename' => $a->getHostName(),
|
||||
]);
|
||||
|
||||
|
|
|
@ -115,7 +115,6 @@ function photos_init(App $a) {
|
|||
'$title' => L10n::t('Photo Albums'),
|
||||
'$recent' => L10n::t('Recent Photos'),
|
||||
'$albums' => $ret['albums'],
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$upload' => [L10n::t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload'],
|
||||
'$can_post' => $can_post
|
||||
]);
|
||||
|
|
|
@ -154,15 +154,11 @@ function poke_content(App $a)
|
|||
$name = $contact['name'];
|
||||
$id = $contact['id'];
|
||||
|
||||
$base = System::baseUrl();
|
||||
|
||||
$head_tpl = Renderer::getMarkupTemplate('poke_head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($head_tpl,[
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
]);
|
||||
|
||||
|
||||
$parent = (!empty($_GET['parent']) ? intval($_GET['parent']) : '0');
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function toggle_mobile_init(App $a) {
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ function uexport_content(App $a) {
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate("uexport.tpl");
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t('Export personal data'),
|
||||
'$options' => $options
|
||||
]);
|
||||
|
|
|
@ -67,9 +67,7 @@ function videos_init(App $a)
|
|||
$a->page['aside'] .= $vcard_widget;
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate("videos_head.tpl");
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[
|
||||
'$baseurl' => System::baseUrl(),
|
||||
]);
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -406,8 +406,6 @@ class App
|
|||
* @param bool $ssl Whether to append http or https under BaseURL::SSL_POLICY_SELFSIGN
|
||||
*
|
||||
* @return string Friendica server base URL
|
||||
*
|
||||
* @deprecated 2019.06 - use BaseURL->get($ssl) instead
|
||||
*/
|
||||
public function getBaseURL($ssl = false)
|
||||
{
|
||||
|
@ -509,7 +507,6 @@ class App
|
|||
* being first
|
||||
*/
|
||||
$this->page['htmlhead'] = Core\Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => $this->getBaseURL(),
|
||||
'$local_user' => local_user(),
|
||||
'$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
|
||||
'$delitem' => Core\L10n::t('Delete this item?'),
|
||||
|
@ -562,7 +559,6 @@ class App
|
|||
|
||||
$tpl = Core\Renderer::getMarkupTemplate('footer.tpl');
|
||||
$this->page['footer'] = Core\Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => $this->getBaseURL(),
|
||||
'$footerScripts' => $this->footerScripts,
|
||||
]) . $this->page['footer'];
|
||||
}
|
||||
|
|
|
@ -67,7 +67,6 @@ class Nav
|
|||
$tpl = Renderer::getMarkupTemplate('nav.tpl');
|
||||
|
||||
$nav .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$sitelocation' => $nav_info['sitelocation'],
|
||||
'$nav' => $nav_info['nav'],
|
||||
'$banner' => $nav_info['banner'],
|
||||
|
|
|
@ -181,7 +181,6 @@ class OEmbed
|
|||
$tw = $th * $tr;
|
||||
$tpl = Renderer::getMarkupTemplate('oembed_video.tpl');
|
||||
$ret .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$embedurl' => $oembed->embed_url,
|
||||
'$escapedhtml' => base64_encode($oembed->html),
|
||||
'$tw' => $tw,
|
||||
|
|
|
@ -53,21 +53,19 @@ class Renderer extends BaseObject
|
|||
* @brief This is our template processor
|
||||
*
|
||||
* @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
|
||||
* @param array $vars key value pairs (search => replace)
|
||||
* @param bool $overwriteURL Overwrite the base url with the system wide set base url
|
||||
* @param array $vars Key value pairs (search => replace)
|
||||
*
|
||||
* @return string substituted string
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function replaceMacros($s, $vars, $overwriteURL = true)
|
||||
public static function replaceMacros($s, array $vars = [])
|
||||
{
|
||||
$stamp1 = microtime(true);
|
||||
$a = self::getApp();
|
||||
|
||||
// pass $baseurl to all templates
|
||||
if ($overwriteURL) {
|
||||
$vars['$baseurl'] = System::baseUrl();
|
||||
}
|
||||
// pass $baseurl to all templates if it isn't set
|
||||
$vars = array_merge(['$baseurl' => $a->getBaseURL()], $vars);
|
||||
|
||||
$t = self::getTemplateEngine();
|
||||
|
||||
try {
|
||||
|
|
|
@ -3466,9 +3466,7 @@ class Item extends BaseObject
|
|||
if (strpos($mime, 'video') !== false) {
|
||||
if (!$vhead) {
|
||||
$vhead = true;
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('videos_head.tpl'), [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
]);
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('videos_head.tpl'));
|
||||
}
|
||||
|
||||
$url_parts = explode('/', $the_url);
|
||||
|
|
|
@ -641,7 +641,6 @@ class Profile
|
|||
}
|
||||
$tpl = Renderer::getMarkupTemplate('birthdays_reminder.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$classtoday' => $classtoday,
|
||||
'$count' => $total,
|
||||
'$event_reminders' => L10n::t('Birthday Reminders'),
|
||||
|
@ -730,7 +729,6 @@ class Profile
|
|||
}
|
||||
$tpl = Renderer::getMarkupTemplate('events_reminder.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$classtoday' => $classtoday,
|
||||
'$count' => count($r),
|
||||
'$event_reminders' => L10n::t('Event Reminders'),
|
||||
|
|
|
@ -7,7 +7,6 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
|
||||
|
@ -61,7 +60,7 @@ class Index extends BaseAdminModule
|
|||
'$page' => L10n::t('Addons'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$reload' => L10n::t('Reload active addons'),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
'$function' => 'addons',
|
||||
'$addons' => $addons,
|
||||
'$pcount' => count($addons),
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Friendica\Module\Admin\Blocklist;
|
|||
use Friendica\Content\Pager;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Model;
|
||||
|
@ -77,7 +76,7 @@ class Contact extends BaseAdminModule
|
|||
'$form_security_token' => parent::getFormSecurityToken("admin_contactblock"),
|
||||
|
||||
// values //
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
|
||||
'$contacts' => $contacts,
|
||||
'$total_contacts' => L10n::tt('%s total blocked contact', '%s total blocked contacts', $total),
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Friendica\Module\Admin\Blocklist;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
@ -55,6 +54,8 @@ class Server extends BaseAdminModule
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$a = self::getApp();
|
||||
|
||||
$blocklist = Config::get('system', 'blocklist');
|
||||
$blocklistform = [];
|
||||
if (is_array($blocklist)) {
|
||||
|
@ -83,7 +84,7 @@ class Server extends BaseAdminModule
|
|||
'$threason' => L10n::t('Reason for the block'),
|
||||
'$delentry' => L10n::t('Delete entry from blocklist'),
|
||||
'$entries' => $blocklistform,
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
'$confirm_delete' => L10n::t('Delete entry from blocklist?'),
|
||||
'$form_security_token' => parent::getFormSecurityToken("admin_blocklist")
|
||||
]);
|
||||
|
|
|
@ -5,12 +5,10 @@ namespace Friendica\Module\Admin;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Update;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
class DBSync extends BaseAdminModule
|
||||
{
|
||||
|
@ -88,13 +86,13 @@ class DBSync extends BaseAdminModule
|
|||
|
||||
if (!count($failed)) {
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/dbsync/structure_check.tpl'), [
|
||||
'$base' => System::baseUrl(true),
|
||||
'$base' => $a->getBaseURL(true),
|
||||
'$banner' => L10n::t('No failed updates.'),
|
||||
'$check' => L10n::t('Check database structure'),
|
||||
]);
|
||||
} else {
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/dbsync/failed_updates.tpl'), [
|
||||
'$base' => System::baseUrl(true),
|
||||
'$base' => $a->getBaseURL(true),
|
||||
'$banner' => L10n::t('Failed Updates'),
|
||||
'$desc' => L10n::t('This does not include updates prior to 1139, which did not return a status.'),
|
||||
'$mark' => L10n::t("Mark success \x28if update was manually applied\x29"),
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Friendica\Module\Admin;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
|
||||
|
@ -194,7 +193,6 @@ class Federation extends BaseAdminModule
|
|||
'$counts' => $counts,
|
||||
'$version' => FRIENDICA_VERSION,
|
||||
'$legendtext' => L10n::t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ namespace Friendica\Module\Admin\Item;
|
|||
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -50,7 +49,6 @@ class Delete extends BaseAdminModule
|
|||
'$intro1' => L10n::t('On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted.'),
|
||||
'$intro2' => L10n::t('You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456.'),
|
||||
'$deleteitemguid' => ['deleteitemguid', L10n::t("GUID"), '', L10n::t("The GUID of the item you want to delete."), 'required', 'autofocus'],
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$form_security_token' => parent::getFormSecurityToken("admin_deleteitem")
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Friendica\Module\Admin\Logs;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
use Psr\Log\LogLevel;
|
||||
|
@ -36,6 +35,8 @@ class Settings extends BaseAdminModule
|
|||
{
|
||||
parent::content();
|
||||
|
||||
$a = self::getApp();
|
||||
|
||||
$log_choices = [
|
||||
LogLevel::ERROR => 'Error',
|
||||
LogLevel::WARNING => 'Warning',
|
||||
|
@ -57,7 +58,7 @@ class Settings extends BaseAdminModule
|
|||
'$page' => L10n::t('Logs'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$clear' => L10n::t('Clear'),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
'$logname' => Config::get('system', 'logfile'),
|
||||
// see /help/smarty3-templates#1_1 on any Friendica node
|
||||
'$debugging' => ['debugging', L10n::t("Enable Debugging"), Config::get('system', 'debugging'), ""],
|
||||
|
|
|
@ -7,7 +7,6 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\StorageManager;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -578,7 +577,7 @@ class Site extends BaseAdminModule
|
|||
'$relay_title' => L10n::t('Message Relay'),
|
||||
'$relocate' => L10n::t('Relocate Instance'),
|
||||
'$relocate_warning' => L10n::t('Warning! Advanced function. Could make this server unreachable.'),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
|
||||
// name, label, value, help string, extra data...
|
||||
'$sitename' => ['sitename', L10n::t('Site name'), Config::get('config', 'sitename'), ''],
|
||||
|
@ -662,14 +661,14 @@ class Site extends BaseAdminModule
|
|||
'$proxy_disabled' => ['proxy_disabled', L10n::t('Disable picture proxy'), Config::get('system', 'proxy_disabled'), L10n::t('The picture proxy increases performance and privacy. It shouldn\'t be used on systems with very low bandwidth.')],
|
||||
'$only_tag_search' => ['only_tag_search', L10n::t('Only search in tags'), Config::get('system', 'only_tag_search'), L10n::t('On large systems the text search can slow down the system extremely.')],
|
||||
|
||||
'$relocate_url' => ['relocate_url', L10n::t('New base url'), System::baseUrl(), L10n::t('Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.')],
|
||||
'$relocate_url' => ['relocate_url', L10n::t('New base url'), $a->getBaseURL(), L10n::t('Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.')],
|
||||
|
||||
'$rino' => ['rino', L10n::t('RINO Encryption'), intval(Config::get('system', 'rino_encrypt')), L10n::t('Encryption layer between nodes.'), [0 => L10n::t('Disabled'), 1 => L10n::t('Enabled')]],
|
||||
|
||||
'$worker_queues' => ['worker_queues', L10n::t('Maximum number of parallel workers'), Config::get('system', 'worker_queues'), L10n::t('On shared hosters set this to %d. On larger systems, values of %d are great. Default value is %d.', 5, 20, 10)],
|
||||
'$worker_dont_fork' => ['worker_dont_fork', L10n::t('Don\'t use "proc_open" with the worker'), Config::get('system', 'worker_dont_fork'), L10n::t('Enable this if your system doesn\'t allow the use of "proc_open". This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.')],
|
||||
'$worker_fastlane' => ['worker_fastlane', L10n::t('Enable fastlane'), Config::get('system', 'worker_fastlane'), L10n::t('When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.')],
|
||||
'$worker_frontend' => ['worker_frontend', L10n::t('Enable frontend worker'), Config::get('system', 'frontend_worker'), L10n::t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', System::baseUrl())],
|
||||
'$worker_frontend' => ['worker_frontend', L10n::t('Enable frontend worker'), Config::get('system', 'frontend_worker'), L10n::t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', $a->getBaseURL())],
|
||||
|
||||
'$relay_subscribe' => ['relay_subscribe', L10n::t('Subscribe to relay'), Config::get('system', 'relay_subscribe'), L10n::t('Enables the receiving of public posts from the relay. They will be included in the search, subscribed tags and on the global community page.')],
|
||||
'$relay_server' => ['relay_server', L10n::t('Relay server'), Config::get('system', 'relay_server', 'https://relay.diasp.org'), L10n::t('Address of the relay server where public posts should be send to. For example https://relay.diasp.org')],
|
||||
|
|
|
@ -7,7 +7,6 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Update;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
|
@ -130,7 +129,6 @@ class Summary extends BaseAdminModule
|
|||
'$accounts' => $accounts,
|
||||
'$pending' => [L10n::t('Pending registrations'), $pending],
|
||||
'$version' => [L10n::t('Version'), FRIENDICA_VERSION],
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$platform' => FRIENDICA_PLATFORM,
|
||||
'$codename' => FRIENDICA_CODENAME,
|
||||
'$build' => Config::get('system', 'build'),
|
||||
|
@ -143,7 +141,7 @@ class Summary extends BaseAdminModule
|
|||
private static function checkSelfHostMeta()
|
||||
{
|
||||
// Fetch the host-meta to check if this really is a vital server
|
||||
return Network::curl(System::baseUrl() . '/.well-known/host-meta')->isSuccess();
|
||||
return Network::curl(self::getApp()->getBaseURL() . '/.well-known/host-meta')->isSuccess();
|
||||
}
|
||||
|
||||
}
|
|
@ -3,10 +3,8 @@
|
|||
namespace Friendica\Module\Admin\Themes;
|
||||
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -107,7 +105,7 @@ class Details extends BaseAdminModule
|
|||
'$page' => L10n::t('Themes'),
|
||||
'$toggle' => L10n::t('Toggle'),
|
||||
'$settings' => L10n::t('Settings'),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
'$addon' => $theme,
|
||||
'$status' => $status,
|
||||
'$action' => $action,
|
||||
|
|
|
@ -4,8 +4,6 @@ namespace Friendica\Module\Admin\Themes;
|
|||
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
|
||||
namespace Friendica\Module\Admin\Themes;
|
||||
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Module\BaseAdminModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -23,7 +21,7 @@ class Index extends BaseAdminModule
|
|||
|
||||
// reload active themes
|
||||
if (!empty($_GET['action'])) {
|
||||
parent::checkFormSecurityTokenRedirectOnError(System::baseUrl() . '/admin/themes', 'admin_themes', 't');
|
||||
parent::checkFormSecurityTokenRedirectOnError($a->getBaseURL() . '/admin/themes', 'admin_themes', 't');
|
||||
|
||||
switch ($_GET['action']) {
|
||||
case 'reload':
|
||||
|
@ -96,7 +94,7 @@ class Index extends BaseAdminModule
|
|||
'$page' => L10n::t('Themes'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$reload' => L10n::t('Reload active themes'),
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
'$function' => 'themes',
|
||||
'$addons' => $addons,
|
||||
'$pcount' => count($themes),
|
||||
|
|
|
@ -6,7 +6,6 @@ use Friendica\Content\Pager;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Register;
|
||||
use Friendica\Model\User;
|
||||
|
@ -78,7 +77,7 @@ class Users extends BaseAdminModule
|
|||
Thank you and welcome to %4$s.'));
|
||||
|
||||
$preamble = sprintf($preamble, $user['username'], Config::get('config', 'sitename'));
|
||||
$body = sprintf($body, System::baseUrl(), $user['nickname'], $result['password'], Config::get('config', 'sitename'));
|
||||
$body = sprintf($body, $a->getBaseURL(), $user['nickname'], $result['password'], Config::get('config', 'sitename'));
|
||||
|
||||
notification([
|
||||
'type' => SYSTEM_EMAIL,
|
||||
|
|
|
@ -120,11 +120,9 @@ class Contact extends BaseModule
|
|||
'$networks_widget' => $networks_widget
|
||||
]);
|
||||
|
||||
$base = $a->getBaseURL();
|
||||
$tpl = Renderer::getMarkupTemplate('contacts-head.tpl');
|
||||
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(true),
|
||||
'$base' => $base
|
||||
'$baseurl' => $a->getBaseURL(true),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -809,7 +807,6 @@ class Contact extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('contacts-template.tpl');
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$header' => L10n::t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
|
||||
'$tabs' => $t,
|
||||
'$total' => $total,
|
||||
|
|
|
@ -173,15 +173,14 @@ class Install extends BaseModule
|
|||
'$next' => L10n::t('Next'),
|
||||
'$reload' => L10n::t('Check again'),
|
||||
'$php_path' => $php_path,
|
||||
'$baseurl' => $a->getBaseURL()
|
||||
]);
|
||||
break;
|
||||
|
||||
case self::BASE_CONFIG:
|
||||
$ssl_choices = [
|
||||
BaseUrl::SSL_POLICY_NONE => L10n::t("No SSL policy, links will track page SSL state"),
|
||||
BaseUrl::SSL_POLICY_FULL => L10n::t("Force all links to use SSL"),
|
||||
BaseUrl::SSL_POLICY_SELFSIGN => L10n::t("Self-signed certificate, use SSL for local links only \x28discouraged\x29")
|
||||
BaseURL::SSL_POLICY_NONE => L10n::t("No SSL policy, links will track page SSL state"),
|
||||
BaseURL::SSL_POLICY_FULL => L10n::t("Force all links to use SSL"),
|
||||
BaseURL::SSL_POLICY_SELFSIGN => L10n::t("Self-signed certificate, use SSL for local links only \x28discouraged\x29")
|
||||
];
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('install_base.tpl');
|
||||
|
@ -208,7 +207,6 @@ class Install extends BaseModule
|
|||
$configCache->get('system', 'urlpath'),
|
||||
L10n::t('Overwrite this field in case the sub path determination isn\'t right, otherwise leave it as is. Leaving this field blank means the installation is at the base URL without sub path.'),
|
||||
''],
|
||||
'$baseurl' => $a->getBaseURL(),
|
||||
'$php_path' => $configCache->get('config', 'php_path'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
]);
|
||||
|
@ -249,7 +247,6 @@ class Install extends BaseModule
|
|||
'',
|
||||
'required'],
|
||||
'$lbl_10' => L10n::t('Please select a default timezone for your website'),
|
||||
'$baseurl' => $a->getBaseURL(),
|
||||
'$php_path' => $configCache->get('config', 'php_path'),
|
||||
'$submit' => L10n::t('Submit')
|
||||
]);
|
||||
|
@ -286,7 +283,6 @@ class Install extends BaseModule
|
|||
$configCache->get('system', 'language'),
|
||||
L10n::t('Set the default language for your Friendica installation interface and to send emails.'),
|
||||
$lang_choices],
|
||||
'$baseurl' => $a->getBaseURL(),
|
||||
'$php_path' => $configCache->get('config', 'php_path'),
|
||||
'$submit' => L10n::t('Submit')
|
||||
]);
|
||||
|
|
|
@ -22,7 +22,6 @@ class Manifest extends BaseModule
|
|||
}
|
||||
|
||||
$output = Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => $app->getBaseURL(),
|
||||
'$touch_icon' => $touch_icon,
|
||||
'$title' => $config->get('config', 'sitename', 'Friendica'),
|
||||
]);
|
||||
|
|
|
@ -144,7 +144,6 @@ class Register extends BaseModule
|
|||
'$tostext' => L10n::t('Terms of Service'),
|
||||
'$showprivstatement' => Config::get('system', 'tosprivstatement'),
|
||||
'$privstatement'=> $tos->privacy_complete,
|
||||
'$baseurl' => System::baseurl(),
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken('register'),
|
||||
'$explicit_content' => Config::get('system', 'explicit_content', false),
|
||||
'$explicit_content_note' => L10n::t('Note: This node explicitly contains adult content')
|
||||
|
|
|
@ -178,7 +178,6 @@ class Xrd extends BaseModule
|
|||
'$atom' => $baseURL . '/dfrn_poll/' . $user['nickname'],
|
||||
'$poco_url' => $baseURL . '/poco/' . $user['nickname'],
|
||||
'$photo' => $baseURL . '/photo/profile/' . $user['uid'] . '.jpg',
|
||||
'$baseurl' => $baseURL,
|
||||
'$salmon' => $baseURL . '/salmon/' . $user['nickname'],
|
||||
'$salmen' => $baseURL . '/salmon/' . $user['nickname'] . '/mention',
|
||||
'$subscribe' => $baseURL . '/follow?url={uri}',
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<h4>{{$f}}</h4>
|
||||
|
||||
<ul>
|
||||
<li><a href="{{$base}}/admin/dbsync/mark/{{$f}}">{{$mark}}</a></li>
|
||||
<li><a href="{{$base}}/admin/dbsync/{{$f}}">{{$apply}}</a></li>
|
||||
<li><a href="{{$baseurl}}/admin/dbsync/mark/{{$f}}">{{$mark}}</a></li>
|
||||
<li><a href="{{$baseurl}}/admin/dbsync/{{$f}}">{{$apply}}</a></li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div id="adminpage">
|
||||
<h2>{{$banner}}</h2>
|
||||
|
||||
<p><a href="{{$base}}/admin/dbsync/check">{{$check}}</a></p>
|
||||
<p><a href="{{$baseurl}}/admin/dbsync/check">{{$check}}</a></p>
|
||||
|
||||
<hr />
|
||||
</div>
|
||||
|
|
|
@ -70,7 +70,6 @@ function clean_form(App $a, &$colorset, $user)
|
|||
$t = Renderer::getMarkupTemplate("theme_settings.tpl");
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$colorset' => ['duepuntozero_colorset', L10n::t('Variations'), $color, '', $colorset],
|
||||
]);
|
||||
|
|
|
@ -119,7 +119,6 @@ function frio_form($arr)
|
|||
$t = Renderer::getMarkupTemplate('theme_settings.tpl');
|
||||
$ctx = [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t('Theme settings'),
|
||||
'$scheme' => ['frio_scheme', L10n::t('Select color scheme'), $arr['scheme'], '', $scheme_choices],
|
||||
'$share_string' => ['frio_share_string', L10n::t('Copy or paste schemestring'), $arr['share_string'], L10n::t('You can copy this string to share your theme with others. Pasting here applies the schemestring'), false, false],
|
||||
|
|
|
@ -72,7 +72,6 @@ function quattro_form(App $a, $align, $color, $tfs, $pfs) {
|
|||
$t = Renderer::getMarkupTemplate("theme_settings.tpl" );
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$align' => ['quattro_align', L10n::t('Alignment'), $align, '', ['left' => L10n::t('Left'), 'center' => L10n::t('Center')]],
|
||||
'$color' => ['quattro_color', L10n::t('Color scheme'), $color, '', $colors],
|
||||
|
|
|
@ -118,7 +118,6 @@ function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $
|
|||
$t = Renderer::getMarkupTemplate("theme_settings.tpl");
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$style' => ['vier_style', L10n::t('Set style'), $style, '', $styles],
|
||||
'$show_pages' => ['vier_show_pages', L10n::t('Community Pages'), $show_pages, '', $show_or_not],
|
||||
|
|
Loading…
Reference in a new issue