diff options
| author | michael pereira | 2011-07-11 03:12:22 +0200 |
|---|---|---|
| committer | michael pereira | 2011-07-11 03:12:22 +0200 |
| commit | 54abb811924882bd02bf028d457aa948f9e35582 (patch) | |
| tree | f44f3218f44eceaf23d9228406ef8b731913ddb8 /application/modules | |
| parent | redirect raus (diff) | |
| download | pbs2-54abb811924882bd02bf028d457aa948f9e35582.tar.gz pbs2-54abb811924882bd02bf028d457aa948f9e35582.tar.xz pbs2-54abb811924882bd02bf028d457aa948f9e35582.zip | |
redirect raus
Diffstat (limited to 'application/modules')
| -rw-r--r-- | application/modules/ipxe/controllers/AuthController.php | 24 | ||||
| -rw-r--r-- | application/modules/ipxe/controllers/ResourceController.php | 5 |
2 files changed, 10 insertions, 19 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php index ba4e6fb..12a897b 100644 --- a/application/modules/ipxe/controllers/AuthController.php +++ b/application/modules/ipxe/controllers/AuthController.php @@ -57,22 +57,13 @@ class Ipxe_AuthController extends Zend_Controller_Action $client->setCreated(time()); $client = $n->createClient($client); $clientID = $client->getID(); - - if(!isset($_SESSION['alphasessionID'])){ - $session = new Application_Model_Session(); - $session->setBootisoID($bootiso->getID()); - $session->setClientID($clientID); - $session->setTime(time()); - $session->setIp($_SERVER['REMOTE_ADDR']); - $session = $n->createSession($session); - $_SESSION['alphasessionID'] = $session->getAlphasessionID(); - } - else{ - $session = new Application_Model_Session(); - $sessionMapper = new Application_Model_SessionMapper(); - $sessions = $sessionMapper->findBy(array('alphasessionID'=>$_SESSION['alphasessionID'])); - $session = $sessions[0]; - } + + $session = new Application_Model_Session(); + $session->setBootisoID($bootiso->getID()); + $session->setClientID($clientID); + $session->setTime(time()); + $session->setIp($_SERVER['REMOTE_ADDR']); + $session = $n->createSession($session); header('Content-Type: text/plain'); @@ -84,7 +75,6 @@ class Ipxe_AuthController extends Zend_Controller_Action header("Content-Length: ".(strlen($result))); echo $result; -// $this->_redirect('/ipxe/resource/ipxe/alpha/'.$session->getAlphasessionID()); } else{ diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php index 1b00b65..8462f7b 100644 --- a/application/modules/ipxe/controllers/ResourceController.php +++ b/application/modules/ipxe/controllers/ResourceController.php @@ -68,9 +68,10 @@ class Ipxe_ResourceController extends Zend_Controller_Action $vesamenuView->addScriptPath(APPLICATION_PATH.'/modules/ipxe/views/scripts/resource/'); $vesamenuView->host = $_SERVER['HTTP_HOST']; + $_SESSION['alphasessionID'] = $this->thisSession->getAlphasessionID(); // Request Bootmenu -// $pbsFilter = new Pbs_Filter(); -// $bootmenuID = $pbsFilter->evaluate(); + $pbsFilter = new Pbs_Filter(); + $bootmenuID = $pbsFilter->evaluate(); $bootmenuID = 2; if($bootmenuID != null){ |
