From dea1c700626575d231d00cfd6365d6fff56b6b61 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Wed, 26 Oct 2016 11:46:24 +0200 Subject: [PATCH 1/4] Restore: fix alert msg --- module/Restore/src/Restore/Controller/RestoreController.php | 3 ++- module/Restore/view/restore/restore/index.phtml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/Restore/src/Restore/Controller/RestoreController.php b/module/Restore/src/Restore/Controller/RestoreController.php index b69ed7a8e50..51e8252e03a 100644 --- a/module/Restore/src/Restore/Controller/RestoreController.php +++ b/module/Restore/src/Restore/Controller/RestoreController.php @@ -139,7 +139,7 @@ public function indexAction() echo $e->getMessage(); } - if($backups == null) { + if(empty($backups)) { $errors = 'No backups of client '.$this->restore_params['client'].' found.'; } @@ -204,6 +204,7 @@ public function indexAction() return new ViewModel(array( 'restore_params' => $this->restore_params, 'form' => $form, + 'errors' => $errors )); } diff --git a/module/Restore/view/restore/restore/index.phtml b/module/Restore/view/restore/restore/index.phtml index 6e2b7f26ede..c2ce2949de6 100644 --- a/module/Restore/view/restore/restore/index.phtml +++ b/module/Restore/view/restore/restore/index.phtml @@ -31,7 +31,7 @@ $this->headTitle($title); acl_alert) : echo $this->ACLAlert($this->required_commands); elseif(!$this->acl_alert) : ?> errors)) { + if(isset($this->errors) && !empty($this->errors)) { echo ''; } From e6a7f20e73a8275ce6cc5ee2ba53eac5c79a2e12 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Wed, 26 Oct 2016 11:54:40 +0200 Subject: [PATCH 2/4] Useability tweak --- module/Application/view/layout/layout.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index 765b2bcc68e..1fd3aea4ca6 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -75,7 +75,7 @@ echo $this->doctype(); - Bareos  + Bareos