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

This commit is contained in:
denise 2012-11-06 16:34:19 -05:00
commit f623445b0d
3 changed files with 6 additions and 5 deletions

View File

@ -513,7 +513,7 @@ class PlaylistController extends Zend_Controller_Action
} catch (BlockNotFoundException $e) {
$this->playlistNotFound('block', true);
} catch (Exception $e) {
//Logging::info($e);
Logging::info($e);
$this->playlistUnknownError($e);
}
}

View File

@ -1191,7 +1191,7 @@ SQL;
$sizeOfInsert = count($insertList);
// if block is not full and reapeat_track is check, fill up more
while (!$isBlockFull && $repeat == 1) {
while (!$isBlockFull && $repeat == 1 && $sizeOfInsert > 0) {
$randomEleKey = array_rand(array_slice($insertList, 0, $sizeOfInsert));
$insertList[] = $insertList[$randomEleKey];
$totalTime += $insertList[$randomEleKey]['length'];

View File

@ -193,7 +193,8 @@ class Application_Model_Scheduler
}
} else {
$dynamicFiles = $bl->getListOfFilesUnderLimit();
foreach ($dynamicFiles as $fileId=>$f) {
foreach ($dynamicFiles as $f) {
$fileId = $f['id'];
$file = CcFilesQuery::create()->findPk($fileId);
if (isset($file) && $file->getDbFileExists()) {
$data["id"] = $file->getDbId();
@ -250,7 +251,8 @@ class Application_Model_Scheduler
}
} else {
$dynamicFiles = $bl->getListOfFilesUnderLimit();
foreach ($dynamicFiles as $fileId=>$f) {
foreach ($dynamicFiles as $f) {
$fileId = $f['id'];
$file = CcFilesQuery::create()->findPk($fileId);
if (isset($file) && $file->getDbFileExists()) {
$data["id"] = $file->getDbId();
@ -445,7 +447,6 @@ class Application_Model_Scheduler
} else {
$sched = new CcSchedule();
}
Logging::info($file);
$sched->setDbStarts($nextStartDT)
->setDbEnds($endTimeDT)
->setDbCueIn($file['cuein'])