getModule('misc'); $jobids = property_exists($params, 'jobids') ? $params->jobids : null; $fileids = property_exists($params, 'fileid') ? $params->fileid : null; $dirids = property_exists($params, 'dirid') ? $params->dirid : null; $findexes = property_exists($params, 'findex') ? $params->findex : null; $path = property_exists($params, 'path') ? $params->path : null; if (!is_null($jobids) && !$misc->isValidIdsList($jobids)) { $this->output = BVFSError::MSG_ERROR_INVALID_JOBID_LIST; $this->error = BVFSError::ERROR_INVALID_JOBID_LIST; return; } if (!is_null($fileids) && !$misc->isValidIdsList($fileids)) { $this->output = BVFSError::MSG_ERROR_INVALID_FILEID_LIST; $this->error = BVFSError::ERROR_INVALID_FILEID_LIST; return; } if (!is_null($dirids) && !$misc->isValidIdsList($dirids)) { $this->output = BVFSError::MSG_ERROR_INVALID_DIRID_LIST; $this->error = BVFSError::ERROR_INVALID_DIRID_LIST; return; } if (!is_null($findexes) && !$misc->isValidIdsList($findexes)) { $this->output = BVFSError::MSG_ERROR_INVALID_FILEINDEX_LIST; $this->error = BVFSError::ERROR_INVALID_FILEINDEX_LIST; return; } if (!is_null($path) && !$misc->isValidBvfsPath($path)) { $this->output = BVFSError::MSG_ERROR_INVALID_RPATH; $this->error = BVFSError::ERROR_INVALID_RPATH; return; } $cmd = array('.bvfs_restore', 'jobid="' . $jobids . '"', 'path="' . $path . '"'); if (is_string($fileids)) { array_push($cmd, 'fileid="' . $fileids . '"'); } if (is_string($dirids)) { array_push($cmd, 'dirid="' . $dirids . '"'); } if (is_string($findexes)) { array_push($cmd, 'hardlink="' . $findexes . '"'); } $result = $this->getModule('bconsole')->bconsoleCommand($this->director, $cmd); $this->output = $result->output; $this->error = $result->exitcode; } } ?>