diff options
| author | michael pereira | 2011-04-04 17:11:58 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-04 17:11:58 +0200 |
| commit | 02716f178d25f4490f6f74140045d817c73fcc71 (patch) | |
| tree | 518d783a1c0dd48cb5f8b0187ee06094007113f4 /application/controllers/ResourceController.php | |
| parent | Config in User fertig mit pagination (diff) | |
| download | pbs2-02716f178d25f4490f6f74140045d817c73fcc71.tar.gz pbs2-02716f178d25f4490f6f74140045d817c73fcc71.tar.xz pbs2-02716f178d25f4490f6f74140045d817c73fcc71.zip | |
getRessoources bei Play werden angezeigt
Diffstat (limited to 'application/controllers/ResourceController.php')
| -rw-r--r-- | application/controllers/ResourceController.php | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php index e36c75a..3b4a8cb 100644 --- a/application/controllers/ResourceController.php +++ b/application/controllers/ResourceController.php @@ -8,8 +8,6 @@ class ResourceController extends Zend_Controller_Action public function init() { - $this->_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setNoRender(); $session = new Application_Model_Session(); $sm = new Application_Model_SessionMapper(); @@ -18,7 +16,7 @@ class ResourceController extends Zend_Controller_Action //TODO Error Messages if something failed if(!isset($bootmenuentryID)){ $alphasessionID = $this->_request->getParam('alpha'); - $result = $sm->findBy('alphasessionID',$alphasessionID); + $result = $sm->findBy(array('alphasessionID' => $alphasessionID),true); # print_a($result); $this->thisSession = $session->setOptions($result[0]); $this->thisSession->setID($result[0]['sessionID']); @@ -55,6 +53,9 @@ class ResourceController extends Zend_Controller_Action public function getinitramfsAction() { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $bootosID = $this->thisSession->getBootosID(); if(is_dir("../resources/bootos/$bootosID/initramfs/") && is_numeric($bootosID)){ @@ -75,6 +76,10 @@ class ResourceController extends Zend_Controller_Action public function getconfigAction() { + + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $bootmenuentryID = $this->thisSession->getBootmenuentryID(); $bootmenuentry = new Application_Model_BootMenuEntries(); @@ -100,6 +105,10 @@ class ResourceController extends Zend_Controller_Action public function getkernelAction() { + + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $bootosID = $this->thisSession->getBootosID(); if(is_dir("../resources/bootos/$bootosID/kernel/") && is_numeric($bootosID)){ @@ -120,6 +129,9 @@ class ResourceController extends Zend_Controller_Action public function getkclAction() { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $bmeID = $this->thisSession->getBootmenuentryID(); if(is_numeric($bmeID)){ @@ -153,7 +165,8 @@ class ResourceController extends Zend_Controller_Action // so getkclAction, getkernelAction, getconfigAction and getinitramfsAction // can be called with session-identifier - header('Content-Type: application/json'); + + $return_val = array( 'info' => 'This function is for debugging purpose only', @@ -163,13 +176,17 @@ class ResourceController extends Zend_Controller_Action 'config' => $this->thisSession->getAlphasessionID() ); - - $this->_redirect('/user/bootmenu/index/page/'.$this->page.'/json/'.json_encode($return_val)); + $ser = serialize($return_val); + $this->_forward('index','bootmenu','user', array( + 'page' => $this->page, + 'json' => $ser + )); } private function generateURL($action, $varname, $varvalue, $filename){ + $path = '/resource/'. $action .'/' . $varname .'/' . $varvalue .'/file/' . $filename ; $path = "http://" . $_SERVER['SERVER_NAME'] . $path; return $path; |
