mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 08:58:49 +00:00
Remove deprecated App::getBaseURL() - process methods to DI::baseUrl()->get()
This commit is contained in:
parent
0775c28854
commit
335fcf670f
19 changed files with 86 additions and 74 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue