]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Fix 'Group most recent backups' option in restore wizard when no recent...
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 28 Mar 2015 14:11:11 +0000 (15:11 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 28 Mar 2015 14:11:11 +0000 (15:11 +0100)
gui/baculum/protected/Pages/RestoreWizard.php

index 4ec205d19841e3ee67d386baf726cbc1610589a8..22ddb2b40334e33a8b2aeb786bb05b20f0333cc2 100644 (file)
@@ -304,8 +304,8 @@ class RestoreWizard extends BaculumPage
                                }
                        }
                } else {
-                       $jobsRecent = $this->getModule('api')->get(array('jobs', 'recent', $this->GroupBackupToRestore->SelectedValue, $this->BackupClientName->SelectedValue));
-                       if(isset($jobsRecent->output)) {
+                       $jobsRecent = $this->getModule('api')->get(array('jobs', 'recent', urlencode($this->GroupBackupToRestore->SelectedValue), $this->BackupClientName->SelectedValue));
+                       if(isset($jobsRecent->output) && count($jobsRecent->output) > 0) {
                                $ids = $jobsRecent->output;
                                $jobids = implode(',', $ids);
                        }
@@ -413,4 +413,4 @@ class RestoreWizard extends BaculumPage
                $this->goToDefaultPage();
        }
 }
-?>
\ No newline at end of file
+?>