/** * get a public file * @param $id the repository id of the file * @return file url */ function get_public_file(){ $id = array_var($_GET, 'id', 0); if (FileRepository::isInRepository($id) && FileRepository::getFileAttribute($id, 'public', false)) { $type = FileRepository::getFileAttribute($id,'type'); download_from_repository($id, $type, $id, false); die(); } // if die(lang('file dnx')); }// get_public_file