summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon2011-04-15 15:52:29 +0200
committerSimon2011-04-15 15:52:29 +0200
commit5e270aa17c624bd467cd9c030b34ae3d6f290fc2 (patch)
tree8471a0bad2b3f1e647332f46f8d8af4ff22b86cd
parentFBGui Downloads fertig (diff)
parentTicket #212 Cookie Lifetime wird jetzt bei fbgui auf unbegrenzt gesetzt... (diff)
downloadpbs2-5e270aa17c624bd467cd9c030b34ae3d6f290fc2.tar.gz
pbs2-5e270aa17c624bd467cd9c030b34ae3d6f290fc2.tar.xz
pbs2-5e270aa17c624bd467cd9c030b34ae3d6f290fc2.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
-rw-r--r--application/controllers/ResourceController.php9
-rw-r--r--public/index.php5
2 files changed, 12 insertions, 2 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index 4a3d9fc..f6b63e2 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -16,7 +16,7 @@ class ResourceController extends Zend_Controller_Action
//TODO Error Messages if something failed
$alpha = $this->_request->getParam('alpha');
- if($alpha != ""){
+ if($alpha != "0"){
$alphasessionID = $alpha;
$result = $sm->findBy(array('alphasessionID' => $alphasessionID),true);
# print_a($result);
@@ -74,6 +74,8 @@ class ResourceController extends Zend_Controller_Action
header("Content-Length: ".filesize(getcwd()."/".$initname));
passthru( "cat ".$initname);
+ }else{
+ header('HTTP/1.0 404 Not Found');
}
}
@@ -126,6 +128,8 @@ class ResourceController extends Zend_Controller_Action
chdir("../resources/config/$configID/");
passthru( "cat default.tgz");
}
+ }else{
+ header('HTTP/1.0 404 Not Found');
}
}
@@ -149,7 +153,10 @@ class ResourceController extends Zend_Controller_Action
header("Content-Length: ".filesize(getcwd()."/".$kernelname));
passthru( "cat ". $kernelname);
+ }else{
+ header('HTTP/1.0 404 Not Found');
}
+
}
public function getkclAction()
diff --git a/public/index.php b/public/index.php
index 02d355e..9c54b9c 100644
--- a/public/index.php
+++ b/public/index.php
@@ -23,7 +23,10 @@ APPLICATION_PATH . '/configs/application.ini'
);
// Set Session lifetime
-Zend_Session::setOptions(array('cookie_lifetime' => '3600'));
+if(stristr($_SERVER['HTTP_USER_AGENT'],'prebootGUI'))
+ Zend_Session::setOptions(array('cookie_lifetime' => '3600'));
+else
+ Zend_Session::setOptions(array('cookie_lifetime' => null));
// Run bootstrap
$application->bootstrap()