summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authormichael pereira2011-03-15 14:22:01 +0100
committermichael pereira2011-03-15 14:22:01 +0100
commitbf811ebbc847595281d1d01c2d7d217abb43a58c (patch)
tree04d6fee4c9f41d26a66b199e8ee1e385f5a5b154 /application
parentRessource gelöscht (diff)
downloadpbs2-bf811ebbc847595281d1d01c2d7d217abb43a58c.tar.gz
pbs2-bf811ebbc847595281d1d01c2d7d217abb43a58c.tar.xz
pbs2-bf811ebbc847595281d1d01c2d7d217abb43a58c.zip
Ressource Ausgabe angepasst
Diffstat (limited to 'application')
-rw-r--r--application/Bootstrap.php2
-rw-r--r--application/modules/dev/controllers/ResourceController.php21
2 files changed, 13 insertions, 10 deletions
diff --git a/application/Bootstrap.php b/application/Bootstrap.php
index f9ee092..8d672bf 100644
--- a/application/Bootstrap.php
+++ b/application/Bootstrap.php
@@ -31,7 +31,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
}
function _initViewHelpers()
{
+
$this->bootstrap('layout');
+
$layout = $this->getResource('layout');
$view = $layout->getView();
diff --git a/application/modules/dev/controllers/ResourceController.php b/application/modules/dev/controllers/ResourceController.php
index c292228..3bd325f 100644
--- a/application/modules/dev/controllers/ResourceController.php
+++ b/application/modules/dev/controllers/ResourceController.php
@@ -32,13 +32,13 @@ class dev_ResourceController extends Zend_Controller_Action
header('Content-Type: application/x-gzip');
$content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="initramfs.tar.gz"');
+ header('Content-Disposition: ' . $content_disp . '; filename="initramfs"');
header('Pragma: no-cache');
header('Expires: 0');
// create the gzipped tarfile.
chdir("../resources/bootos/$bootosID/initramfs/");
- passthru( "tar cz ./");
+ passthru( "cat initramfs");
}
}
@@ -55,6 +55,7 @@ class dev_ResourceController extends Zend_Controller_Action
# print_a($result);
$thisSession = $result[0];
$bootmenuentryID = $thisSession['bootmenuentryID'];
+
$bootmenuentry = new Application_Model_BootMenuEntries();
$bmm = new Application_Model_BootMenuEntriesMapper();
$bmm->find($bootmenuentryID,$bootmenuentry);
@@ -93,13 +94,13 @@ class dev_ResourceController extends Zend_Controller_Action
header('Content-Type: application/x-gzip');
$content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $HTTP_USER_AGENT) == 'IE') ? 'inline' : 'attachment';
- header('Content-Disposition: ' . $content_disp . '; filename="kernel.tar.gz"');
+ header('Content-Disposition: ' . $content_disp . '; filename="kernel"');
header('Pragma: no-cache');
header('Expires: 0');
// create the gzipped tarfile.
chdir("../resources/bootos/$bootosID/kernel/");
- passthru( "tar cz ./");
+ passthru( "cat kernel");
}
}
@@ -155,9 +156,9 @@ class dev_ResourceController extends Zend_Controller_Action
$return_val =
array(
'info' => 'This function is for debugging purpose only',
- 'kernel' => $this->generateURL('getkernel', 'alpha', $_SESSION['alphasessionID']),
- 'initramfs' => $this->generateURL('getinitramfs', 'alpha', $_SESSION['alphasessionID']),
- 'kcl' => $this->generateURL('getkcl', 'alpha', $_SESSION['alphasessionID']),
+ 'kernel' => $this->generateURL('getkernel', 'alpha', $_SESSION['alphasessionID'], "kernel"),
+ 'initramfs' => $this->generateURL('getinitramfs', 'alpha', $_SESSION['alphasessionID'], "initramfs"),
+ 'kcl' => $this->generateURL('getkcl', 'alpha', $_SESSION['alphasessionID'], "kcl"),
'config' => $_SESSION['alphasessionID']
);
echo json_encode($return_val);
@@ -165,15 +166,15 @@ class dev_ResourceController extends Zend_Controller_Action
else{
echo json_encode(
array( 'info' => 'This function is for debugging purpose only',
- 'error'=>'your session is out of date')
+ 'error'=> 'your session is out of date')
);
}
}
}
- function generateURL($action, $varname, $varvalue){
- $path = '/resource/'. $action .'/' . $varname .'/' . $varvalue;
+ function generateURL($action, $varname, $varvalue, $filename){
+ $path = '/resource/'. $action .'/' . $varname .'/' . $varvalue .'/file/' . $filename ;
$path = "http://" . $_SERVER['SERVER_NAME'] . $path;
return $path;
}