summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-14 13:44:48 +0200
committerBjörn Geiger2011-10-14 13:44:48 +0200
commitf61fb61950fde97274d51e9e0f70abe7b9c3b625 (patch)
tree195a497fcc0fbfd739acd6ea30397a8622c267b2
parentjs korrigiert (diff)
downloadpoolctrl-f61fb61950fde97274d51e9e0f70abe7b9c3b625.tar.gz
poolctrl-f61fb61950fde97274d51e9e0f70abe7b9c3b625.tar.xz
poolctrl-f61fb61950fde97274d51e9e0f70abe7b9c3b625.zip
weitere fehler
-rwxr-xr-xapplication/controllers/EventController.php20
-rwxr-xr-xapplication/forms/EventAdd.php6
2 files changed, 15 insertions, 11 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index f2b6260..9d9a26d 100755
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -148,15 +148,15 @@ class EventController extends Zend_Controller_Action
$repeattypelist = $repeattypeMapper->fetchAll();
$add = $this->getRequest()->getParam("add");
if($this->getRequest()->getParam('start')) {
- $start = date ('m/d/Y H:i a', strtotime($this->getRequest()->getParam('start')));
+ $start = date ('m/d/Y h:i a', strtotime($this->getRequest()->getParam('start')));
} else if($this->getRequest()->getParam('evstart')) {
- $start = date ('m/d/Y H:i a', strtotime(substr($this->getRequest()->getParam('evstart'), 0, 24)));
- } else {$start = 'mm/dd/yyyy H:min';}
+ $start = date ('m/d/Y h:i a', strtotime(substr($this->getRequest()->getParam('evstart'), 0, 24)));
+ } else {$start = 'mm/dd/yyyy h:min';}
if($this->getRequest()->getParam('end')) {
- $end = date ('m/d/Y H:i a', strtotime($this->getRequest()->getParam('end')));
+ $end = date ('m/d/Y h:i a', strtotime($this->getRequest()->getParam('end')));
} else if($this->getRequest()->getParam('evend')) {
- $end = date ('m/d/Y H:i a', strtotime(substr($this->getRequest()->getParam('evend'), 0, 24)));
- } else {$end = 'mm/dd/yyyy H:min';}
+ $end = date ('m/d/Y h:i a', strtotime(substr($this->getRequest()->getParam('evend'), 0, 24)));
+ } else {$end = 'mm/dd/yyyy h:min';}
if (!isset($add)){
$defaultEventCategory = $this->config['event']['category']['default'];
foreach($eventcategorylist as $eventcategory) {
@@ -171,7 +171,11 @@ class EventController extends Zend_Controller_Action
$addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'configlist' => $configlist, 'repeatendlist' => $repeatendlist, 'repeattypelist' => $repeattypelist, 'poollist' => $poollist, 'start' => $start, 'end' => $end, 'defaultEventCategoryID' => $defaultEventCategoryID));
}
} else {
- $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'configlist' => $configlist, 'repeatendlist' => $repeatendlist, 'repeattypelist' => $repeattypelist, 'start' => $start, 'end' => $end, $this->getRequest()->getParams()));
+ if(isset($this->userIDsNamespace['poolID'])) {
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'configlist' => $configlist, 'repeatendlist' => $repeatendlist, 'repeattypelist' => $repeattypelist, 'start' => $start, 'end' => $end, 'poolID' => $this->userIDsNamespace['poolID'], $this->getRequest()->getParams()));
+ } else {
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'configlist' => $configlist, 'repeatendlist' => $repeatendlist, 'repeattypelist' => $repeattypelist, 'poollist' => $poollist, 'start' => $start, 'end' => $end, $this->getRequest()->getParams()));
+ }
$params = $this->getRequest()->getParams();
if(!isset($params['pbs_poolID'])) {
$params['pbs_poolID'] = $this->userIDsNamespace['poolID'];
@@ -1152,7 +1156,7 @@ class EventController extends Zend_Controller_Action
$clientsXML = $pool->clients;
$count = 1;
foreach($clientsXML->client as $clientNew) {
- $participants = $event->getParticipants();
+ $participants = $event->getParticipants();
if(!isset($participants) || ($participants > 0 && $event->getParticipants() >= $count)) {
$client = new Application_Model_Client();
$client->setID(sprintf("%s", $clientNew->clientID));
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index 09f96d6..5352119 100755
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -173,7 +173,7 @@ class Application_Form_EventAdd extends Zend_Form
'filters' => array('StringTrim'),
'validators' => array(
array('StringLength', false, array(0, 19)),
- array('Date', false, array('format' => 'mm/dd/yyyy H:i a')),
+ array('Date', false, array('format' => 'mm/dd/yyyy h:i a')),
),
'required' => true,
'label' => 'Start:',
@@ -184,7 +184,7 @@ class Application_Form_EventAdd extends Zend_Form
'filters' => array('StringTrim'),
'validators' => array(
array('StringLength', false, array(0, 19)),
- array('Date', false, array('format' => 'mm/dd/yyyy H:i a')),
+ array('Date', false, array('format' => 'mm/dd/yyyy h:i a')),
array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
),
'required' => false,
@@ -236,7 +236,7 @@ class Application_Form_EventAdd extends Zend_Form
),
'required' => false,
'label' => 'Repeat End Date:',
- 'value' => 'mm/dd/yyyy H:min am/pm',
+ 'value' => 'mm/dd/yyyy h:min am/pm',
));
$this->addElement('text', 'repeatings', array(