CC-1990: Widget to display schedule and "Now Playing" on any website
-update to API controller to support new widget
This commit is contained in:
parent
ab5a6bc1c5
commit
2aa0cd22c6
2 changed files with 40 additions and 2 deletions
|
@ -104,8 +104,6 @@ class ApiController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
public function liveInfoAction(){
|
||||
global $CC_CONFIG;
|
||||
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
@ -126,6 +124,22 @@ class ApiController extends Zend_Controller_Action
|
|||
echo $_GET['callback'].'('.json_encode($result).')';
|
||||
}
|
||||
|
||||
public function weekInfoAction(){
|
||||
// disable the view and the layout
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
$dow = array("sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday");
|
||||
|
||||
$result = array();
|
||||
for ($i=0; $i<7; $i++){
|
||||
$result[$dow[$i]] = Show_DAL::GetShowsByDayOfWeek($i);
|
||||
}
|
||||
|
||||
header("Content-type: text/javascript");
|
||||
echo $_GET['callback'].'('.json_encode($result).')';
|
||||
}
|
||||
|
||||
public function scheduleAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue