Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x

This commit is contained in:
Naomi 2013-05-27 17:02:46 -04:00
commit bf6437cf09
2 changed files with 6 additions and 4 deletions

View file

@ -38,6 +38,8 @@ class Application_Model_Preference
$paramMap[':id'] = $userId; $paramMap[':id'] = $userId;
} }
Application_Common_Database::prepareAndExecute("LOCK TABLE cc_pref");
$result = Application_Common_Database::prepareAndExecute($sql, $result = Application_Common_Database::prepareAndExecute($sql,
$paramMap, $paramMap,
Application_Common_Database::COLUMN, Application_Common_Database::COLUMN,

View file

@ -620,7 +620,7 @@ class Application_Model_Scheduler
//show is empty so start position counter at 0 //show is empty so start position counter at 0
$pos = 0; $pos = 0;
$adjustSched = false; //$adjustSched = false;
} }
if (!in_array($instanceId, $affectedShowInstances)) { if (!in_array($instanceId, $affectedShowInstances)) {
@ -658,6 +658,7 @@ class Application_Model_Scheduler
//item existed previously and is being moved. //item existed previously and is being moved.
//need to keep same id for resources if we want REST. //need to keep same id for resources if we want REST.
if (isset($file['sched_id'])) { if (isset($file['sched_id'])) {
$adjustFromDT = clone $nextStartDT;
$doUpdate = true; $doUpdate = true;
$movedItem_sql = "SELECT * FROM cc_schedule ". $movedItem_sql = "SELECT * FROM cc_schedule ".
@ -693,7 +694,6 @@ class Application_Model_Scheduler
$file["fadein"] = $sched["fade_in"]; $file["fadein"] = $sched["fade_in"];
$file["fadeout"] = $sched["fade_out"]; $file["fadeout"] = $sched["fade_out"];
} else { } else {
//$sched = new CcSchedule();
$doInsert = true; $doInsert = true;
} }
@ -780,7 +780,7 @@ class Application_Model_Scheduler
if ($adjustSched === true) { if ($adjustSched === true) {
$followingItems_sql = "SELECT * FROM cc_schedule ". $followingItems_sql = "SELECT * FROM cc_schedule ".
"WHERE starts >= '{$initalStartDT->format("Y-m-d H:i:s.u")}' ". "WHERE starts > '{$initalStartDT->format("Y-m-d H:i:s.u")}' ".
"AND instance_id = {$instanceId} "; "AND instance_id = {$instanceId} ";
if (count($excludeIds) > 0) { if (count($excludeIds) > 0) {
$followingItems_sql .= "AND id NOT IN (". implode($excludeIds, ",").") "; $followingItems_sql .= "AND id NOT IN (". implode($excludeIds, ",").") ";