Remove deprecated App::setBaseURL() - process methods to DI::baseUrl()->saveByURL()
authornupplaPhil <admin@philipp.info>
Sun, 15 Dec 2019 23:48:20 +0000 (00:48 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 29 Dec 2019 19:17:47 +0000 (20:17 +0100)
bin/worker.php
src/App.php
src/Module/Admin/Site.php

index a478159195432551a7a85fdee6ae219fa7f3258b..b2d97cc11541c735f9b03d59ae0c3a9c1de1f5ea 100755 (executable)
@@ -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);
 
index b414926006f585e7adc01cbf469142e78e790647..c00a574c2dabf836ac04bf5ad344a3645edbbce2 100644 (file)
@@ -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
         *
index 6467bd4c524a4f59d47c85a61dbd3e0717eacb8c..267680583d358e8284dcb200686c69522d9cdcca 100644 (file)
@@ -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]);