summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/controllers/ResourceController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/controllers/ResourceController.php')
-rw-r--r--application/modules/dev/controllers/ResourceController.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/application/modules/dev/controllers/ResourceController.php b/application/modules/dev/controllers/ResourceController.php
index 653b70d..cbca8d0 100644
--- a/application/modules/dev/controllers/ResourceController.php
+++ b/application/modules/dev/controllers/ResourceController.php
@@ -33,14 +33,16 @@ class dev_ResourceController extends Zend_Controller_Action
if(is_dir("../resources/bootos/$bootosID/initramfs/") && is_numeric($bootosID)){
header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT) == 'IE') ? 'inline' : 'attachment';
+ $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="initramfs"');
header('Pragma: no-cache');
header('Expires: 0');
// create file.
chdir("../resources/bootos/$bootosID/initramfs/");
- passthru( "cat initramfs");
+ $initname = array_pop(scandir("./"));
+
+ passthru( "cat ".$initname);
}
}
@@ -58,7 +60,7 @@ class dev_ResourceController extends Zend_Controller_Action
if(is_dir("../resources/config/$configID/config/") && is_numeric($configID)){
header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT) == 'IE') ? 'inline' : 'attachment';
+ $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="config.tar.gz"');
header('Pragma: no-cache');
header('Expires: 0');
@@ -76,14 +78,16 @@ class dev_ResourceController extends Zend_Controller_Action
if(is_dir("../resources/bootos/$bootosID/kernel/") && is_numeric($bootosID)){
header('Content-Type: application/x-gzip');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT) == 'IE') ? 'inline' : 'attachment';
+ $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="kernel"');
header('Pragma: no-cache');
header('Expires: 0');
// create the gzipped tarfile.
chdir("../resources/bootos/$bootosID/kernel/");
- passthru( "cat kernel");
+ $kernelname = array_pop(scandir("./"));
+
+ passthru( "cat ". $kernelname);
}
}
@@ -98,7 +102,7 @@ class dev_ResourceController extends Zend_Controller_Action
$bmemapper->find($bmeID,$bme);
header('Content-Type: text/html');
- $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT) == 'IE') ? 'inline' : 'attachment';
+ $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
header('Content-Disposition: ' . $content_disp . '; filename="kcl.txt"');
header('Pragma: no-cache');
header('Expires: 0');