From 59594fd998aa675f7efe5c4e411c7f5b6884144b Mon Sep 17 00:00:00 2001 From: michael pereira Date: Tue, 12 Apr 2011 14:04:55 +0200 Subject: preboot fix --- application/modules/user/controllers/BootosController.php | 4 +++- application/modules/user/controllers/PrebootController.php | 13 ++++++++----- application/modules/user/views/scripts/preboot/index.phtml | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'application/modules') diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php index 917441a..b4801f6 100644 --- a/application/modules/user/controllers/BootosController.php +++ b/application/modules/user/controllers/BootosController.php @@ -1,4 +1,4 @@ -view->bootoslist)>0){ foreach ($this->view->bootoslist as $bootos){ $this->view->update[$bootos->getID()] = $update && $this->checkupdateAction($bootos); + if($bootos->getDefaultkcl() == null) + $bootos->setDefaultkcl("none (edit Bootos to set KCL)"); $bootos->setGroupID("[".$bootos->getGroupID()."] ".$groupMapper->find($bootos->getGroupID())->getTitle()); $bootos->setConfigID("[".$bootos->getConfigID()."] ".$configMapper->find($bootos->getConfigID())->getTitle()); $bootos->setCreated(date(Zend_Registry::get('dateformat'),$bootos->getCreated())); diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php index e74dd3f..0a1432c 100644 --- a/application/modules/user/controllers/PrebootController.php +++ b/application/modules/user/controllers/PrebootController.php @@ -1,4 +1,4 @@ -db = Zend_Db_Table::getDefaultAdapter(); } else { $this->_helper->redirector('login', 'auth'); - } + } $this->page = $this->_request->getParam('page'); } @@ -170,10 +170,13 @@ class User_PrebootController extends Zend_Controller_Action $prebootdate = strtotime(trim(str_replace('Last-Modified:', '', array_pop($prebootdate)))); - if(is_file("../resources/bootmedium/$prebootID/preboot.zip")) + if(is_file("../resources/bootmedium/$prebootID/preboot.zip")){ $prebootolddate = filemtime("../resources/bootmedium/".$prebootID."/preboot.zip"); - else - $prebootolddate = false; + }else{ + $pbsNotifier = new Pbs_Notifier(); + $this->view->notification = $pbsNotifier->notify('There are updates available','ok'); + return true; + } //print_a($prebootname,$prebootdate,$prebootolddate); diff --git a/application/modules/user/views/scripts/preboot/index.phtml b/application/modules/user/views/scripts/preboot/index.phtml index dba956c..8d8da26 100644 --- a/application/modules/user/views/scripts/preboot/index.phtml +++ b/application/modules/user/views/scripts/preboot/index.phtml @@ -4,7 +4,7 @@ formButton('checkupdate', 'Check for Updates', array( - 'onclick' => 'self.location="/user/preboot/index/checkupdate/true"', + 'onclick' => 'self.location="/user/preboot/index/checkupdate/true/page/'.$this->page.'"', 'class' => 'updatebutton', ))?> -- cgit v1.2.3-55-g7522