diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 5a18d7b79..1f2e98810 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -1128,7 +1128,6 @@ SQL; } } else { if ($isAdminOrPM) { - Logging::info( $data ); Application_Model_Show::create($data); } diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php index e1e2382aa..90a67a1d6 100644 --- a/airtime_mvc/application/models/ShowBuilder.php +++ b/airtime_mvc/application/models/ShowBuilder.php @@ -198,7 +198,9 @@ class Application_Model_ShowBuilder } elseif (intval($p_item["si_record"]) === 1) { $row["record"] = true; - if (Application_Model_Preference::GetUploadToSoundcloudOption()) { + // at the time of creating on show, the recorded file is not in the DB yet. + // therefore, 'si_file_id' is null. So we need to check it. + if (Application_Model_Preference::GetUploadToSoundcloudOption() && isset($p_item['si_file_id'])) { $file = Application_Model_StoredFile::Recall( $p_item['si_file_id']); if (isset($file)) { @@ -398,7 +400,7 @@ class Application_Model_ShowBuilder //see if the displayed show instances have changed. (deleted, //empty schedule etc) - if ($outdated === false && count($instances) + if ($outdated === false && count($instances) !== count($currentInstances)) { Logging::debug("show instances have changed."); $outdated = true; @@ -459,7 +461,7 @@ class Application_Model_ShowBuilder $display_items[] = $row; } - if ($current_id !== -1 && + if ($current_id !== -1 && !in_array($current_id, $this->showInstances)) { $this->showInstances[] = $current_id; }