From: Marcin Haba Date: Sat, 28 Mar 2015 14:11:11 +0000 (+0100) Subject: baculum: Fix 'Group most recent backups' option in restore wizard when no recent... X-Git-Tag: Release-7.2.0~58 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=734be3333e5a51788ae44de07f848b6d9d702a4d;p=bacula%2Fbacula baculum: Fix 'Group most recent backups' option in restore wizard when no recent backup exist --- diff --git a/gui/baculum/protected/Pages/RestoreWizard.php b/gui/baculum/protected/Pages/RestoreWizard.php index 4ec205d198..22ddb2b403 100644 --- a/gui/baculum/protected/Pages/RestoreWizard.php +++ b/gui/baculum/protected/Pages/RestoreWizard.php @@ -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 +?>