Skip to content

Commit

Permalink
Update version number and change updateserver
Browse files Browse the repository at this point in the history
  • Loading branch information
blackcoder87 committed Sep 18, 2020
1 parent 0f15f59 commit 1ac3ddd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions application/modules/admin/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.';
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 1ac3ddd

Please sign in to comment.