/** * Forces the download of a file and shuts down. * Returns null if approved version wasn't found. * * @param File $file * @param null|int $rcID */ protected function force_download($file, $rcID = null) { $file->trackDownload($rcID); // Magic call to approved FileVersion return $file->forceDownload(); }