summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-05 11:24:49 +0200
committerBjörn Geiger2011-08-05 11:24:49 +0200
commita1ad383ed16017118244e3fc9f1f53ef088f2a4c (patch)
tree4535ff690a9585e5af66138a25c2e858258433eb /application
parentminor (diff)
downloadpoolctrl-a1ad383ed16017118244e3fc9f1f53ef088f2a4c.tar.gz
poolctrl-a1ad383ed16017118244e3fc9f1f53ef088f2a4c.tar.xz
poolctrl-a1ad383ed16017118244e3fc9f1f53ef088f2a4c.zip
minor
Diffstat (limited to 'application')
-rw-r--r--application/Functions.php2
-rw-r--r--application/controllers/PersonController.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/application/Functions.php b/application/Functions.php
index 020f9dd..ad2b147 100644
--- a/application/Functions.php
+++ b/application/Functions.php
@@ -53,7 +53,7 @@ function PostToHost($host, $path, $referer, $userAgent, $dataToSend) {
@ fputs($fp, $dataToSend);
$res = "";
while(!@ feof($fp)) {
- $res .= fgets($fp, 128);
+ $res .= utf8_encode(fgets($fp, 128));
}
@ fclose($fp);
diff --git a/application/controllers/PersonController.php b/application/controllers/PersonController.php
index 91ced77..9553f76 100644
--- a/application/controllers/PersonController.php
+++ b/application/controllers/PersonController.php
@@ -58,7 +58,8 @@ class PersonController extends Zend_Controller_Action
if(isset($this->memberships)) {
foreach($this->memberships as $membership) {
- $groupApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getgroup'] . $membership['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $grouprequest = "groupid" . $membership['groupID'];
+ $groupApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getgroup'] . $membership['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $grouprequest);
$groupXMLString = $groupApiResult['http-body'];
if(strlen($groupXMLString) > 0) {
$groupXML = new SimpleXMLElement($groupXMLString);
@@ -66,6 +67,8 @@ class PersonController extends Zend_Controller_Action
$group->setID($groupXML->group->id);
$group->setTitle($groupXML->group->title);
$group->setDescription($groupXML->group->description);
+
+ print_r($group);
$this->view->apikeys[$group->getID()] = $membership['apikey'];
$this->groups[] = array (