summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authormichael pereira2011-04-19 15:43:47 +0200
committermichael pereira2011-04-19 15:43:47 +0200
commit1a82b501d9b85c37595c227743e097932f9b0450 (patch)
treea9c768959eb8029985eb64b5d4b3c20d76c55cd7 /application/controllers
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-1a82b501d9b85c37595c227743e097932f9b0450.tar.gz
pbs2-1a82b501d9b85c37595c227743e097932f9b0450.tar.xz
pbs2-1a82b501d9b85c37595c227743e097932f9b0450.zip
Resource Controller fix
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/ResourceController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index bf9de06..2af7f92 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -120,7 +120,7 @@ class ResourceController extends Zend_Controller_Action
mkdir($configpath ,0777, true);
if(isset($_FILES['config'])){
- move_uploaded_file($_FILES['config']['tmp_name'], $configpath."config.tgz");
+ move_uploaded_file($_FILES['config']['tmp_name'], $configpath."default.tgz");
}
if(isset($_FILES['kernel'])){
move_uploaded_file($_FILES['kernel']['tmp_name'], $kernelpath."kernel");
@@ -162,14 +162,14 @@ class ResourceController extends Zend_Controller_Action
{
$bootmenuentryID = $this->thisSession->getBootmenuentryID();
-
$bootmenuentry = new Application_Model_BootMenuEntries();
$bmm = new Application_Model_BootMenuEntriesMapper();
$bmm->find($bootmenuentryID,$bootmenuentry);
$configID = $bootmenuentry->getConfigID();
+ $bootosID = $this->thisSession->getBootosID();
- if(is_dir("../resources/config/$configID/")){
+ if(is_dir("../resources/bootos/$bootosID/config/")){
header('Content-Type: application/x-gzip');
$content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment';
@@ -204,7 +204,7 @@ class ResourceController extends Zend_Controller_Action
chdir($path_userconf);
passthru( "tar cz *");
}else {
- chdir("../resources/config/$configID/");
+ chdir("../resources/bootos/$bootosID/config/");
passthru( "cat default.tgz");
}
}else{