]> git.mxchange.org Git - friendica-addons.git/commitdiff
Remove deprecated App::getHostName() - process methods to DI::baseUrl()->getHostName()
authornupplaPhil <admin@philipp.info>
Sun, 15 Dec 2019 23:47:24 +0000 (00:47 +0100)
committernupplaPhil <admin@philipp.info>
Fri, 27 Dec 2019 20:55:16 +0000 (21:55 +0100)
diaspora/diaspora.php
notifyall/notifyall.php
pumpio/pumpio.php
securemail/securemail.php
statusnet/statusnet.php
twitter/twitter.php
xmpp/xmpp.php

index 0d847b1447a6a53e3516d67ad191d1a297e515ba..eb7e521b6ab96e1721e516fe5f1755eb78b5496b 100644 (file)
@@ -18,6 +18,7 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Protocol;
 use Friendica\Database\DBA;
 use Friendica\Core\Worker;
+use Friendica\DI;
 
 function diaspora_install()
 {
@@ -231,7 +232,7 @@ function diaspora_post_local(App $a, array &$b)
 
 function diaspora_send(App $a, array &$b)
 {
-       $hostname = $a->getHostName();
+       $hostname = DI::baseUrl()->getHostname();
 
        Logger::log('diaspora_send: invoked');
 
index 8205e200d46a67a4b18bd6b6bf49b542fd8aee4e..c470cb4ecae38e3b0c999f99fc9751b3f1759957 100644 (file)
@@ -57,7 +57,7 @@ function notifyall_post(App $a)
        }
 
        if (!Config::get('config', 'sender_email')) {
-               $sender_email = 'noreply@' . $a->getHostName();
+               $sender_email = 'noreply@' . DI::baseUrl()->getHostname();
        } else {
                $sender_email = Config::get('config', 'sender_email');
        }
index e8b740c2b5b04f381eb3d5ce63ec9b156fd9ad8c..18ab5f41d41279e38455275ede6330bd0fb0c908 100644 (file)
@@ -17,6 +17,7 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Protocol;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Group;
 use Friendica\Model\Item;
@@ -105,7 +106,7 @@ function pumpio_registerclient(App $a, $host)
        $application_name  = Config::get('pumpio', 'application_name');
 
        if ($application_name == "") {
-               $application_name = $a->getHostName();
+               $application_name = DI::baseUrl()->getHostname();
        }
 
        $adminlist = explode(",", str_replace(" ", "", Config::get('config', 'admin_email')));
@@ -772,7 +773,7 @@ function pumpio_fetchtimeline(App $a, $uid)
                $application_name  = Config::get('pumpio', 'application_name');
        }
        if ($application_name == "") {
-               $application_name = $a->getHostName();
+               $application_name = DI::baseUrl()->getHostname();
        }
 
        $first_time = ($lastdate == "");
index 5662714bc2f98f0ef1cf25baf3c2930c75cda452..029e040ac76ccd2ac940fa931c1f83702ef362b1 100644 (file)
@@ -13,6 +13,7 @@ use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
+use Friendica\DI;
 use Friendica\Util\Emailer;
 
 require_once __DIR__ . '/vendor/autoload.php';
@@ -92,7 +93,7 @@ function securemail_settings_post(App &$a, array &$b)
                if ($_POST['securemail-submit'] == L10n::t('Save and send test')) {
                        $sitename = Config::get('config', 'sitename');
 
-                       $hostname = $a->getHostName();
+                       $hostname = DI::baseUrl()->getHostname();
                        if (strpos($hostname, ':')) {
                                $hostname = substr($hostname, 0, strpos($hostname, ':'));
                        }
index baba236ab0c0559d2307a87d5b879e62f9467a1b..38b9f8abd7bbda5be2c7f7ea3067db3f699a6147 100644 (file)
@@ -838,7 +838,7 @@ function statusnet_fetchtimeline(App $a, $uid)
                $application_name = Config::get('statusnet', 'application_name');
        }
        if ($application_name == "") {
-               $application_name = $a->getHostName();
+               $application_name = DI::baseUrl()->getHostname();
        }
 
        $connection = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret);
index 54d9094873a48c98eb94ff45c59ddc007820e6d4..cfa7bfdc376efc84f34b1ca60c0edd412a6f3586 100644 (file)
@@ -940,7 +940,7 @@ function twitter_fetchtimeline(App $a, $uid)
        $application_name = Config::get('twitter', 'application_name');
 
        if ($application_name == "") {
-               $application_name = $a->getHostName();
+               $application_name = DI::baseUrl()->getHostname();
        }
 
        $has_picture = false;
@@ -1633,7 +1633,7 @@ function twitter_fetchhometimeline(App $a, $uid)
        $application_name = Config::get('twitter', 'application_name');
 
        if ($application_name == "") {
-               $application_name = $a->getHostName();
+               $application_name = DI::baseUrl()->getHostname();
        }
 
        $connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret);
index f596a6791154272bed040a7ea48a786ccc6882ee..cbb770f60cd1e42318c676333b102a1386f1de13 100644 (file)
@@ -13,6 +13,7 @@ use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
+use Friendica\DI;
 use Friendica\Util\Strings;
 
 function xmpp_install()
@@ -167,7 +168,7 @@ function xmpp_converse(App $a)
                        PConfig::set(local_user(), "xmpp", "password", $password);
                }
 
-               $jid = $a->user["nickname"] . "@" . $a->getHostName() . "/converse-" . Strings::getRandomHex(5);
+               $jid = $a->user["nickname"] . "@" . DI::baseUrl()->getHostname() . "/converse-" . Strings::getRandomHex(5);
 
                $auto_login = "auto_login: true,
                        authentication: 'login',