jobids : null; $fileids = property_exists($params, 'fileid') ? $params->fileid : null; $dirids = property_exists($params, 'dirid') ? $params->dirid : null; $path = property_exists($params, 'path') ? $params->path : null; $is_valid = true; if (!is_null($jobids)) { $jobidsList = explode(',', $jobids); if(is_array($jobidsList)) { for($i = 0; $i < count($jobidsList); $i++) { $job = $this->getModule('job')->getJobById($jobidsList[$i]); if(is_null($job)) { $is_valid = false; break; } } } else { $is_valid = false; } } else { $is_valid = false; } if($is_valid === true) { if(!is_null($path)) { $cmd = array('.bvfs_restore', 'jobid="' . $jobids . '"', 'path="' . $path . '"'); if(!is_null($fileids)) { array_push($cmd, 'fileid="' . $fileids . '"'); } if(!is_null($dirids)) { array_push($cmd, 'dirid="' . $dirids . '"'); } $result = $this->getModule('bconsole')->bconsoleCommand($this->director, $cmd, $this->user); $this->output = $result->output; $this->error = $result->exitcode; } else { $this->output = BVFSError::MSG_ERROR_INVALID_RPATH; $this->error = BVFSError::ERROR_INVALID_RPATH; } } else { $this->output = BVFSError::MSG_ERROR_JOB_DOES_NOT_EXISTS; $this->error = BVFSError::ERROR_JOB_DOES_NOT_EXISTS; } } } ?>