diff options
| author | michael pereira | 2011-03-30 17:59:23 +0200 |
|---|---|---|
| committer | michael pereira | 2011-03-30 17:59:23 +0200 |
| commit | 522b7be0ef2b43024b27f846009be65130580a8c (patch) | |
| tree | 1e9727c18f836bce070d96671a90858908caa1fd | |
| parent | fix user layout (diff) | |
| download | pbs2-522b7be0ef2b43024b27f846009be65130580a8c.tar.gz pbs2-522b7be0ef2b43024b27f846009be65130580a8c.tar.xz pbs2-522b7be0ef2b43024b27f846009be65130580a8c.zip | |
BootOS update
| -rw-r--r-- | application/controllers/StatsController.php | 2 | ||||
| -rw-r--r-- | application/models/PersonMapper.php | 2 | ||||
| -rw-r--r-- | application/modules/user/controllers/BootosController.php | 20 | ||||
| -rw-r--r-- | application/modules/user/forms/Bootiso.php | 21 |
4 files changed, 26 insertions, 19 deletions
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php index fbe6b88..a54c528 100644 --- a/application/controllers/StatsController.php +++ b/application/controllers/StatsController.php @@ -13,7 +13,7 @@ class StatsController extends Zend_Controller_Action $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); - if($userIDsNamespace['groupID'] !=''){ + if(isset($userIDsNamespace['groupID'])){ header("Content-Type: image/png"); $n = new Pbs_Graph(); diff --git a/application/models/PersonMapper.php b/application/models/PersonMapper.php index b2d366a..de05c0c 100644 --- a/application/models/PersonMapper.php +++ b/application/models/PersonMapper.php @@ -68,6 +68,8 @@ class Application_Model_PersonMapper public function find($id,Application_Model_Person $person = null) { + $return = false; + if($person == null){ $return = true; } 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> |
