Request->contains('id') ? intval($this->Request['id']) : 0; $volume = $this->getModule('volume')->getVolumeById($mediaid); if(is_object($volume)) { $result = $this->getModule('bconsole')->bconsoleCommand( $this->director, array('purge', 'volume="' . $volume->volumename . '"', 'yes') ); $this->output = $result->output; $this->error = $result->exitcode; } else { $this->output = VolumeError::MSG_ERROR_VOLUME_DOES_NOT_EXISTS; $this->error = VolumeError::ERROR_VOLUME_DOES_NOT_EXISTS; } } } ?>