1
1
Fork 0

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

This commit is contained in:
Philipp Holzer 2019-12-16 00:47:24 +01:00
commit 50be94aa5e
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
23 changed files with 34 additions and 50 deletions

View file

@ -3563,10 +3563,8 @@ api_register_func('api/friendships/incoming', 'api_friendships_incoming', true);
*/
function api_statusnet_config($type)
{
$a = \get_app();
$name = Config::get('config', 'sitename');
$server = $a->getHostName();
$server = DI::baseUrl()->getHostname();
$logo = System::baseUrl() . '/images/friendica-64.png';
$email = Config::get('config', 'admin_email');
$closed = intval(Config::get('config', 'register_policy')) === \Friendica\Module\Register::CLOSED ? 'true' : 'false';

View file

@ -12,6 +12,7 @@ use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Model\User;
use Friendica\Protocol\Activity;
@ -68,7 +69,7 @@ function notification($params)
}
$sender_name = $sitename;
$hostname = $a->getHostName();
$hostname = DI::baseUrl()->getHostname();
if (strpos($hostname, ':')) {
$hostname = substr($hostname, 0, strpos($hostname, ':'));
}