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

This commit is contained in:
Albert Santoni 2013-12-12 13:32:25 -05:00
commit 27f0fa27e9
2 changed files with 21 additions and 10 deletions

View file

@ -1005,7 +1005,7 @@ SQL;
->filterByDbId($instanceId) ->filterByDbId($instanceId)
->findOne(); ->findOne();
} }
if ($update && (!$ccShowInstance || $ccShowInstance->getDbModifiedInstance() == true)) { if ($update && ($ccShowInstance && $ccShowInstance->getDbModifiedInstance() == true)) {
return false; return false;
} }

View file

@ -82,14 +82,25 @@ class Application_Service_CalendarService
// Show content can be modified from the calendar if: // Show content can be modified from the calendar if:
// the user is admin or hosting the show, // the user is admin or hosting the show,
// the show is not recorded // the show is not recorded
$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) {
if ($now < $end && ($isAdminOrPM || $isHostOfShow) && $menu["schedule"] = array(
!$this->ccShowInstance->isRecorded() ) { "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( $menu["schedule"] = array(
"name"=> _("Add / Remove Content"), "name"=> _("Add / Remove Content"),
"icon" => "add-remove-content", "icon" => "add-remove-content",
"url" => $baseUrl."showbuilder/builder-dialog/"); "url" => $baseUrl."showbuilder/builder-dialog/");
}
} }