summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/fbgui/controllers/IndexController.php18
1 files changed, 8 insertions, 10 deletions
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();