From 0ac4cd4d2a7af3eb900c646de7beb71af92310a0 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 24 Oct 2011 17:01:20 +0200 Subject: some changes --- application/controllers/EventController.php | 520 +++++++++++++++------------- 1 file changed, 288 insertions(+), 232 deletions(-) (limited to 'application/controllers') diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php index d796d81..b1c3ea5 100755 --- a/application/controllers/EventController.php +++ b/application/controllers/EventController.php @@ -668,7 +668,7 @@ class EventController extends Zend_Controller_Action $eventID = $this->getRequest()->getParam('eventID'); $date = intval(strtotime(substr($this->getRequest()->getParam('date'), 0, 24))); $poolID = $this->getRequest()->getParam('poolID'); - + $events['withrepeat'] = $this->eventMapper->getDraggingEvents($eventID); $events['withoutrepeat'] = $this->eventMapper->getDraggingEvent($eventID); @@ -685,26 +685,26 @@ class EventController extends Zend_Controller_Action // Check for overlap with repeat $overlapswithrepeat = array(); $cfeventswithrepeat = array(); - + foreach($events['withrepeat'] as $e) { $enewstart = strtotime($e['start']) + $diff; $enewend = strtotime($e['end']) + $diff; $cfv = true; - + // overlap events foreach($allEvents as $o) { if($e['running'] == 0) { if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $e['eventID'] || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $e['eventID']) { - $overlapswithrepeat[] = $o; - $cfv = false; + $overlapswithrepeat[] = $o; + $cfv = false; } } else { if($e['start'] <= strtotime($o['start']) && $e['end'] >= strtotime($o['start']) && $o['eventID'] != $e['eventID'] || $e['start'] >= strtotime($o['start']) && $e['start'] <= strtotime($o['end']) && $o['eventID'] != $e['eventID']) { - $overlapswithrepeat[] = $o; - $cfv = false; + $overlapswithrepeat[] = $o; + $cfv = false; } } } @@ -713,30 +713,30 @@ class EventController extends Zend_Controller_Action $cfeventswithrepeat[] = $e; } } - + // Check for overlap without repeat - $overlapswithoutrepeat = array(); - $cfeventswithoutrepeat = array(); - $cfv = true; - - foreach($events['withoutrepeat'] as $e) { - - $enewstart = strtotime($e['start']) + $diff; - $enewend = strtotime($e['end']) + $diff; - - // overlap events - foreach($allEvents as $o) { - if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $eventID - || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $eventID) { - $overlapswithoutrepeat[] = $o; - $cfv = false; - } - } - // conflict free events without repeat - if($cfv) { - $cfeventswithoutrepeat[] = $e; - } - } + $overlapswithoutrepeat = array(); + $cfeventswithoutrepeat = array(); + $cfv = true; + + foreach($events['withoutrepeat'] as $e) { + + $enewstart = strtotime($e['start']) + $diff; + $enewend = strtotime($e['end']) + $diff; + + // overlap events + foreach($allEvents as $o) { + if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $eventID + || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $eventID) { + $overlapswithoutrepeat[] = $o; + $cfv = false; + } + } + // conflict free events without repeat + if($cfv) { + $cfeventswithoutrepeat[] = $e; + } + } $this->view->events = $events; $this->view->others = $others; @@ -744,113 +744,113 @@ class EventController extends Zend_Controller_Action $this->view->cfeventswithrepeat = $cfeventswithrepeat; $this->view->overlapswithoutrepeat = $overlapswithoutrepeat; $this->view->cfeventswithoutrepeat = $cfeventswithoutrepeat; - + } - + public function checkoverlapselectAction() { - if(!$this->acl->checkRight('eo')) { - $this->_redirect('/'); - } - $this->_helper->layout->disableLayout(); - - $poolID = $this->getRequest()->getParam('poolID'); - $startDate = intval(strtotime(substr($this->getRequest()->getParam('startDate'), 0, 24))); - $endDate = intval(strtotime(substr($this->getRequest()->getParam('endDate'), 0, 24))); - - $allEvents = $this->eventMapper->fetchAllasArray($poolID); - - $overlaps = array(); - foreach($allEvents as $e) { - if($startDate <= strtotime($e['start']) && $endDate >= strtotime($e['start']) - || $startDate >= strtotime($e['start']) && $startDate <= strtotime($e['end'])) - $overlaps[] = $e; - } - - $this->view->overlaps = $overlaps; - } - - public function checkoverlapresizeAction() { - if(!$this->acl->checkRight('eo')) { - $this->_redirect('/'); - } - $this->_helper->layout->disableLayout(); - - $poolID = $this->getRequest()->getParam('poolID'); - - $eventID = $this->getRequest()->getParam('eventID'); - $minuteDelta = intval($this->getRequest()->getParam('minuteDelta')*60); - $dayDelta = intval($this->getRequest()->getParam('dayDelta')*24*60*60); - $diffDelta = intval($minuteDelta + $dayDelta); - - $events['withrepeat'] = $this->eventMapper->getDraggingEvents($eventID); - $events['withoutrepeat'] = $this->eventMapper->getDraggingEvent($eventID); - - $others = $this->eventMapper->getNotDraggingEvents($eventID); - $allEvents = $this->eventMapper->fetchAllasArray($poolID); - - // Check for overlap with repeat - $overlapswithrepeat = array(); - $cfeventswithrepeat = array(); - - foreach($events['withrepeat'] as $e) { - - $enewstart = strtotime($e['start']); - $enewend = strtotime($e['end']) + $diffDelta; - $cfv = true; - // overlap events - foreach($allEvents as $o) { - if($e['running'] == 0) { - if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $e['eventID'] - || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $e['eventID']) { - $overlapswithrepeat[] = $o; - $cfv = false; - } - } else { - if($e['start'] <= strtotime($o['start']) && $e['end'] >= strtotime($o['start']) && $o['eventID'] != $e['eventID'] - || $e['start'] >= strtotime($o['start']) && $e['start'] <= strtotime($o['end']) && $o['eventID'] != $e['eventID']) { - $overlapswithrepeat[] = $o; - $cfv = false; - } - } + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } + $this->_helper->layout->disableLayout(); + + $poolID = $this->getRequest()->getParam('poolID'); + $startDate = intval(strtotime(substr($this->getRequest()->getParam('startDate'), 0, 24))); + $endDate = intval(strtotime(substr($this->getRequest()->getParam('endDate'), 0, 24))); + + $allEvents = $this->eventMapper->fetchAllasArray($poolID); + + $overlaps = array(); + foreach($allEvents as $e) { + if($startDate <= strtotime($e['start']) && $endDate >= strtotime($e['start']) + || $startDate >= strtotime($e['start']) && $startDate <= strtotime($e['end'])) + $overlaps[] = $e; + } + + $this->view->overlaps = $overlaps; + } + + public function checkoverlapresizeAction() { + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } + $this->_helper->layout->disableLayout(); + + $poolID = $this->getRequest()->getParam('poolID'); + + $eventID = $this->getRequest()->getParam('eventID'); + $minuteDelta = intval($this->getRequest()->getParam('minuteDelta')*60); + $dayDelta = intval($this->getRequest()->getParam('dayDelta')*24*60*60); + $diffDelta = intval($minuteDelta + $dayDelta); + + $events['withrepeat'] = $this->eventMapper->getDraggingEvents($eventID); + $events['withoutrepeat'] = $this->eventMapper->getDraggingEvent($eventID); + + $others = $this->eventMapper->getNotDraggingEvents($eventID); + $allEvents = $this->eventMapper->fetchAllasArray($poolID); + + // Check for overlap with repeat + $overlapswithrepeat = array(); + $cfeventswithrepeat = array(); + + foreach($events['withrepeat'] as $e) { + + $enewstart = strtotime($e['start']); + $enewend = strtotime($e['end']) + $diffDelta; + $cfv = true; + // overlap events + foreach($allEvents as $o) { + if($e['running'] == 0) { + if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $e['eventID'] + || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $e['eventID']) { + $overlapswithrepeat[] = $o; + $cfv = false; + } + } else { + if($e['start'] <= strtotime($o['start']) && $e['end'] >= strtotime($o['start']) && $o['eventID'] != $e['eventID'] + || $e['start'] >= strtotime($o['start']) && $e['start'] <= strtotime($o['end']) && $o['eventID'] != $e['eventID']) { + $overlapswithrepeat[] = $o; + $cfv = false; + } + } + } + // conflict free events with repeat + if($cfv) { + $cfeventswithrepeat[] = $e; + } + } + + // Check for overlap without repeat + $overlapswithoutrepeat = array(); + $cfeventswithoutrepeat = array(); + + foreach($events['withoutrepeat'] as $e) { + + $enewstart = strtotime($e['start']); + $enewend = strtotime($e['end']) + $diffDelta; + $cfv = true; + + // overlap events + foreach($allEvents as $o) { + if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $eventID + || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $eventID) { + $overlapswithoutrepeat[] = $o; + $cfv = false; + } + } + // conflict free events without repeat + if($cfv) { + $cfeventswithoutrepeat[] = $e; + } + } + + $this->view->events = $events; + $this->view->others = $others; + $this->view->overlapswithrepeat = $overlapswithrepeat; + $this->view->cfeventswithrepeat = $cfeventswithrepeat; + $this->view->overlapswithoutrepeat = $overlapswithoutrepeat; + $this->view->cfeventswithoutrepeat = $cfeventswithoutrepeat; + } - // conflict free events with repeat - if($cfv) { - $cfeventswithrepeat[] = $e; - } - } - - // Check for overlap without repeat - $overlapswithoutrepeat = array(); - $cfeventswithoutrepeat = array(); - - foreach($events['withoutrepeat'] as $e) { - - $enewstart = strtotime($e['start']); - $enewend = strtotime($e['end']) + $diffDelta; - $cfv = true; - - // overlap events - foreach($allEvents as $o) { - if($enewstart <= strtotime($o['start']) && $enewend >= strtotime($o['start']) && $o['eventID'] != $eventID - || $enewstart >= strtotime($o['start']) && $enewstart <= strtotime($o['end']) && $o['eventID'] != $eventID) { - $overlapswithoutrepeat[] = $o; - $cfv = false; - } - } - // conflict free events without repeat - if($cfv) { - $cfeventswithoutrepeat[] = $e; - } - } - - $this->view->events = $events; - $this->view->others = $others; - $this->view->overlapswithrepeat = $overlapswithrepeat; - $this->view->cfeventswithrepeat = $cfeventswithrepeat; - $this->view->overlapswithoutrepeat = $overlapswithoutrepeat; - $this->view->cfeventswithoutrepeat = $cfeventswithoutrepeat; - - } public function eventmoveAction() { if(!$this->acl->checkRight('eo')) { @@ -968,6 +968,92 @@ class EventController extends Zend_Controller_Action try { foreach($events as $event) { if($event->getRunning() == 0) { + //1min = 60sec, 1d = 86400sec + $oldStartTime = date('H:i', strtotime($event->getStart())); + $oldStartDate = date('d.m.Y', strtotime($event->getStart())); + $evstartTime = intval(strtotime($event->getStart())) + intval($evmindelta*60) + intval($evdaydelta*86400); + $newStartTime = date('H:i', $evstartTime); + $newStartDate = date('d.m.Y', $evstartTime); + $eventStart = date('Y-m-d H:i:s', $evstartTime); + $event->setStart($eventStart); + if($event->getEnd()) { + $oldEndTime = date('H:i', strtotime($event->getEnd())); + $oldEndDate = date('d.m.Y', strtotime($event->getEnd())); + $evendTime = intval(strtotime($event->getEnd())) + intval($evmindelta*60) + intval($evdaydelta*86400); + $newEndTime = date('H:i', $evendTime); + $newEndDate = date('d.m.Y', $evendTime); + $eventEnd = date('Y-m-d H:i:s', $evendTime); + $event->setEnd($eventEnd); + } + $event->setPbs_poolID($poolID); + $result = $this->eventcategoryMapper->findBy(array('title' => 'Shutdown')); + $shutdownCategory = $result[0]; + if($event->getCategory() != $shutdownCategory->getID()) { + if($event->getPbs_filterID()) { + if($event->getRepeat()) { + $repeattypeMapper = new Application_Model_RepeattypeMapper(); + $repeattype = new Application_Model_Repeattype(); + $repeattypeMapper->find($event->getRepeattype(), $repeattype); + if($repeattype == "Once a week") { + $oldStartDate = date("N", strototime($oldStartDate)); + $oldEndDate = ''; + $newStartDate = date("N", strototime($newStartDate)); + $newEndDate = ''; + } + } + $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . strtotime($oldStartDate) . "&oldvalue2=" . strtotime($oldEndDate) . "&value1=" . strtotime($newStartDate) . "&value2=" . strtotime($newEndDate); + $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); + unset($filterApiResult); + $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . $oldStartTime . "&oldvalue2=" . $oldEndTime . "&value1=" . $newStartTime . "&value2=" . $newEndTime; + $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); + unset($filterApiResult); + } + } + $this->eventMapper->save($event); //save the event with the new data + } + } + } catch (Zend_Exception $e) { + echo "Caught exception: " . get_class($e) . "
"; + echo "Message: " . $e->getMessage() . "
"; + return; + } + $this->_redirect('/event/'); + } else { + $this->_redirect('/event/'); + return; + } + } + + public function eventmovecfAction() { + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $cfevents = $this->getRequest()->getParam('cfevents'); + $evmindelta = $this->getRequest()->getParam('evmindelta'); + $evdaydelta = $this->getRequest()->getParam('evdaydelta'); + $poolID = $this->getRequest()->getParam('poolID'); + + $events = null; + + if($cfevents!=null) { + foreach($cfevents as $e) { + $event = new Application_Model_Event($e); + $events[] = $event; + } + } + + if ($events!=null) { + + /*if ($events[0]->getPbs_membershipID() != $this->userIDsNamespace['membershipID']) { + if (!$this->acl->checkRight('edo')) { + $this->_redirect('/'); + } + }*/ + try { + foreach($events as $event) { //1min = 60sec, 1d = 86400sec $oldStartTime = date('H:i', strtotime($event->getStart())); $oldStartDate = date('d.m.Y', strtotime($event->getStart())); @@ -1011,7 +1097,6 @@ class EventController extends Zend_Controller_Action } $this->eventMapper->save($event); //save the event with the new data } - } } catch (Zend_Exception $e) { echo "Caught exception: " . get_class($e) . "
"; echo "Message: " . $e->getMessage() . "
"; @@ -1023,91 +1108,6 @@ class EventController extends Zend_Controller_Action return; } } - - public function eventmovecfAction() { - if(!$this->acl->checkRight('eo')) { - $this->_redirect('/'); - } - $this->_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setNoRender(); - - $cfevents = $this->getRequest()->getParam('cfevents'); - $evmindelta = $this->getRequest()->getParam('evmindelta'); - $evdaydelta = $this->getRequest()->getParam('evdaydelta'); - $poolID = $this->getRequest()->getParam('poolID'); - - $eventsArray = (array) $cfevents; - - //$event = new Application_Model_Event($cfevents); - - var_dump($eventsArray); - - //print_r($cfevents['eventID']); - - /*if ($cfevents!=null) { - - $events = $this->eventMapper->findBy(array("eventID" => $cfevents['eventID'])); - if ($events[0]->getPbs_membershipID() != $this->userIDsNamespace['membershipID']) { - if (!$this->acl->checkRight('edo')) { - $this->_redirect('/'); - } - } - try { - foreach($events as $event) { - //1min = 60sec, 1d = 86400sec - $oldStartTime = date('H:i', strtotime($event->getStart())); - $oldStartDate = date('d.m.Y', strtotime($event->getStart())); - $evstartTime = intval(strtotime($event->getStart())) + intval($evmindelta*60) + intval($evdaydelta*86400); - $newStartTime = date('H:i', $evstartTime); - $newStartDate = date('d.m.Y', $evstartTime); - $eventStart = date('Y-m-d H:i:s', $evstartTime); - $event->setStart($eventStart); - if($event->getEnd()) { - $oldEndTime = date('H:i', strtotime($event->getEnd())); - $oldEndDate = date('d.m.Y', strtotime($event->getEnd())); - $evendTime = intval(strtotime($event->getEnd())) + intval($evmindelta*60) + intval($evdaydelta*86400); - $newEndTime = date('H:i', $evendTime); - $newEndDate = date('d.m.Y', $evendTime); - $eventEnd = date('Y-m-d H:i:s', $evendTime); - $event->setEnd($eventEnd); - } - $event->setPbs_poolID($poolID); - $result = $this->eventcategoryMapper->findBy(array('title' => 'Shutdown')); - $shutdownCategory = $result[0]; - if($event->getCategory() != $shutdownCategory->getID()) { - if($event->getPbs_filterID()) { - if($event->getRepeat()) { - $repeattypeMapper = new Application_Model_RepeattypeMapper(); - $repeattype = new Application_Model_Repeattype(); - $repeattypeMapper->find($event->getRepeattype(), $repeattype); - if($repeattype == "Once a week") { - $oldStartDate = date("N", strototime($oldStartDate)); - $oldEndDate = ''; - $newStartDate = date("N", strototime($newStartDate)); - $newEndDate = ''; - } - } - $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . strtotime($oldStartDate) . "&oldvalue2=" . strtotime($oldEndDate) . "&value1=" . strtotime($newStartDate) . "&value2=" . strtotime($newEndDate); - $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); - unset($filterApiResult); - $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . $oldStartTime . "&oldvalue2=" . $oldEndTime . "&value1=" . $newStartTime . "&value2=" . $newEndTime; - $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); - unset($filterApiResult); - } - } - $this->eventMapper->save($event); //save the event with the new data - } - } catch (Zend_Exception $e) { - echo "Caught exception: " . get_class($e) . "
"; - echo "Message: " . $e->getMessage() . "
"; - return; - } - $this->_redirect('/event/'); - } else { - $this->_redirect('/event/'); - return; - }*/ - } public function eventresizeAction() { if(!$this->acl->checkRight('eo')) { @@ -1208,20 +1208,20 @@ class EventController extends Zend_Controller_Action try { foreach($events as $event) { if($event->getRunning() == 0) { - $eventEnd = date('Y-m-d H:i:s', intval(strtotime($event->getEnd())) + intval($evmindelta*60)); - $event->setEnd($eventEnd); - $event->setPbs_poolID($poolID); - $result = $this->eventcategoryMapper->findBy(array('title' => 'Shutdown')); - $shutdownCategory = $result[0]; - if($event->getCategory() != $shutdownCategory->getID()) { - if($event->getPbs_filterID()) { - $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . $oldStartTime . "&oldvalue2=" . $oldEndTime . "&value1=" . $newStartTime . "&value2=" . $newEndTime; - $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); - unset($filterApiResult); + $eventEnd = date('Y-m-d H:i:s', intval(strtotime($event->getEnd())) + intval($evmindelta*60)); + $event->setEnd($eventEnd); + $event->setPbs_poolID($poolID); + $result = $this->eventcategoryMapper->findBy(array('title' => 'Shutdown')); + $shutdownCategory = $result[0]; + if($event->getCategory() != $shutdownCategory->getID()) { + if($event->getPbs_filterID()) { + $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . $oldStartTime . "&oldvalue2=" . $oldEndTime . "&value1=" . $newStartTime . "&value2=" . $newEndTime; + $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); + unset($filterApiResult); + } } + $this->eventMapper->save($event); //save the event with the new data } - $this->eventMapper->save($event); //save the event with the new data - } } } catch (Zend_Exception $e) { echo "Caught exception: " . get_class($e) . "
"; @@ -1235,6 +1235,62 @@ class EventController extends Zend_Controller_Action } } + public function eventresizecfAction() { + if(!$this->acl->checkRight('eo')) { + $this->_redirect('/'); + } + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $cfevents = $this->getRequest()->getParam('cfevents'); + $evmindelta = $this->getRequest()->getParam('evmindelta'); + $poolID = $this->getRequest()->getParam('poolID'); + + $events = null; + + if($cfevents!=null) { + foreach($cfevents as $e) { + $event = new Application_Model_Event($e); + $events[] = $event; + } + } + + if ($events!=null) { + + /*if ($events[0]->getPbs_membershipID() != $this->userIDsNamespace['membershipID']) { + if (!$this->acl->checkRight('edo')) { + $this->_redirect('/'); + } + }*/ + try { + foreach($events as $event) { + if($event->getRunning() == 0) { + $eventEnd = date('Y-m-d H:i:s', intval(strtotime($event->getEnd())) + intval($evmindelta*60)); + $event->setEnd($eventEnd); + $event->setPbs_poolID($poolID); + $result = $this->eventcategoryMapper->findBy(array('title' => 'Shutdown')); + $shutdownCategory = $result[0]; + if($event->getCategory() != $shutdownCategory->getID()) { + if($event->getPbs_filterID()) { + $filterentriesQuerie = "filterid=" . $event->getPbs_filterID() . "&oldvalue1=" . $oldStartTime . "&oldvalue2=" . $oldEndTime . "&value1=" . $newStartTime . "&value2=" . $newEndTime; + $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['changefilterentry'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $filterentriesQuerie); + unset($filterApiResult); + } + } + $this->eventMapper->save($event); //save the event with the new data + } + } + } catch (Zend_Exception $e) { + echo "Caught exception: " . get_class($e) . "
"; + echo "Message: " . $e->getMessage() . "
"; + return; + } + $this->_redirect('/event/'); + } else { + $this->_redirect('/event/'); + return; + } + } public function eventlistAction() { if(!$this->acl->checkRight('eo')) { -- cgit v1.2.3-55-g7522