From e46ce086cb84a7f2787c07a6379c052bd4a435d9 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 14 Apr 2011 16:37:26 +0200 Subject: fbgui debug fix --- .../modules/fbgui/controllers/IndexController.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'application/modules') diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 57bc22c..2c8fce9 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -23,25 +23,23 @@ class Fbgui_IndexController extends Zend_Controller_Action public function indexAction() { - if(isset($_SESSION['postdata'])){ - $_POST = $_SESSION['postdata']; - } + $mySession = new Zend_Session_Namespace('pbs'); $d = new Pbs_Debug(); $d->debug(array('FBGuiIndexController',$_SERVER['REMOTE_ADDR'],implode("\t",$_SESSION['postdata']))); - if(isset($_POST['bootisoID']) || isset($_POST['serialnumber'])){ + if(isset($mySession->postdata['bootisoID']) || isset($mySession->postdata['serialnumber'])){ // Create a session $n = new Pbs_Session(); $bootisomapper = new Application_Model_BootIsoMapper(); $bootiso = new Application_Model_BootIso(); - if(isset($_POST['bootisoID'])){ - $bootisomapper->find($_POST['bootisoID'],$bootiso); + if(isset($mySession->postdata['bootisoID'])){ + $bootisomapper->find($mySession->postdata['bootisoID'],$bootiso); $groupID = $bootiso->getGroupID(); } - elseif(isset($_POST['serialnumber'])){ - $results = $bootisomapper->findBy(array('serialnumber' => $_POST['serialnumber']),true); + elseif(isset($mySession->postdata['serialnumber'])){ + $results = $bootisomapper->findBy(array('serialnumber' => $mySession->postdata['serialnumber']),true); if(count($results) == 0){ $this->_redirect('/fbgui/index/error/serialresult/noserial'); } @@ -52,8 +50,8 @@ class Fbgui_IndexController extends Zend_Controller_Action } $client = new Application_Model_Client(); - $client->setMacadress($_POST['mac']); - $client->setHardwarehash($_POST['hardwarehash']); + $client->setMacadress($mySession->postdata['mac']); + $client->setHardwarehash($mySession->postdata['hardwarehash']); $client->setGroupID($groupID); $client = $n->createClient($client); $clientID = $client->getID(); -- cgit v1.2.3-55-g7522