Remove deprecated App::getBaseURL() - process methods to DI::baseUrl()->get()

This commit is contained in:
Philipp Holzer 2019-12-16 01:05:15 +01:00
commit e944d7bed6
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
43 changed files with 76 additions and 120 deletions

View file

@ -437,7 +437,7 @@ function dfrn_request_post(App $a)
}
// "Homecoming" - send the requestor back to their site to record the introduction.
$dfrn_url = bin2hex($a->getBaseURL() . '/profile/' . $nickname);
$dfrn_url = bin2hex(DI::baseUrl()->get() . '/profile/' . $nickname);
$aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
System::externalRedirect($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"

View file

@ -126,7 +126,7 @@ function profile_photo_post(App $a)
info(L10n::t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
// Update global directory in background
if ($path && strlen(Config::get('system', 'directory'))) {
Worker::add(PRIORITY_LOW, "Directory", $a->getBaseURL() . '/' . $path);
Worker::add(PRIORITY_LOW, "Directory", DI::baseUrl()->get() . '/' . $path);
}
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());

View file

@ -16,8 +16,6 @@ use Friendica\Module\Security\Login;
function user_allow($hash)
{
$a = \get_app();
$register = Register::getByHash($hash);
if (!DBA::isResult($register)) {
return false;
@ -45,7 +43,7 @@ function user_allow($hash)
$l10n,
$user,
Config::get('config', 'sitename'),
$a->getBaseUrl(),
DI::baseUrl()->get(),
($register['password'] ?? '') ?: 'Sent in a previous email'
);

View file

@ -80,7 +80,7 @@ function removeme_content(App $a)
$tpl = Renderer::getMarkupTemplate('removeme.tpl');
$o = Renderer::replaceMacros($tpl, [
'$basedir' => $a->getBaseURL(),
'$basedir' => DI::baseUrl()->get(),
'$hash' => $hash,
'$title' => L10n::t('Remove My Account'),
'$desc' => L10n::t('This will completely remove your account. Once this has been done it is not recoverable.'),

View file

@ -721,7 +721,7 @@ function settings_content(App $a)
$tpl = Renderer::getMarkupTemplate('settings/oauth.tpl');
$o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"),
'$baseurl' => $a->getBaseURL(true),
'$baseurl' => DI::baseUrl()->get(true),
'$title' => L10n::t('Connected Apps'),
'$add' => L10n::t('Add application'),
'$edit' => L10n::t('Edit'),