Move redundant System::baseUrl() to DI::baseUrl() calls
This commit is contained in:
parent
f2da1c5ab9
commit
3f34229752
81 changed files with 418 additions and 465 deletions
|
@ -20,17 +20,6 @@ use Friendica\Util\XML;
|
|||
*/
|
||||
class System
|
||||
{
|
||||
/**
|
||||
* @brief Retrieves the Friendica instance base URL
|
||||
*
|
||||
* @param bool $ssl Whether to append http or https under BaseURL::SSL_POLICY_SELFSIGN
|
||||
* @return string Friendica server base URL
|
||||
*/
|
||||
public static function baseUrl($ssl = false)
|
||||
{
|
||||
return DI::baseUrl()->get($ssl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Removes the baseurl from an url. This avoids some mixed content problems.
|
||||
*
|
||||
|
|
|
@ -125,10 +125,10 @@ class Theme
|
|||
$exts = ['.png', '.jpg'];
|
||||
foreach ($exts as $ext) {
|
||||
if (file_exists('view/theme/' . $theme . '/screenshot' . $ext)) {
|
||||
return System::baseUrl() . '/view/theme/' . $theme . '/screenshot' . $ext;
|
||||
return DI::baseUrl() . '/view/theme/' . $theme . '/screenshot' . $ext;
|
||||
}
|
||||
}
|
||||
return System::baseUrl() . '/images/blank.png';
|
||||
return DI::baseUrl() . '/images/blank.png';
|
||||
}
|
||||
|
||||
public static function uninstall($theme)
|
||||
|
|
|
@ -123,7 +123,7 @@ class UserImport
|
|||
}
|
||||
|
||||
$oldbaseurl = $account['baseurl'];
|
||||
$newbaseurl = System::baseUrl();
|
||||
$newbaseurl = DI::baseUrl();
|
||||
|
||||
$oldaddr = str_replace('http://', '@', Strings::normaliseLink($oldbaseurl));
|
||||
$newaddr = str_replace('http://', '@', Strings::normaliseLink($newbaseurl));
|
||||
|
|
|
@ -979,7 +979,7 @@ class Worker
|
|||
return;
|
||||
}
|
||||
|
||||
$url = System::baseUrl()."/worker";
|
||||
$url = DI::baseUrl() . '/worker';
|
||||
Network::fetchUrl($url, false, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue