Skip to content

Commit

Permalink
Merge branch 'bareos-16.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Oct 28, 2016
2 parents 1de549f + c293c1e commit a860029
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/autoload/global.php
Expand Up @@ -108,7 +108,7 @@ function read_directors_ini($directors, $directors_ini)

foreach($directors as $instance) {

if(array_key_exists('enabled', $instance) && isset($instance['enabled']) && strtolower($instance['enabled']) == "yes") {
if(array_key_exists('enabled', $instance) && isset($instance['enabled']) && (strtolower($instance['enabled']) == "yes" || strtolower($instance['enabled']) == TRUE)) {

if(array_key_exists('diraddress', $instance) && isset($instance['diraddress'])) {
$arr[key($directors)] = array();
Expand Down
8 changes: 6 additions & 2 deletions module/Application/view/layout/layout.phtml
Expand Up @@ -75,7 +75,7 @@ echo $this->doctype();
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="http://www.bareos.org/" target="_blank"><img src="<?php echo $this->basePath('img/bareos-logo-small.png') ?>" alt="Bareos" /></a>&nbsp;
<a href="<?php echo $this->url('dashboard', array('action' => 'index')); ?>" target="_self"><img src="<?php echo $this->basePath('img/bareos-logo-small.png') ?>" alt="Bareos" /></a>&nbsp;
</div>
<div class="collapse navbar-collapse">
<?php echo $this->navigation('navigation')->menu()->setMinDepth(0)->setMaxDepth(0)->setUlClass('nav navbar-nav'); ?>
Expand All @@ -91,7 +91,11 @@ echo $this->doctype();
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>&nbsp;<?php echo $_SESSION['bareos']['username']; ?> <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="http://doc.bareos.org" target="_blank"><?php echo $this->translate("Help"); ?></a></li>
<li><a href="http://doc.bareos.org" target="_blank"><?php echo $this->translate("Documentation"); ?></a></li>
<li><a href="https://www.bareos.org/en/open-source.html" target="_blank"><?php echo $this->translate("Mailinglists"); ?></a></li>
<li><a href="https://bugs.bareos.org/" target="_blank"><?php echo $this->translate("Bugtracker"); ?></a></li>
<li><a href="http://www.bareos.com/en/Support.html" target="_blank"><?php echo $this->translate("Support"); ?></a></li>
<li><a href="http://www.bareos.com/en/Subscription.html" target="_blank"><?php echo $this->translate("Subscription"); ?></a></li>
<li role="separator" class="divider"></li>
<li><a href="<?php echo $this->url('auth', array('action' => 'logout')); ?>"><?php echo $this->translate("Logout"); ?></a></li>
</ul>
Expand Down
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 a860029

Please sign in to comment.