Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Restore: fix alert msg
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Oct 25, 2016
1 parent bc7d6a4 commit aee38de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion module/Restore/src/Restore/Controller/RestoreController.php
Expand Up @@ -80,7 +80,7 @@ public function indexAction()
$filesets = $this->getRestoreModel()->getFilesets();
$restorejobs = $this->getRestoreModel()->getRestoreJobs();

if($backups == null) {
if(empty($backups)) {
$errors = 'No backups of client <strong>'.$this->restore_params['client'].'</strong> found.';
}

Expand Down Expand Up @@ -135,6 +135,7 @@ public function indexAction()
return new ViewModel(array(
'restore_params' => $this->restore_params,
'form' => $form,
'errors' => $errors
));
}

Expand Down
2 changes: 1 addition & 1 deletion module/Restore/view/restore/restore/index.phtml
Expand Up @@ -29,7 +29,7 @@ $this->headTitle($title);
?>

<?php
if(isset($this->errors)) {
if(isset($this->errors) && !empty($this->errors)) {
echo '<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong>Error: </strong>'.$this->errors.'</div>';
}
Expand Down

0 comments on commit aee38de

Please sign in to comment.