From 96e12be26be356deb8895974b68b383279b8d1b2 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 18 Feb 2023 20:28:01 +0100 Subject: [PATCH] Remove old config parts - config.hostname - system.urlpath - system.ssl_policy --- config/local-sample.config.php | 1 - database.sql | 2 +- mods/local.config.ci.php | 3 --- mods/local.config.vagrant.php | 3 --- static/dbstructure.config.php | 2 +- update.php | 12 ++++++++++++ 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/config/local-sample.config.php b/config/local-sample.config.php index 2e9c02b421..069e5834f3 100644 --- a/config/local-sample.config.php +++ b/config/local-sample.config.php @@ -36,7 +36,6 @@ return [ 'sitename' => 'Friendica Social Network', 'register_policy' => \Friendica\Module\Register::OPEN, 'register_text' => '', - 'hostname' => 'friendica.local', ], 'system' => [ 'default_timezone' => 'UTC', diff --git a/database.sql b/database.sql index e890d7421a..053f0c7279 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2023.03-dev (Giant Rhubarb) --- DB_UPDATE_VERSION 1514 +-- DB_UPDATE_VERSION 1515 -- ------------------------------------------ diff --git a/mods/local.config.ci.php b/mods/local.config.ci.php index 66e80a8097..2da6b2a1ab 100644 --- a/mods/local.config.ci.php +++ b/mods/local.config.ci.php @@ -35,7 +35,6 @@ return [ // **************************************************************** 'config' => [ - 'hostname' => 'friendica.local', 'admin_email' => 'admin@friendica.local', 'sitename' => 'Friendica Social Network', 'register_policy' => \Friendica\Module\Register::OPEN, @@ -44,9 +43,7 @@ return [ 'system' => [ 'default_timezone' => 'UTC', 'language' => 'en', - 'ssl_policy' => \Friendica\App\BaseURL::SSL_POLICY_SELFSIGN, 'url' => 'https://friendica.local', - 'urlpath' => '', // don't start unexpected worker.php processes during test! 'worker_dont_fork' => true, ], diff --git a/mods/local.config.vagrant.php b/mods/local.config.vagrant.php index 379ddf185d..16426f932d 100644 --- a/mods/local.config.vagrant.php +++ b/mods/local.config.vagrant.php @@ -29,7 +29,6 @@ return [ // **************************************************************** 'config' => [ - 'hostname' => '192.168.56.10', 'admin_email' => 'admin@friendica.local', 'sitename' => 'Friendica Social Network', 'register_policy' => \Friendica\Module\Register::OPEN, @@ -39,8 +38,6 @@ return [ 'default_timezone' => 'UTC', 'language' => 'en', 'basepath' => '/vagrant', - 'ssl_policy' => \Friendica\App\BaseURL::SSL_POLICY_SELFSIGN, 'url' => 'https://192.168.56.10', - 'urlpath' => '', ], ]; diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index dcab1d0c87..83c890915d 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1514); + define('DB_UPDATE_VERSION', 1515); } return [ diff --git a/update.php b/update.php index 86735f864c..63afae8d83 100644 --- a/update.php +++ b/update.php @@ -1287,3 +1287,15 @@ function update_1514() return Update::SUCCESS; } + +function update_1515() +{ + DI::config() + ->beginTransaction() + ->delete('config', 'hostname') + ->delete('system', 'urlpath') + ->delete('system', 'ssl_policy') + ->commit(); + + return Update::SUCCESS; +}