summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-25 10:11:26 +0200
committerSebastian Wagner2011-10-25 10:11:26 +0200
commitc6f4a06eeafc862a4e4bad5df80f5b339066edde (patch)
treef458edbab5d67864eef23bcb736b1b8b9f602acd
parentevent move to the past - check (diff)
downloadpoolctrl-c6f4a06eeafc862a4e4bad5df80f5b339066edde.tar.gz
poolctrl-c6f4a06eeafc862a4e4bad5df80f5b339066edde.tar.xz
poolctrl-c6f4a06eeafc862a4e4bad5df80f5b339066edde.zip
bugfix
-rwxr-xr-xapplication/controllers/EventController.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index f6fe538..cf1eec4 100755
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -971,7 +971,7 @@ class EventController extends Zend_Controller_Action
// event move to the past - check
foreach($events as $event) {
$evstartTime = intval(strtotime($event->getStart())) + intval($evmindelta*60) + intval($evdaydelta*86400);
- if($evstartTime < time())
+ if($event->getRunning() == 0 && $evstartTime < time())
$this->_redirect('/event/');
}
@@ -1046,9 +1046,6 @@ class EventController extends Zend_Controller_Action
$evdaydelta = $this->getRequest()->getParam('evdaydelta');
$poolID = $this->getRequest()->getParam('poolID');
- json_encode($cfevents);
- print_r($cfevents);
-
$events = null;
if($cfevents!=null) {
@@ -1058,8 +1055,6 @@ class EventController extends Zend_Controller_Action
}
}
- var_dump($events);
-
if ($events!=null) {
/*if ($events[0]->getPbs_membershipID() != $this->userIDsNamespace['membershipID']) {
@@ -1067,6 +1062,14 @@ class EventController extends Zend_Controller_Action
$this->_redirect('/');
}
}*/
+
+ // event move to the past - check
+ foreach($events as $event) {
+ $evstartTime = intval(strtotime($event->getStart())) + intval($evmindelta*60) + intval($evdaydelta*86400);
+ if($event->getRunning() == 0 && $evstartTime < time())
+ $this->_redirect('/event/');
+ }
+
try {
foreach($events as $event) {
//1min = 60sec, 1d = 86400sec