Request['id']); $job = $this->getModule('job')->getJobById($jobid); $allowedJobs = $this->getModule('bconsole')->bconsoleCommand($this->director, array('.jobs'), $this->user); if ($allowedJobs->exitcode === 0) { if(!is_null($job) && in_array($job->name, $allowedJobs->output)) { $this->output = $job; $this->error = JobError::ERROR_NO_ERRORS; } else { $this->output = JobError::MSG_ERROR_JOB_DOES_NOT_EXISTS; $this->error = JobError::ERROR_JOB_DOES_NOT_EXISTS; } } else { $this->output = $allowedJobs->output; $this->error = $allowedJobs->exitcode; } } public function remove($id) { $jobid = intval($id); $job = $this->getModule('job')->getJobById($jobid); if(!is_null($job)) { $delete = $this->getModule('bconsole')->bconsoleCommand($this->director, array('delete', 'jobid="' . $job->jobid . '"'), $this->user); $this->output = $delete->output; $this->error = (integer)$delete->exitcode; } else { $this->output = JobError::MSG_ERROR_JOB_DOES_NOT_EXISTS; $this->error = JobError::ERROR_JOB_DOES_NOT_EXISTS; } } } ?>