Merge branch '2.5.x' of github.com:sourcefabric/Airtime into 2.5.x

This commit is contained in:
Naomi 2013-12-12 17:18:17 -05:00
commit bbccc2e7d3
6 changed files with 75 additions and 29 deletions

View file

@ -82,15 +82,26 @@ class Application_Service_CalendarService
// Show content can be modified from the calendar if:
// the user is admin or hosting the show,
// the show is not recorded
if ($now < $end && ($isAdminOrPM || $isHostOfShow) &&
!$this->ccShowInstance->isRecorded() ) {
$menu["schedule"] = array(
"name"=> _("Add / Remove Content"),
"icon" => "add-remove-content",
"url" => $baseUrl."showbuilder/builder-dialog/");
$currentShow = Application_Model_Show::getCurrentShow();
$currentShowId = count($currentShow) == 1 ? $currentShow[0]["id"] : null;
$showIsLinked = $this->ccShow->isLinked();
if ($now < $end && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded()) {
//if the show is not linked the user can add/remove content
if (!$showIsLinked) {
$menu["schedule"] = array(
"name"=> _("Add / Remove Content"),
"icon" => "add-remove-content",
"url" => $baseUrl."showbuilder/builder-dialog/");
//if the show is linked and it's not currently playing the user can add/remove content
} elseif ($showIsLinked && $currentShowId != $this->ccShow->getDbId()) {
$menu["schedule"] = array(
"name"=> _("Add / Remove Content"),
"icon" => "add-remove-content",
"url" => $baseUrl."showbuilder/builder-dialog/");
}
}
if ($now < $start && ($isAdminOrPM || $isHostOfShow) &&

View file

@ -41,7 +41,7 @@ class Application_Service_ShowService
$this->isUpdate = $isUpdate;
}
public function createShowFromRepeatingInstance($showData) {
public function editRepeatingShowInstance($showData) {
$service_user = new Application_Service_UserService();
$currentUser = $service_user->getCurrentUser();
@ -108,9 +108,6 @@ class Application_Service_ShowService
*/
$this->setCcShowDays($showData);
// DO WE NEED THIS?
$this->setCcShowHosts($showData);
/*
* We need to find the new show day rule we just created by passing
* in the first show and start time in case multiple single
@ -196,8 +193,8 @@ class Application_Service_ShowService
$this->deleteRebroadcastInstances();
//$this->deleteCcShowDays();
$this->deleteCcShowHosts();
if ($this->isRebroadcast) {
//delete entry in cc_show_rebroadcast
$this->deleteCcShowRebroadcasts();