Corrected query

Fixes #781.
This commit is contained in:
TimZ99 2019-09-24 18:23:57 +02:00
parent b0ea45ae76
commit 1b0d86b361
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
5 changed files with 18 additions and 11 deletions

View File

@ -5,6 +5,12 @@ Changelog
Not yet released
----------------
v3.4.2 (released September 24, 2019)
--------------------------------
* : Fixed wrong upgrade query and added forgotten version_compare.
v3.4.1 (released September 17, 2019)
--------------------------------

View File

@ -5,7 +5,7 @@ PHP Server Monitor
:alt: Join the chat at https://gitter.im/erickrf/nlpnet
:target: https://gitter.im/phpservermon/phpservermon
Version 3.4.1 (Updated design!)
Version 3.4.2 (Updated design!)
PHP Server Monitor is a script that checks whether your websites and servers are up and running.

View File

@ -51,7 +51,7 @@ copyright = u'2008-2017, Pepijn Over'
# built documents.
#
# The short X.Y version.
version = '3.4.1'
version = '3.4.2'
# The full version, including alpha/beta/rc tags.
release = version

View File

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

View File

@ -322,6 +322,9 @@ class Installer {
if (version_compare($version_from, '3.4.0', '<')) {
$this->upgrade340();
}
if (version_compare($version_from, '3.4.2', '<')) {
$this->upgrade342();
}
psm_update_conf('version', $version_to);
}
@ -573,17 +576,15 @@ class Installer {
$this->execSQL($queries);
$this->log('Combined notifications enabled. Check out the config page for more info.');
}
/**
* Patch for v3.4.1 release
* Patch for v3.4.2 release
* Version_compare was forgotten in v3.4.1 and query failed.
* Fixed in v3.4.2, 3.4.1 has been removed.
*/
protected function upgrade341() {
protected function upgrade342() {
$queries = array();
/**
* Redirect_check is first set to default ok.
* If you have a lot of server that are redirecting,
* this will make sure you're servers stay online.
*/
$queries[] = "ALTER TABLE `".PSM_DB_PREFIX."servers` ALTER COLUMN `last_output` text;";
$queries[] = "ALTER TABLE `".PSM_DB_PREFIX."servers` CHANGE `last_output` `last_output` TEXT;";
$this->execSQL($queries);
}
}