summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-08 15:44:14 +0200
committerBjörn Geiger2011-09-08 15:44:14 +0200
commit97bbd7e604455e29f5eb192f522ed9c15b454548 (patch)
tree920f90d121e45a0b9a8fbb2acbec23fcfeb7fd62
parentweiterer fehler (diff)
downloadpoolctrl-97bbd7e604455e29f5eb192f522ed9c15b454548.tar.gz
poolctrl-97bbd7e604455e29f5eb192f522ed9c15b454548.tar.xz
poolctrl-97bbd7e604455e29f5eb192f522ed9c15b454548.zip
verschiedenes
-rw-r--r--application/controllers/EventController.php11
-rw-r--r--application/forms/EventEdit.php5
2 files changed, 12 insertions, 4 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index fdea2db..5bf02a0 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -416,6 +416,9 @@ class EventController extends Zend_Controller_Action
if($this->getRequest()->getParam('end')) {
$this->getRequest()->setParam('end', date ('Y-m-d H:i', strtotime($this->getRequest()->getParam('end'))));
}
+ if($this->getRequest()->getParam('repeatEnd')) {
+ $this->getRequest()->setParam('repeatEnd', date ('Y-m-d H:i', strtotime($this->getRequest()->getParam('repeatEnd'))));
+ }
if($event->getPbs_bootmenuID()) {
$bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletebootmenu'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
unset($bootmenuApiResult);
@@ -489,9 +492,13 @@ class EventController extends Zend_Controller_Action
$this->getRequest()->setParam('title', $event->getTitle());
$this->getRequest()->setParam('immediate', $event->getImmediate());
$this->getRequest()->setParam('start', $event->getStart());
- $this->getRequest()->setParam('end', $event->getEnd());
+ if($event->getEnd()) {
+ $this->getRequest()->setParam('end', $event->getEnd());
+ }
$this->getRequest()->setParam('repeat', $event->getRepeat());
- $this->getRequest()->setParam('repeatEnd', $event->getRepeatEnd());
+ if($event->getRepeatEnd()) {
+ $this->getRequest()->setParam('repeatEnd', $event->getRepeatEnd());
+ }
$this->getRequest()->setParam('participants', $event->getParticipants());
$this->getRequest()->setParam('category', $event->getCategory());
$this->getRequest()->setParam('note', $event->getNote());
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index b49b8f9..826bcfd 100644
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -131,8 +131,9 @@ class Application_Form_EventEdit extends Zend_Form
array('Date', false, array('format' => 'mm/dd/yyyy H:i')),
array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
),
- 'required' => false,
- 'label' => 'End:',
+ 'required' => false,
+ 'label' => 'End:',
+ 'value' => 'mm/dd/yyyy H:min',
));
$this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate');
}