summaryrefslogtreecommitdiffstats
path: root/application/modules/ipxe/controllers/ResourceController.php
diff options
context:
space:
mode:
authormichael pereira2011-07-19 21:03:08 +0200
committermichael pereira2011-07-19 21:03:08 +0200
commita42a7f6c86e2956b269b21b76909c6adc2bb2d36 (patch)
tree85d348aa8de8f50e8699c91d579788def8bcb1b8 /application/modules/ipxe/controllers/ResourceController.php
parentmenu structure (diff)
downloadpbs2-a42a7f6c86e2956b269b21b76909c6adc2bb2d36.tar.gz
pbs2-a42a7f6c86e2956b269b21b76909c6adc2bb2d36.tar.xz
pbs2-a42a7f6c86e2956b269b21b76909c6adc2bb2d36.zip
menu structire
Diffstat (limited to 'application/modules/ipxe/controllers/ResourceController.php')
-rw-r--r--application/modules/ipxe/controllers/ResourceController.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php
index ed317ce..52c7ccb 100644
--- a/application/modules/ipxe/controllers/ResourceController.php
+++ b/application/modules/ipxe/controllers/ResourceController.php
@@ -71,12 +71,15 @@ class Ipxe_ResourceController extends Zend_Controller_Action
public function getvesamenuconfigAction(){
- if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){
- header('WWW-Authenticate: Basic realm=""');
- header('HTTP/1.0 401 Unauthorized');
- exit;
- }
-
+ $login = $this->_request->getParam('login');
+
+ if($login){
+ if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){
+ header('WWW-Authenticate: Basic realm=""');
+ header('HTTP/1.0 401 Unauthorized');
+ exit;
+ }
+ }
header('Content-Type: text/html');
$content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="vesamenu.conf"');
@@ -87,7 +90,7 @@ class Ipxe_ResourceController extends Zend_Controller_Action
$vesamenuView->addScriptPath(APPLICATION_PATH.'/modules/ipxe/views/scripts/resource/');
$vesamenuView->username = $_SERVER['PHP_AUTH_USER'];
$vesamenuView->password = $_SERVER['PHP_AUTH_PW'];
- $vesamenuView->login = $this->_request->getParam('login');
+ $vesamenuView->login = $login;
$vesamenuView->host = $_SERVER['HTTP_HOST'];
$_SESSION['alphasessionID'] = $this->thisSession->getAlphasessionID();