From 63fc542590184b758b604848ab1bd4edabb53bb9 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Fri, 8 May 2015 13:13:35 +0200 Subject: [PATCH] Retrieve restore parameters from query --- .../Restore/Controller/RestoreController.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/module/Restore/src/Restore/Controller/RestoreController.php b/module/Restore/src/Restore/Controller/RestoreController.php index e9f00d12..c53402d3 100644 --- a/module/Restore/src/Restore/Controller/RestoreController.php +++ b/module/Restore/src/Restore/Controller/RestoreController.php @@ -32,6 +32,8 @@ class RestoreController extends AbstractActionController { + protected $restore_params = array(); + /** * */ @@ -40,6 +42,40 @@ public function indexAction() return new ViewModel(); } + /** + * Retrieve restore parameters + */ + private function getRestoreParams() + { + if($this->params()->fromQuery('job')) { + $this->restore_params['job'] = $this->params()->fromQuery('job'); + } + else { + $this->restore_params['job'] = null; + } + + if($this->params()->fromQuery('client')) { + $this->restore_params['client'] = $this->params()->fromQuery('client'); + } + else { + $this->restore_params['client'] = null; + } + + if($this->params()->fromQuery('restoreclient')) { + $this->restore_params['restoreclient'] = $this->params()->fromQuery('restoreclient'); + } + else { + $this->restore_params['restoreclient'] = null; + } + + if($this->params()->fromQuery('fileset')) { + $this->restore_params['fileset'] = $this->params()->fromQuery('fileset'); + } + else { + $this->restore_params['fileset'] = null; + } + } + /** * Get job list from director in long or short format *