]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/baculum/protected/Pages/RestoreWizard.php
baculum: Open jobs window just after restore start
[bacula/bacula] / gui / baculum / protected / Pages / RestoreWizard.php
index 4ec205d19841e3ee67d386baf726cbc1610589a8..b9223eecd1dedeeb8d7ad82ec3104ad473d478a7 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);
                        }
@@ -410,7 +410,7 @@ class RestoreWizard extends BaculumPage
                $restoreProps['replace'] = $this->ReplaceFiles->SelectedValue;
                
                $ret = $this->getModule('api')->create(array('jobs', 'restore'), $restoreProps);
-               $this->goToDefaultPage();
+               $this->goToDefaultPage(array('open' => 'Job'));
        }
 }
-?>
\ No newline at end of file
+?>