From 85a936eb41a040b4e4d519a8d7d4ce814a1c77e0 Mon Sep 17 00:00:00 2001 From: naomiaro Date: Sat, 5 Feb 2011 20:11:45 -0500 Subject: [PATCH] can only resize a show if scheduled content allows. --- application/models/Shows.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/models/Shows.php b/application/models/Shows.php index 95ca1a3b5..9bd550d7d 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -474,6 +474,14 @@ class ShowInstance { return $overlap; } } + //have to check if any scheduled content still fits. + else{ + $scheduledTime = $this->getTimeScheduled(); + + if((strtotime($new_ends) - strtotime($starts)) < strtotime($scheduledTime)) { + return "Must removed some scheduled content."; + } + } $this->setShowStart($new_starts); $this->setShowEnd($new_ends);