From 41be8260b43487e6efad2cb523a27a0adeed142a Mon Sep 17 00:00:00 2001 From: Michael Neves Date: Sat, 28 Jan 2012 18:28:48 +0100 Subject: pbs no apikey warning --- application/controllers/ResourceController.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php index c5dbf1a..2a7b3e9 100644 --- a/application/controllers/ResourceController.php +++ b/application/controllers/ResourceController.php @@ -192,15 +192,17 @@ class ResourceController extends Zend_Controller_Action { } public function getprebootserialsAction(){ - list($rightroles) = $this->rightrolesMapper->findBy(array('rightID' => '40', 'roleID' => $this->membership->getRoleID())); - if($rightroles == null) { - header('HTTP/1.0 403 No Right to Create Preboots'); - die(); - } $apikey = $this->_request->getParam('apikey'); if($apikey == "") { - header('HTTP/1.0 400 No API-Key'); + header('Content-Type: text/html'); + echo "No API Key\n"; + die(); + } + + list($rightroles) = $this->rightrolesMapper->findBy(array('rightID' => '40', 'roleID' => $this->membership->getRoleID())); + if($rightroles == null) { + header('HTTP/1.0 403 No Right to Create Preboots'); die(); } -- cgit v1.2.3-55-g7522