summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
authormichael pereira2011-03-30 17:59:23 +0200
committermichael pereira2011-03-30 17:59:23 +0200
commit522b7be0ef2b43024b27f846009be65130580a8c (patch)
tree1e9727c18f836bce070d96671a90858908caa1fd /application/modules
parentfix user layout (diff)
downloadpbs2-522b7be0ef2b43024b27f846009be65130580a8c.tar.gz
pbs2-522b7be0ef2b43024b27f846009be65130580a8c.tar.xz
pbs2-522b7be0ef2b43024b27f846009be65130580a8c.zip
BootOS update
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/user/controllers/BootosController.php20
-rw-r--r--application/modules/user/forms/Bootiso.php21
2 files changed, 23 insertions, 18 deletions
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php
index ecc29d7..a7b83ee 100644
--- a/application/modules/user/controllers/BootosController.php
+++ b/application/modules/user/controllers/BootosController.php
@@ -160,25 +160,23 @@ class user_BootosController extends Zend_Controller_Action
$bootosID = $bootos->getID();
- exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_kernel())."' 2>&1 | grep 'Last-Modified:'", $kerneldate);
- exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_init())."' 2>&1 | grep 'Last-Modified:'", $initdate);
-
- $kerneldate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($kerneldate))));
- $initdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($initdate))));
-
- if(is_file("../resources/bootmedium/$bootosID/kernel") && is_file("../resources/bootmedium/$bootosID/initramfs")){
+ if(is_file("../resources/bootos/$bootosID/kernel/kernel") && is_file("../resources/bootos/$bootosID/initramfs/initramfs")){
$kernelolddate = filemtime("../resources/bootos/".$bootosID."/kernel/kernel");
$initolddate = filemtime("../resources/bootos/".$bootosID."/initramfs/initramfs");
}
else
{
- $kernelolddate = false;
- $initolddate = false;
+ return true;
}
- //print_a($kernelname,$kerneldate,$kernelolddate,$initname,$initdate,$initolddate);
+ exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_kernel())."' 2>&1 | grep 'Last-Modified:'", $kerneldate);
+ exec("wget --server-response --spider '".escapeshellcmd($bootos->getPath_init())."' 2>&1 | grep 'Last-Modified:'", $initdate);
+
+ $kerneldate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($kerneldate))));
+ $initdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($initdate))));
+
+ print_a($bootos->getPath_kernel(),$kerneldate,$kernelolddate,$initname,$initdate,$initolddate);
-
if($kerneldate > $kernelolddate || $initdate > $initolddate)
return true;
else
diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php
index 3bf2775..3aba0af 100644
--- a/application/modules/user/forms/Bootiso.php
+++ b/application/modules/user/forms/Bootiso.php
@@ -29,6 +29,8 @@ class user_Form_Bootiso extends Zend_Form
if ($this->rights == 'meta')
$meta = true;
+ else
+ $meta = null;
$this->addElement('text', 'title', array(
'filters' => array('StringTrim'),
@@ -108,19 +110,24 @@ class user_Form_Bootiso extends Zend_Form
$this->addElement('button', 'Cancel', array(
'onclick' => 'self.location="/user/bootiso"'
));
+
?>
- <div id='groups' style='text-align: center;'>
- <div class='v1'>
- <img id='depthimg' src='/stats/graphgroup/' />
- </div>
- </div>
-
- <script>changeDepth();
+ <script>
+ $(document).ready(function(){
+ changeDepth();
+ $('#groups .v1').show();
+ });
function changeDepth(){
i = $("#depth option:selected").val();
$('#depthimg').attr('src','/stats/graphgroup/level/' + i);
}</script>
+
+ <div id='groups' style='text-align: center;'>
+ <div class='v1'>
+ <img id='depthimg' src='/stats/graphgroup/' />
+ </div>
+ </div>