Merge branch 'saas-dev' into soundcloud

Conflicts:
	airtime_mvc/application/configs/constants.php
This commit is contained in:
Duncan Sommerville 2015-06-29 10:02:58 -04:00
commit 5cc8774e56
30 changed files with 194 additions and 182 deletions

View file

@ -36,7 +36,7 @@ class Application_Model_ShowInstance
public function deleteRebroadcasts()
{
$timestamp = gmdate("Y-m-d H:i:s");
$timestamp = gmdate(DEFAULT_TIMESTAMP_FORMAT);
$instance_id = $this->getShowInstanceId();
$sql = <<<SQL
DELETE FROM cc_show_instances
@ -86,18 +86,18 @@ SQL;
/**
* Return the start time of the Show (UTC time)
* @return string in format "Y-m-d H:i:s" (PHP time notation)
* @return string in format DEFAULT_TIMESTAMP_FORMAT (PHP time notation)
*/
public function getShowInstanceStart($format="Y-m-d H:i:s")
public function getShowInstanceStart($format=DEFAULT_TIMESTAMP_FORMAT)
{
return $this->_showInstance->getDbStarts($format);
}
/**
* Return the end time of the Show (UTC time)
* @return string in format "Y-m-d H:i:s" (PHP time notation)
* @return string in format DEFAULT_TIMESTAMP_FORMAT (PHP time notation)
*/
public function getShowInstanceEnd($format="Y-m-d H:i:s")
public function getShowInstanceEnd($format=DEFAULT_TIMESTAMP_FORMAT)
{
return $this->_showInstance->getDbEnds($format);
}
@ -341,7 +341,7 @@ SQL;
$show = $this->getShow();
$current_timestamp = gmdate("Y-m-d H:i:s");
$current_timestamp = gmdate(DEFAULT_TIMESTAMP_FORMAT);
if ($current_timestamp <= $this->getShowInstanceEnd()) {
if ($show->isRepeating()) {
@ -610,7 +610,7 @@ SQL;
$dt = new DateTime($row["starts"], $utcTimezone);
$dt->setTimezone($displayTimezone);
$row["starts"] = $dt->format("Y-m-d H:i:s");
$row["starts"] = $dt->format(DEFAULT_TIMESTAMP_FORMAT);
if (isset($row['length'])) {
$formatter = new LengthFormatter($row["length"]);