mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Do not issue non-master warning if on the release update channel (#7297)
This commit is contained in:
committed by
Neil Lathwood
parent
e754e9503b
commit
dc110d2d97
16
validate.php
16
validate.php
@@ -296,15 +296,17 @@ 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()));
|
||||
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 ($config['update_channel'] == 'master') {
|
||||
if ($versions['local_sha'] != $versions['github']['sha']) {
|
||||
$commit_date = new DateTime('@' . $versions['local_date'], new DateTimeZone(date_default_timezone_get()));
|
||||
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') {
|
||||
print_warn("Your local git branch is not master, this will prevent automatic updates.");
|
||||
if ($versions['local_branch'] != 'master') {
|
||||
print_warn("Your local git branch is not master, this will prevent automatic updates.");
|
||||
}
|
||||
}
|
||||
|
||||
// check for modified files
|
||||
|
Reference in New Issue
Block a user