Fixed updating single show instance problem where it wasn't fetching

the current instance
This commit is contained in:
drigato 2013-11-26 12:32:05 -05:00
parent 6ea0cb5918
commit f571000657
1 changed files with 7 additions and 1 deletions

View File

@ -896,7 +896,13 @@ SQL;
if ($utcStartDateTime->getTimestamp() < $populateUntil->getTimestamp()) {
$ccShowInstance = new CcShowInstances();
if ($this->isUpdate) {
$ccShowInstance = $this->getInstance($utcStartDateTime);
//use original cc_show_day object to get the current cc_show_instance
$origStartDateTime = new DateTime(
$this->origCcShowDay->getDbFirstShow()." ".$this->origCcShowDay->getDbStartTime(),
new DateTimeZone($this->origCcShowDay->getDbTimezone())
);
$origStartDateTime->setTimezone(new DateTimeZone("UTC"));
$ccShowInstance = $this->getInstance($origStartDateTime);
}
$ccShowInstance->setDbShowId($this->ccShow->getDbId());