From 734be3333e5a51788ae44de07f848b6d9d702a4d Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 28 Mar 2015 15:11:11 +0100 Subject: [PATCH] baculum: Fix 'Group most recent backups' option in restore wizard when no recent backup exist --- gui/baculum/protected/Pages/RestoreWizard.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 +?> -- 2.39.5