CC-2950: Tell users if they are running an out-of-date version or not
Initial implementation. - added some code in phone_home_stat to retrieve latest version from stat server and store result in db - created new view helper VersionNotify.php, which queries and calculates version difference, then returns the necessary information in html to the view files - created new javascript file versiontooltip.js, which sets up the qtip stuff so that when the version notification icon is clicked, a tooltip is displayed
This commit is contained in:
parent
1c5b2dc813
commit
1a1db1892f
14 changed files with 172 additions and 2 deletions
|
@ -516,6 +516,23 @@ class Application_Model_Preference
|
|||
public static function GetAirtimeVersion(){
|
||||
return self::GetValue("system_version");
|
||||
}
|
||||
|
||||
public static function GetLatestVersion(){
|
||||
$latest = self::GetValue("latest_version");
|
||||
if($latest == null || strlen($latest) == 0) {
|
||||
return self::GetAirtimeVersion();
|
||||
} else {
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
|
||||
public static function SetLatestVersion($version){
|
||||
$pattern = "/^[0-9]+\.[0-9]+\.[0-9]+/";
|
||||
if(!preg_match($pattern, $version)) {
|
||||
$version = self::GetAirtimeVersion();
|
||||
}
|
||||
self::SetValue("latest_version", $version);
|
||||
}
|
||||
|
||||
public static function SetUploadToSoundcloudOption($upload) {
|
||||
self::SetValue("soundcloud_upload_option", $upload);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue