1
0
Fork 0

Move redundant System::baseUrl() to DI::baseUrl() calls

This commit is contained in:
Philipp Holzer 2019-12-30 23:00:08 +01:00
commit 3f34229752
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
81 changed files with 418 additions and 465 deletions

View file

@ -9,7 +9,6 @@ use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\DI;
@ -92,7 +91,7 @@ function add_page_info_data(array $data, $no_photos = false)
/// @TODO make a positive list of allowed characters
$hashtag = str_replace([" ", "+", "/", ".", "#", "'", "", "`", "(", ")", "", ""],
["", "", "", "", "", "", "", "", "", "", "", ""], $keyword);
$hashtags .= "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url] ";
$hashtags .= "#[url=" . DI::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url] ";
}
}
@ -143,7 +142,7 @@ function add_page_keywords($url, $photo = "", $keywords = false, $keyword_blackl
$tags .= ", ";
}
$tags .= "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
$tags .= "#[url=" . DI::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
}
}
@ -298,7 +297,7 @@ function subscribe_to_hub($url, array $importer, array $contact, $hubmode = 'sub
return;
}
$push_url = System::baseUrl() . '/pubsub/' . $user['nickname'] . '/' . $contact['id'];
$push_url = DI::baseUrl() . '/pubsub/' . $user['nickname'] . '/' . $contact['id'];
// Use a single verify token, even if multiple hubs
$verify_token = ((strlen($contact['hub-verify'])) ? $contact['hub-verify'] : Strings::getRandomHex());