Update validate

This commit is contained in:
Tony Murray
2018-01-07 10:25:12 -06:00
parent d6391c8561
commit 017d3793e6
2 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class Php implements ValidationGroup
// if update is not set to false and version is min or newer
if (Config::get('update') && version_compare(PHP_VERSION, $min_version, '<')) {
$validator->warn('PHP version 5.6.4 will be the minimum supported version on January 10, 2018. We recommend you update to PHP a supported version of PHP (7.1 suggested) to continue to receive updates. If you do not update PHP, LibreNMS will continue to function but stop receiving bug fixes and updates.');
$validator->warn('PHP version 5.6.4 is the minimum supported version as of January 10, 2018. We recommend you update to PHP a supported version of PHP (7.1 suggested) to continue to receive updates. If you do not update PHP, LibreNMS will continue to function but stop receiving bug fixes and updates.');
}
}
+11 -4
View File
@@ -62,10 +62,17 @@ class Updates implements ValidationGroup
}
if ($versions['local_branch'] != 'master') {
$validator->warn(
"Your local git branch is not master, this will prevent automatic updates.",
"You can switch back to master with git checkout master"
);
if ($versions['local_branch'] == 'php53') {
$validator->warn(
"You are on the PHP 5.3 support branch, this will prevent automatic updates.",
"Update to PHP 5.6.4 or newer (PHP 7.1 recommended) to continue to receive updates."
);
} else {
$validator->warn(
"Your local git branch is not master, this will prevent automatic updates.",
"You can switch back to master with git checkout master"
);
}
}
}