summaryrefslogtreecommitdiffstats
path: root/application/controllers/EventController.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-23 13:41:23 +0200
committerBjörn Geiger2011-08-23 13:41:23 +0200
commitfdae5c5fd7eb7400fb16bec2c102b9cc3435a9a0 (patch)
tree7635cad96f09260db8904d66a06483ca84fb3d31 /application/controllers/EventController.php
parentFehler korrigiert (diff)
downloadpoolctrl-fdae5c5fd7eb7400fb16bec2c102b9cc3435a9a0.tar.gz
poolctrl-fdae5c5fd7eb7400fb16bec2c102b9cc3435a9a0.tar.xz
poolctrl-fdae5c5fd7eb7400fb16bec2c102b9cc3435a9a0.zip
minor
Diffstat (limited to 'application/controllers/EventController.php')
-rw-r--r--application/controllers/EventController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index fc09cd8..2919f1a 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -737,13 +737,13 @@ class EventController extends Zend_Controller_Action
$dataString = json_encode($data);
$bootResult = $this->gearmanClient->do("status", $dataString, 'bootStatus');
- $results['bootResult'] = $bootResult;
if (! $this->gearmanClient->runTasks())
{
echo "ERROR " . $gmc->error() . "\n";
exit;
}
$bootResultDecode = json_decode($bootResult);
+ $results['bootResult'] = $bootResultDecode;
foreach($bootResultDecode as $k => $eventResult) {
$eventResult->result = sprintf('%s', $eventResult->result);
if($eventResult->result == "not finished" || $eventResult->result = 'not founded') {
@@ -787,13 +787,13 @@ class EventController extends Zend_Controller_Action
$dataString = json_encode($data);
$shutdownResult = $this->gearmanClient->do("status", $dataString, 'shutdownStatus');
- $results['shutdownResult'] = $shutdownResult;
if (! $this->gearmanClient->runTasks())
{
echo "ERROR " . $gmc->error() . "\n";
exit;
}
$shutdownResultDecode = json_decode($shutdownResult);
+ $results['shutdownResult'] = $shutdownResultDecode;
foreach($shutdownResultDecode as $k => $eventResult) {
$eventResult->result = sprintf('%s', $eventResult->result);
if($eventResult->result == "not finished" || $eventResult->result = 'not founded') {
@@ -828,7 +828,7 @@ class EventController extends Zend_Controller_Action
}
}
}
- if(count($results) >= 0) {
+ if(count($results) <= 0) {
$results = array("No current events available");
}
$resultString = json_encode($results);