summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSimon2011-04-14 16:37:26 +0200
committerSimon2011-04-14 16:37:26 +0200
commite46ce086cb84a7f2787c07a6379c052bd4a435d9 (patch)
tree696df104b0c39c31e879c855f9c1387d99860553 /application
parentfix (diff)
downloadpbs2-e46ce086cb84a7f2787c07a6379c052bd4a435d9.tar.gz
pbs2-e46ce086cb84a7f2787c07a6379c052bd4a435d9.tar.xz
pbs2-e46ce086cb84a7f2787c07a6379c052bd4a435d9.zip
fbgui debug fix
Diffstat (limited to 'application')
-rw-r--r--application/controllers/IndexController.php7
-rw-r--r--application/modules/fbgui/controllers/IndexController.php18
2 files changed, 13 insertions, 12 deletions
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index 3818132..00ddc12 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -11,8 +11,11 @@ class IndexController extends Zend_Controller_Action
public function indexAction()
{
if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI')){
- if(!isset($_SESSION['postdata'])){
- $_SESSION['postdata'] = $_POST;
+ $mySession =new Zend_Session_Namespace('pbs');
+ print_a($mySession);
+ if(!isset($_SESSION['postdata'])){
+ $mySession->postdata = $_POST;
+ print_a($mySession);
}
$d = new Pbs_Debug();
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();