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

@ -13,6 +13,7 @@ use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
function widgets_install() {
Hook::register('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
@ -76,8 +77,7 @@ function widgets_module() {
}
function _abs_url($s){
$a = \get_app();
return preg_replace("|href=(['\"])([^h][^t][^t][^p])|", "href=\$1".$a->getBaseURL()."/\$2", $s);
return preg_replace("|href=(['\"])([^h][^t][^t][^p])|", "href=\$1" . DI::baseUrl()->get() . "/\$2", $s);
}
function _randomAlphaNum($length){