From fdae5c5fd7eb7400fb16bec2c102b9cc3435a9a0 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Tue, 23 Aug 2011 13:41:23 +0200 Subject: minor --- application/controllers/EventController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'application/controllers/EventController.php') 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); -- cgit v1.2.3-55-g7522