Merge branch '2.5.x' into 2.5.x-saas

This commit is contained in:
Albert Santoni 2014-01-27 12:01:11 -05:00
commit ed78625fce
5 changed files with 100 additions and 89 deletions

View file

@ -515,6 +515,9 @@ class Application_Model_Scheduler
private function insertAfter($scheduleItems, $mediaItems, $filesToInsert=null, $adjustSched=true, $moveAction=false)
{
try {
// temporary fix for CC-5665
set_time_limit(180);
$affectedShowInstances = array();
//dont want to recalculate times for moved items

View file

@ -920,41 +920,6 @@ SQL;
->save();
}
/**
* Generate all the repeating shows in the given range.
*
* @param DateTime $p_startTimestamp
* In UTC format.
* @param DateTime $p_endTimestamp
* In UTC format.
*/
public static function populateAllShowsInRange($p_startTimestamp, $p_endTimestamp)
{
$con = Propel::getConnection();
$endTimeString = $p_endTimestamp->format("Y-m-d H:i:s");
if (!is_null($p_startTimestamp)) {
$startTimeString = $p_startTimestamp->format("Y-m-d H:i:s");
} else {
$today_timestamp = new DateTime("now", new DateTimeZone("UTC"));
$startTimeString = $today_timestamp->format("Y-m-d H:i:s");
}
$stmt = $con->prepare("
SELECT * FROM cc_show_days
WHERE last_show IS NULL
OR first_show < :endTimeString AND last_show > :startTimeString");
$stmt->bindParam(':endTimeString', $endTimeString);
$stmt->bindParam(':startTimeString', $startTimeString);
$stmt->execute();
$res = $stmt->fetchAll();
foreach ($res as $row) {
Application_Model_Show::populateShow($row, $p_endTimestamp);
}
}
/**
*
* @param DateTime $start