]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Tweak using job identifiers in bvfs restore endpoint
authorMarcin Haba <marcin.haba@bacula.pl>
Fri, 21 Apr 2023 09:28:31 +0000 (11:28 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Mon, 1 May 2023 11:18:25 +0000 (13:18 +0200)
gui/baculum/protected/API/Pages/API/BVFSRestore.php

index b40275a46964415c8a54ed38975c29a590ace84d..74629d8369fdb8b814c4cd07ea19fb2b89c518bd 100644 (file)
@@ -78,7 +78,10 @@ class BVFSRestore extends BaculumAPIServer {
                        return;
                }
 
-               $cmd = array('.bvfs_restore', 'jobid="' .  $jobids . '"', 'path="' . $path . '"');
+               $cmd = array('.bvfs_restore', 'path="' . $path . '"');
+               if (is_string($jobids)) {
+                       array_push($cmd, 'jobid="' . $jobids . '"');
+               }
                if (is_string($fileids)) {
                        array_push($cmd, 'fileid="' . $fileids . '"');
                }