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

Commit

Permalink
Browse files Browse the repository at this point in the history
Restore: fix alert msg
  • Loading branch information
fbergkemper committed Oct 26, 2016
1 parent 864c93a commit dea1c70
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 @@ -139,7 +139,7 @@ public function indexAction()
echo $e->getMessage();
}

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

Expand Down Expand Up @@ -204,6 +204,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 @@ -31,7 +31,7 @@ $this->headTitle($title);
<?php if($this->acl_alert) : echo $this->ACLAlert($this->required_commands); elseif(!$this->acl_alert) : ?>

<?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 dea1c70

Please sign in to comment.