Merge branch '2.5.x' into 2.5.x-saas
This commit is contained in:
commit
2a783f3825
32 changed files with 1200 additions and 378 deletions
|
@ -590,15 +590,14 @@ class Application_Model_Scheduler
|
|||
* to that show
|
||||
*/
|
||||
if ($linked) {
|
||||
$instance_sql = "SELECT * FROM cc_show_instances ".
|
||||
"WHERE show_id = ".$ccShow["id"];
|
||||
$instances = Application_Common_Database::prepareAndExecute(
|
||||
$instance_sql);
|
||||
$instances = CcShowInstancesQuery::create()
|
||||
->filterByDbShowId($ccShow["id"])
|
||||
->filterByDbStarts(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN)
|
||||
->find();
|
||||
} else {
|
||||
$instance_sql = "SELECT * FROM cc_show_instances ".
|
||||
"WHERE id = ".$schedule["instance"];
|
||||
$instances = Application_Common_Database::prepareAndExecute(
|
||||
$instance_sql);
|
||||
$instances = CcShowInstancesQuery::create()
|
||||
->filterByDbId($schedule["instance"])
|
||||
->find();
|
||||
}
|
||||
|
||||
$excludePositions = array();
|
||||
|
@ -606,7 +605,8 @@ class Application_Model_Scheduler
|
|||
//reset
|
||||
$this->applyCrossfades = true;
|
||||
|
||||
$instanceId = $instance["id"];
|
||||
//$instanceId = $instance["id"];
|
||||
$instanceId = $instance->getDbId();
|
||||
if ($id !== 0) {
|
||||
/* We use the selected cursor's position to find the same
|
||||
* positions in every other linked instance
|
||||
|
@ -632,7 +632,7 @@ class Application_Model_Scheduler
|
|||
//show instance has no scheduled tracks
|
||||
if (empty($pos)) {
|
||||
$pos = 0;
|
||||
$nextStartDT = new DateTime($instance["starts"], new DateTimeZone("UTC"));
|
||||
$nextStartDT = new DateTime($instance->getDbStarts(), new DateTimeZone("UTC"));
|
||||
} else {
|
||||
|
||||
$linkedItem_sql = "SELECT ends FROM cc_schedule ".
|
||||
|
@ -658,7 +658,7 @@ class Application_Model_Scheduler
|
|||
}
|
||||
//selected empty row to add after
|
||||
else {
|
||||
$showStartDT = new DateTime($instance["starts"], new DateTimeZone("UTC"));
|
||||
$showStartDT = new DateTime($instance->getDbStarts(), new DateTimeZone("UTC"));
|
||||
$nextStartDT = $this->findNextStartTime($showStartDT, $instanceId);
|
||||
|
||||
//first item in show so start position counter at 0
|
||||
|
@ -706,6 +706,9 @@ class Application_Model_Scheduler
|
|||
$doUpdate = false;
|
||||
$values = array();
|
||||
|
||||
//array that stores the cc_file ids so we can update the is_scheduled flag
|
||||
$fileIds = array();
|
||||
|
||||
foreach ($filesToInsert as &$file) {
|
||||
//item existed previously and is being moved.
|
||||
//need to keep same id for resources if we want REST.
|
||||
|
@ -761,9 +764,6 @@ class Application_Model_Scheduler
|
|||
$file['fadein'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadein']);
|
||||
$file['fadeout'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadeout']);
|
||||
|
||||
//array that stores the cc_file ids so we can update the is_scheduled flag
|
||||
$fileIds = array();
|
||||
|
||||
switch ($file["type"]) {
|
||||
case 0:
|
||||
$fileId = $file["id"];
|
||||
|
|
|
@ -47,6 +47,9 @@ class CcShow extends BaseCcShow {
|
|||
*/
|
||||
public function getFirstCcShowDay($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
/*CcShowPeer::clearInstancePool();
|
||||
CcShowPeer::clearRelatedInstancePool();*/
|
||||
|
||||
if(null === $this->collCcShowDayss || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcShowDayss) {
|
||||
// return empty collection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue