Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x
This commit is contained in:
commit
0fac533036
2 changed files with 13 additions and 4 deletions
|
@ -180,13 +180,18 @@ SQL;
|
||||||
return "Shows can have a max length of 24 hours.";
|
return "Shows can have a max length of 24 hours.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$utc = new DateTimeZone("UTC");
|
||||||
|
|
||||||
|
$nowDateTime = new DateTime("now", $utc);
|
||||||
|
|
||||||
$showInstances = CcShowInstancesQuery::create()
|
$showInstances = CcShowInstancesQuery::create()
|
||||||
->filterByDbShowId($this->_showId)
|
->filterByDbShowId($this->_showId)
|
||||||
->find($con);
|
->find($con);
|
||||||
|
|
||||||
/* Check if the show being resized and any of its repeats * overlap
|
/* Check two things:
|
||||||
with other scheduled shows */
|
1. If the show being resized and any of its repeats end in the past
|
||||||
$utc = new DateTimeZone("UTC");
|
2. If the show being resized and any of its repeats overlap
|
||||||
|
with other scheduled shows */
|
||||||
|
|
||||||
foreach ($showInstances as $si) {
|
foreach ($showInstances as $si) {
|
||||||
$startsDateTime = new DateTime($si->getDbStarts(), new DateTimeZone("UTC"));
|
$startsDateTime = new DateTime($si->getDbStarts(), new DateTimeZone("UTC"));
|
||||||
|
@ -202,6 +207,10 @@ SQL;
|
||||||
$newStartsDateTime = Application_Model_ShowInstance::addDeltas($startsDateTime, $deltaDay, $deltaMin);
|
$newStartsDateTime = Application_Model_ShowInstance::addDeltas($startsDateTime, $deltaDay, $deltaMin);
|
||||||
$newEndsDateTime = Application_Model_ShowInstance::addDeltas($endsDateTime, $deltaDay, $deltaMin);
|
$newEndsDateTime = Application_Model_ShowInstance::addDeltas($endsDateTime, $deltaDay, $deltaMin);
|
||||||
|
|
||||||
|
if ($newEndsDateTime->getTimestamp() < $nowDateTime->getTimestamp()) {
|
||||||
|
return "End date/time cannot be in the past";
|
||||||
|
}
|
||||||
|
|
||||||
//convert our new starts/ends to UTC.
|
//convert our new starts/ends to UTC.
|
||||||
$newStartsDateTime->setTimezone($utc);
|
$newStartsDateTime->setTimezone($utc);
|
||||||
$newEndsDateTime->setTimezone($utc);
|
$newEndsDateTime->setTimezone($utc);
|
||||||
|
|
|
@ -65,7 +65,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
var $el = $(this), selected = mod
|
var $el = $(this), selected = mod
|
||||||
.getChosenAudioFilesLength(), container, message, li = $("#side_playlist ul[id='spl_sortable'] li:first"), width = li
|
.getChosenAudioFilesLength(), container, message, li = $("#side_playlist ul[id='spl_sortable'] li:first"), width = li
|
||||||
.width(), height = li.height();
|
.width(), height = 55;
|
||||||
|
|
||||||
// dragging an element that has an unselected
|
// dragging an element that has an unselected
|
||||||
// checkbox.
|
// checkbox.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue