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

This commit is contained in:
nupplaPhil 2019-12-16 01:05:14 +01:00
parent 0775c28854
commit 335fcf670f
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
19 changed files with 86 additions and 74 deletions

View file

@ -18,6 +18,7 @@ use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Util\Strings;
function tumblr_install()
@ -109,7 +110,7 @@ function tumblr_connect(App $a)
// The callback URL is the script that gets called after the user authenticates with tumblr
// In this example, it would be the included callback.php
$callback_url = $a->getBaseURL()."/tumblr/callback";
$callback_url = DI::baseUrl()->get()."/tumblr/callback";
// Let's begin. First we need a Request Token. The request token is required to send the user
// to Tumblr's login page.
@ -188,7 +189,7 @@ function tumblr_callback(App $a)
PConfig::set(local_user(), "tumblr", "oauth_token_secret", $access_token['oauth_token_secret']);
$o = L10n::t("You are now authenticated to tumblr.");
$o .= '<br /><a href="'.$a->getBaseURL().'/settings/connectors">'.L10n::t("return to the connector page").'</a>';
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
return $o;
}
@ -219,7 +220,7 @@ function tumblr_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/tumblr/tumblr.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/tumblr/tumblr.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -242,7 +243,7 @@ function tumblr_settings(App $a, &$s)
$s .= '</span>';
$s .= '<div id="tumblr-username-wrapper">';
$s .= '<a href="'.$a->getBaseURL().'/tumblr/connect">'.L10n::t("(Re-)Authenticate your tumblr page").'</a>';
$s .= '<a href="'.DI::baseUrl()->get().'/tumblr/connect">'.L10n::t("(Re-)Authenticate your tumblr page").'</a>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="tumblr-enable-wrapper">';