CC-3174 : showbuilder

disabling editing of past/current shows.
This commit is contained in:
Naomi Aro 2012-02-14 14:44:46 +01:00
parent b7b1c401f6
commit eba84ee878
1 changed files with 5 additions and 1 deletions

View File

@ -121,8 +121,12 @@ class Application_Model_ShowBuilder {
private function makeScheduledItemRow($p_item) {
$row = $this->defaultRowArray;
$epoch_now = time();
if ($this->user->canSchedule($p_item["show_id"]) == true) {
$showStartDT = new DateTime($p_item["si_starts"], new DateTimeZone("UTC"));
//can only schedule the show if it hasn't started and you are allowed.
if ($epoch_now < $showStartDT->format('U') && $this->user->canSchedule($p_item["show_id"]) == true) {
$row["checkbox"] = true;
}