mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Remove deprecated App::getBaseURL() - process methods to DI::baseUrl()->get()
This commit is contained in:
parent
e57a87f224
commit
e944d7bed6
43 changed files with 76 additions and 120 deletions
20
src/App.php
20
src/App.php
|
@ -271,20 +271,6 @@ class App
|
|||
return $this->baseURL->getScheme();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @deprecated 2019.09 - use BaseUrl->get($ssl) instead
|
||||
*/
|
||||
public function getBaseURL($ssl = false)
|
||||
{
|
||||
return $this->baseURL->get($ssl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current UserAgent as a String
|
||||
*
|
||||
|
@ -298,7 +284,7 @@ class App
|
|||
FRIENDICA_CODENAME . "' " .
|
||||
FRIENDICA_VERSION . '-' .
|
||||
DB_UPDATE_VERSION . '; ' .
|
||||
$this->getBaseURL();
|
||||
$this->baseURL->get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -478,8 +464,8 @@ class App
|
|||
// and www.example.com vs example.com.
|
||||
// We will only change the url to an ip address if there is no existing setting
|
||||
|
||||
if (empty($url) || (!Util\Strings::compareLink($url, $this->getBaseURL())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $this->baseURL->getHostname()))) {
|
||||
$this->config->set('system', 'url', $this->getBaseURL());
|
||||
if (empty($url) || (!Util\Strings::compareLink($url, $this->baseURL->get())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $this->baseURL->getHostname()))) {
|
||||
$this->config->set('system', 'url', $this->baseURL->get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue