mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Updated validate.php to only warn users the install is out of date if > 24 hours (#7208)
* refactor: Updated validate.php to only warn users the install is out of date if > 24 hours * Fix 24hrs, not 48hrs
This commit is contained in:
@@ -298,7 +298,9 @@ if (isset($config['rrdtool_version']) && (version_compare($config['rrdtool_versi
|
||||
if (check_git_exists() === true) {
|
||||
if ($config['update_channel'] == 'master' && $versions['local_sha'] != $versions['github']['sha']) {
|
||||
$commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get()));
|
||||
print_warn("Your install is out of date, last update: " . $commit_date->format('r'));
|
||||
if ($commit_date->diff(new DateTime())->days > 0) {
|
||||
print_warn("Your install is over 24 hours out of date, last update: " . $commit_date->format('r'));
|
||||
}
|
||||
}
|
||||
|
||||
if ($versions['local_branch'] != 'master') {
|
||||
|
Reference in New Issue
Block a user