diff --git a/blockem/blockem.php b/blockem/blockem.php
index e0c0a74a..6d93de1d 100644
--- a/blockem/blockem.php
+++ b/blockem/blockem.php
@@ -11,6 +11,7 @@ use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
+use Friendica\DI;
use Friendica\Util\Strings;
function blockem_install()
@@ -43,7 +44,7 @@ function blockem_addon_settings (App $a, &$s)
}
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
$words = PConfig::get(local_user(), 'blockem', 'words');
@@ -148,7 +149,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
function blockem_display_item(App $a, array &$b = null)
{
if (!empty($b['output']['body']) && strstr($b['output']['body'], 'id="blockem-wrap-')) {
- $b['output']['thumb'] = $a->getBaseURL() . "/images/person-80.jpg";
+ $b['output']['thumb'] = DI::baseUrl()->get() . "/images/person-80.jpg";
}
}
diff --git a/blogger/blogger.php b/blogger/blogger.php
index 001224d2..049ee077 100644
--- a/blogger/blogger.php
+++ b/blogger/blogger.php
@@ -12,6 +12,7 @@ use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
+use Friendica\DI;
use Friendica\Util\Network;
use Friendica\Util\XML;
@@ -68,7 +69,7 @@ function blogger_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variables */
diff --git a/buffer/buffer.php b/buffer/buffer.php
index 13b5309d..24357634 100644
--- a/buffer/buffer.php
+++ b/buffer/buffer.php
@@ -17,6 +17,7 @@ use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Model\ItemContent;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
@@ -110,7 +111,7 @@ function buffer_connect(App $a)
$client_secret = Config::get('buffer','client_secret');
// The callback URL is the script that gets called after the user authenticates with buffer
- $callback_url = $a->getBaseURL()."/buffer/connect";
+ $callback_url = DI::baseUrl()->get()."/buffer/connect";
$buffer = new BufferApp($client_id, $client_secret, $callback_url);
@@ -119,7 +120,7 @@ function buffer_connect(App $a)
} else {
Logger::log("buffer_connect: authenticated");
$o = L10n::t("You are now authenticated to buffer. ");
- $o .= ' ' . L10n::t("return to the connector page") . '';
+ $o .= ' ' . L10n::t("return to the connector page") . '';
PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token);
}
@@ -152,7 +153,7 @@ function buffer_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variables */
@@ -181,7 +182,7 @@ function buffer_settings(App $a, &$s)
if ($access_token == "") {
$s .= '
';
// The callback URL is the script that gets called after the user authenticates with buffer
- $callback_url = $a->getBaseURL() . '/buffer/connect';
+ $callback_url = DI::baseUrl()->get() . '/buffer/connect';
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php
index e70449af..b345ea4f 100644
--- a/catavatar/catavatar.php
+++ b/catavatar/catavatar.php
@@ -15,6 +15,7 @@ use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Photo;
use Friendica\Network\HTTPException\NotFoundException;
@@ -84,7 +85,7 @@ function catavatar_addon_settings_post(App $a, &$s)
$seed = PConfig::get(local_user(), 'catavatar', 'seed', md5(trim(strtolower($user['email']))));
if (!empty($_POST['catavatar-usecat'])) {
- $url = $a->getBaseURL() . '/catavatar/' . local_user() . '?ts=' . time();
+ $url = DI::baseUrl()->get() . '/catavatar/' . local_user() . '?ts=' . time();
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
if (!DBA::isResult($self)) {
@@ -111,7 +112,7 @@ function catavatar_addon_settings_post(App $a, &$s)
Contact::updateSelfFromUserID(local_user(), true);
// Update global directory in background
- $url = $a->getBaseURL() . '/profile/' . $a->user['nickname'];
+ $url = DI::baseUrl()->get() . '/profile/' . $a->user['nickname'];
if ($url && strlen(Config::get('system', 'directory'))) {
Worker::add(PRIORITY_LOW, 'Directory', $url);
}
@@ -140,7 +141,7 @@ function catavatar_addon_settings_post(App $a, &$s)
function catavatar_lookup(App $a, &$b)
{
$user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]);
- $url = $a->getBaseURL() . '/catavatar/' . $user['uid'];
+ $url = DI::baseUrl()->get() . '/catavatar/' . $user['uid'];
switch($b['size']) {
case 300: $url .= "/4"; break;
diff --git a/curweather/curweather.php b/curweather/curweather.php
index df7a701a..533c83e0 100644
--- a/curweather/curweather.php
+++ b/curweather/curweather.php
@@ -17,6 +17,7 @@ use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
+use Friendica\DI;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
@@ -103,7 +104,7 @@ function curweather_network_mod_init(App $a, &$b)
return;
}
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
// $rpt value is needed for location
// $lang will be taken from the browser session to honour user settings
diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php
index eb7e521b..06b54399 100644
--- a/diaspora/diaspora.php
+++ b/diaspora/diaspora.php
@@ -66,7 +66,7 @@ function diaspora_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variables */
diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php
index ebba0232..5c13734b 100644
--- a/dwpost/dwpost.php
+++ b/dwpost/dwpost.php
@@ -15,6 +15,7 @@ use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
@@ -63,7 +64,7 @@ function dwpost_settings(App $a, &$s)
}
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(), 'dwpost', 'post');
diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php
index 3bb55f35..c9e08696 100644
--- a/ifttt/ifttt.php
+++ b/ifttt/ifttt.php
@@ -14,6 +14,7 @@ use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Util\Strings;
@@ -63,7 +64,7 @@ function ifttt_settings(App $a, &$s)
$s .= '
';
$s .= '
' . L10n::t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '