Add db field to installer script and version bump

pull/639/head
TimZ99 2018-09-05 20:10:01 +02:00
parent 08b5437b7b
commit aff6125bd6
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
2 changed files with 15 additions and 2 deletions

View File

@ -29,7 +29,7 @@
/** /**
* Current PSM version * Current PSM version
*/ */
define('PSM_VERSION', '3.3.1'); define('PSM_VERSION', '3.4.0');
/** /**
* URL to check for updates. Will not be checked if turned off on config page. * URL to check for updates. Will not be checked if turned off on config page.

View File

@ -313,6 +313,9 @@ class Installer {
if (version_compare($version_from, '3.3.0', '<')) { if (version_compare($version_from, '3.3.0', '<')) {
$this->upgrade330(); $this->upgrade330();
} }
if (version_compare($version_from, '3.4.0', '<')) {
$this->upgrade340();
}
psm_update_conf('version', $version_to); psm_update_conf('version', $version_to);
} }
@ -539,6 +542,16 @@ class Installer {
if (psm_get_conf('sms_gateway') == 'mollie') { if (psm_get_conf('sms_gateway') == 'mollie') {
psm_update_conf('sms_gateway', 'messagebird'); psm_update_conf('sms_gateway', 'messagebird');
} }
}
/**
* Upgrade for v3.4.0 release
*/
protected function upgrade340() {
$queries = array();
$queries[] = "INSERT INTO `".PSM_DB_PREFIX."config` (`key`, `value`) VALUES ('combine_notifications', '1');";
$this->execSQL($queries);
$this->log('Combined notifications enabled. Check out the config page for more info.');
} }
} }