fix: Do not issue non-master warning if on the release update channel (#7297)

This commit is contained in:
Tony Murray
2017-09-07 03:18:19 -05:00
committed by Neil Lathwood
parent e754e9503b
commit dc110d2d97

View File

@@ -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