CC-3289: Widgets should have a version string so users can make sure widgets are up to date
- I updated the ApiController.php file to add a widgetsVersion value used in the response to widgets - I updated the widgets jquery.showinfo.js file to check the version and report back to the user.
This commit is contained in:
parent
214c6e85cc
commit
5d31e4c2a0
4 changed files with 34 additions and 14 deletions
|
@ -215,7 +215,8 @@ class ApiController extends Zend_Controller_Action
|
|||
"currentShow"=>Application_Model_Show::GetCurrentShow($utcTimeNow),
|
||||
"nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, $limit, $utcTimeEnd),
|
||||
"timezone"=> date("T"),
|
||||
"timezoneOffset"=> date("Z"));
|
||||
"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.
|
||||
|
||||
//Convert from UTC to localtime for user.
|
||||
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"], array("starts", "ends", "start_timestamp", "end_timestamp"));
|
||||
|
@ -254,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.
|
||||
header("Content-type: text/javascript");
|
||||
echo $_GET['callback'].'('.json_encode($result).')';
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue