diff --git a/README.md b/README.md index 9342b613a..3af143220 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Ilch 2 ist der direkte Nachfolger der Ilch Versionen 1.1. - Den Bildschirmanweisungen folgen ### Voraussetzungen -- PHP Version 5.6 oder neuer +- PHP Version 7.0 oder neuer - MySQL (5.5.3), MariaDB (5.5) oder Equivalent ### Support/Dokumentation diff --git a/application/modules/admin/config/config.php b/application/modules/admin/config/config.php index 2e15a6b1c..1a42d09ad 100644 --- a/application/modules/admin/config/config.php +++ b/application/modules/admin/config/config.php @@ -210,8 +210,7 @@ public function getInstallSql() PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1; - INSERT INTO `[prefix]_admin_updateservers` (`id`, `url`, `operator`, `country`) VALUES (1, "https://ilch2.de/development/updateserver/stable/", "corian (ilch-Team)", "Germany"); - INSERT INTO `[prefix]_admin_updateservers` (`id`, `url`, `operator`, `country`) VALUES (2, "https://www.blackcoder.de/ilch-us/stable/", "blackcoder (ilch-Team)", "Germany");'; + INSERT INTO `[prefix]_admin_updateservers` (`id`, `url`, `operator`, `country`) VALUES (1, "https://ilch2.de/development/updateserver/stable/", "corian (ilch-Team)", "Germany");'; } public function getUpdate($installedVersion) @@ -702,6 +701,18 @@ public function getUpdate($installedVersion) replaceVendorDirectory(); break; + case "2.1.39": + // Change updateserver to the first one if the current one is the second one. + // Don't change the server if that is not the case to avoid problems with maybe the rare case of an own + // updateservers with own certificate. + $databaseConfig = new \Ilch\Config\Database($this->db()); + if ($databaseConfig->get('updateserver') === 'https://www.blackcoder.de/ilch-us/stable/') { + $databaseConfig->set('updateserver', 'https://ilch2.de/development/updateserver/stable/'); + } + + // Remove the second updateserver. + $this->db()->query("DELETE FROM `[prefix]_admin_updateservers` WHERE `url` = 'https://www.blackcoder.de/ilch-us/stable/';"); + break; } return 'Update function executed.'; diff --git a/index.php b/index.php index 3e7374be0..9ec53a451 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,7 @@ $serverTimeZone = @date_default_timezone_get(); date_default_timezone_set('UTC'); -define('VERSION', '2.1.39'); +define('VERSION', '2.1.40'); define('SERVER_TIMEZONE', $serverTimeZone); define('DEFAULT_MODULE', 'page'); define('DEFAULT_LAYOUT', 'index');