added shows, show-schedules, show-preview, show-history-feed, item-history-feed endpoints to the HTTP api to be used via NewscoopAirtimePlugin

This commit is contained in:
Mark Lewis 2014-11-17 21:53:31 +01:00 committed by Albert Santoni
parent 05c9e21e48
commit 44b4faf6d9
4 changed files with 307 additions and 48 deletions

View file

@ -548,7 +548,7 @@ SQL;
}
public function getShowListContent()
public function getShowListContent($timezone = null)
{
$con = Propel::getConnection();
@ -599,9 +599,14 @@ SQL;
':instance_id2' => $this->_instanceId
));
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
$userTimezone = Application_Model_Preference::GetUserTimezone();
$displayTimezone = new DateTimeZone($userTimezone);
if (isset($timezone)) {
$displayTimezone = new DateTimeZone($timezone);
} else {
$userTimezone = Application_Model_Preference::GetUserTimezone();
$displayTimezone = new DateTimeZone($userTimezone);
}
$utcTimezone = new DateTimeZone("UTC");
foreach ($results as &$row) {