CC-2950: Tell users if they are running an out-of-date version or not

Get rid of hardcoded url for downloading the latest version, and use the url
stored in the stat server instead
This commit is contained in:
Yuchen Wang 2011-11-17 14:10:26 -05:00
parent d836425931
commit eae90862b1
4 changed files with 25 additions and 8 deletions

View file

@ -82,8 +82,10 @@ if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
$resultArray = explode("\n", $result);
Application_Model_Preference::SetLatestVersion($result);
Application_Model_Preference::SetLatestVersion($resultArray[0]);
Application_Model_Preference::SetLatestLink($resultArray[1]);
}
/**