Request->contains('limit') ? intval($this->Request['limit']) : 0; $offset = $this->Request->contains('offset') ? intval($this->Request['offset']) : 0; $jobids = null; if (property_exists($params, 'jobids') && $this->getModule('misc')->isValidIdsList($params->jobids)) { $jobids = $params->jobids; } $path = null; if (property_exists($params, 'path') && $this->getModule('misc')->isValidPath($params->path)) { $path = $params->path; } if (is_null($jobids)) { $this->output = BVFSError::MSG_ERROR_INVALID_JOBID_LIST; $this->error = BVFSError::ERROR_INVALID_JOBID_LIST; return; } if (is_null($path)) { $this->output = BVFSError::ERROR_INVALID_RESTORE_PATH; $this->error = BVFSError::MSG_ERROR_INVALID_RESTORE_PATH; return; } $cmd = array('.bvfs_lsfiles', 'jobid="' . $jobids . '"', 'path="' . $path . '"'); if ($offset > 0) { array_push($cmd, 'offset="' . $offset . '"'); } if ($limit > 0) { array_push($cmd, 'limit="' . $limit . '"'); } $result = $this->getModule('bconsole')->bconsoleCommand($this->director, $cmd); $this->output = $result->output; $this->error = $result->exitcode; } } ?>