CC-3551 : Change Cue Out for currently deleted track

This commit is contained in:
Naomi Aro 2012-03-29 19:20:02 +02:00
parent 6135cbc79f
commit cea37774ca
6 changed files with 41 additions and 43 deletions

View file

@ -224,11 +224,14 @@ class CcSchedule extends BaseCcSchedule {
return $this;
} // setDbEnds()
public function isCurrentItem() {
public function isCurrentItem($epochNow = null) {
$epochNow = time();
$epochStart = intval($this->getDbStarts('U'));
$epochEnd = intval($this->getDbEnds('U'));
if (is_null($epochNow)) {
$epochNow = microtime(true);
}
$epochStart = floatval($this->getDbStarts('U.u'));
$epochEnd = floatval($this->getDbEnds('U.u'));
if ($epochStart < $epochNow && $epochEnd > $epochNow) {
return true;