♻️ only store versions on success
We should only overwrite latest_version if retreiving from GitHub went ok, else we should keep the old values and store "null".
This commit is contained in:
parent
c0124b6245
commit
b65c040394
1 changed files with 3 additions and 3 deletions
|
@ -909,13 +909,13 @@ class Application_Model_Preference
|
|||
$versions[] = $item->get_title();
|
||||
}
|
||||
$latest = $versions;
|
||||
self::setValue('latest_version', json_encode($latest));
|
||||
self::setValue('latest_version_nextcheck', strtotime('+1 week'));
|
||||
if (empty($latest)) {
|
||||
return array($config['airtime_version']);
|
||||
} else {
|
||||
return $latest;
|
||||
}
|
||||
|
||||
self::setValue('latest_version', json_encode($latest));
|
||||
return $latest;
|
||||
}
|
||||
|
||||
public static function SetLatestVersion($version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue