summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-14 12:59:29 +0200
committerBjörn Geiger2011-10-14 12:59:29 +0200
commit40d0aa10227d4c627cf97258a32688a5c7066e1f (patch)
tree10c568efdcf031ed5320ed748c4c65dff07c8c33 /application
parentbootosCheck korrigiert (diff)
downloadpoolctrl-40d0aa10227d4c627cf97258a32688a5c7066e1f.tar.gz
poolctrl-40d0aa10227d4c627cf97258a32688a5c7066e1f.tar.xz
poolctrl-40d0aa10227d4c627cf97258a32688a5c7066e1f.zip
Kleinen Fehler behoben
Diffstat (limited to 'application')
-rwxr-xr-xapplication/controllers/EventController.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index ff8bfee..f2b6260 100755
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -211,6 +211,9 @@ class EventController extends Zend_Controller_Action
if(!isset($params['repeatings'])) {
unset($params['repeatings']);
}
+ if($params['participants'] <= 0) {
+ unset($params['participants']);
+ }
}
$event = new Application_Model_Event($params);
$event->setPbs_membershipID($this->userIDsNamespace['membershipID']);
@@ -1142,13 +1145,15 @@ class EventController extends Zend_Controller_Action
$this->config['pbs2']['getpools'];
$poolApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getpools'] . $apikey, 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $poolRequest);
$poolXMLString = $poolApiResult['http-body'];
+ $clients = array();
if(strlen($poolXMLString) > 0) {
$poolXML = new SimpleXMLElement($poolXMLString);
foreach($poolXML->poollist->pool as $pool) {
$clientsXML = $pool->clients;
$count = 1;
foreach($clientsXML->client as $clientNew) {
- if($event->getParticipants() > 0 && $event->getParticipants() > $count) {
+ $participants = $event->getParticipants();
+ if(!isset($participants) || ($participants > 0 && $event->getParticipants() >= $count)) {
$client = new Application_Model_Client();
$client->setID(sprintf("%s", $clientNew->clientID));
$client->setCreated(sprintf("%s", $clientNew->created));
@@ -2430,4 +2435,4 @@ class EventController extends Zend_Controller_Action
}
}
}
-} \ No newline at end of file
+}