CC-3289: Widgets should have a version string so users can make sure widgets are up to date

-I've updated the messages used to notify the user to be more explicit.
-I've moved the constant used to track widget api versioning to /application/configs/constants.php
This commit is contained in:
Daniel 2012-02-09 15:04:52 -05:00
parent 51f97361bb
commit b603726a39
3 changed files with 13 additions and 9 deletions

View file

@ -216,7 +216,7 @@ class ApiController extends Zend_Controller_Action
"nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, $limit, $utcTimeEnd),
"timezone"=> date("T"),
"timezoneOffset"=> date("Z"),
"widgetVersion"=>"1.0"); //used by caller to determine if the airtime they are running or widgets in use is out of date.
"AIRTIME_API_VERSION"=>AIRTIME_API_VERSION); //used by caller to determine if the airtime they are running or widgets in use is out of date.
//Convert from UTC to localtime for user.
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"], array("starts", "ends", "start_timestamp", "end_timestamp"));
@ -255,7 +255,7 @@ class ApiController extends Zend_Controller_Action
$result[$dow[$i]] = $shows;
}
$result['widgetVersion'] = "1.0"; //used by caller to determine if the airtime they are running or widgets in use is out of date.
$result['AIRTIME_API_VERSION'] = AIRTIME_API_VERSION; //used by caller to determine if the airtime they are running or widgets in use is out of date.
header("Content-type: text/javascript");
echo $_GET['callback'].'('.json_encode($result).')';
} else {