CC-3030: Repeating shows is broken in devel branch.

This commit is contained in:
Martin Konecny 2011-11-11 10:58:27 -05:00
parent 6f78f1d82d
commit 74d3c3aebc

View file

@ -616,13 +616,12 @@ class Application_Model_Show {
} }
public function hasInstanceOnDate($p_dateTime){ public function hasInstanceOnDate($p_dateTime){
return (!is_null($this->getInstanceOnDate($p_dateTeim))); return (!is_null($this->getInstanceOnDate($p_dateTime)));
} }
public function getInstanceOnDate($p_dateTime){ public function getInstanceOnDate($p_dateTime){
global $CC_DBC; global $CC_DBC;
$timestamp = $p_dateTime->format("Y-m-d H:i:s");
$timestamp = $p_dateTime->getTimestamp();
$showId = $this->getId(); $showId = $this->getId();
$sql = "SELECT id FROM cc_show_instances" $sql = "SELECT id FROM cc_show_instances"
@ -908,7 +907,7 @@ class Application_Model_Show {
public static function populateShowUntil($p_showId, $p_dateTime = NULL) public static function populateShowUntil($p_showId, $p_dateTime = NULL)
{ {
global $CC_DBC; global $CC_DBC;
if (is_null($p_endTimestamp)) { if (is_null($p_dateTime)) {
$date = Application_Model_Preference::GetShowsPopulatedUntil(); $date = Application_Model_Preference::GetShowsPopulatedUntil();
if ($date == "") { if ($date == "") {
@ -1087,6 +1086,7 @@ class Application_Model_Show {
$ccShowInstance->save(); $ccShowInstance->save();
} }
$show_instance_id = $ccShowInstance->getDbId(); $show_instance_id = $ccShowInstance->getDbId();
$showInstance = new Application_Model_ShowInstance($show_instance_id); $showInstance = new Application_Model_ShowInstance($show_instance_id);
@ -1104,6 +1104,7 @@ class Application_Model_Show {
$dt->setTimezone(new DateTimeZone('UTC')); $dt->setTimezone(new DateTimeZone('UTC'));
$utcStartDateTime = $dt; $utcStartDateTime = $dt;
} }
Application_Model_Show::setNextPop($start, $show_id, $day); Application_Model_Show::setNextPop($start, $show_id, $day);