From e57a87f2249caffa547d7ec3228102b92248cae3 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Mon, 16 Dec 2019 00:48:20 +0100 Subject: [PATCH] Remove deprecated App::setBaseURL() - process methods to DI::baseUrl()->saveByURL() --- bin/worker.php | 2 +- src/App.php | 14 -------------- src/Module/Admin/Site.php | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/bin/worker.php b/bin/worker.php index a478159195..b2d97cc115 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -46,7 +46,7 @@ if (!DI::mode()->has(App\Mode::MAINTENANCEDISABLED)) { return; } -$a->setBaseURL(Config::get('system', 'url')); +DI::baseUrl()->saveByURL(Config::get('system', 'url')); $spawn = array_key_exists('s', $options) || array_key_exists('spawn', $options); diff --git a/src/App.php b/src/App.php index b414926006..c00a574c2d 100644 --- a/src/App.php +++ b/src/App.php @@ -285,20 +285,6 @@ class App return $this->baseURL->get($ssl); } - /** - * @brief Initializes the baseurl components - * - * Clears the baseurl cache to prevent inconsistencies - * - * @param string $url - * - * @deprecated 2019.06 - use BaseURL->saveByURL($url) instead - */ - public function setBaseURL($url) - { - $this->baseURL->saveByURL($url); - } - /** * Returns the current UserAgent as a String * diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index 6467bd4c52..267680583d 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -95,7 +95,7 @@ class Site extends BaseAdminModule // update config Config::set('system', 'url', $new_url); - $a->setBaseURL($new_url); + DI::baseUrl()->saveByURL($new_url); // send relocate $usersStmt = DBA::select('user', ['uid'], ['account_removed' => false, 'account_expired' => false]); -- 2.39.5