}
}
} 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);
}
$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
+?>