download_version_admin_authorize db version_idWhat it does:
given version_id, this procedure will check whether the user has administration rights over this download. if download doesn't exist page is served to the user informing him that the download doesn't exist. if successfull it will return user_id of administrator.Defined in: /web/philip/tcl/download-defs.tcl
Source code:
set selection [ns_db 0or1row $db "select download_id from download_versions where version_id = $version_id "] if { [empty_string_p $selection] } { ad_scope_return_complaint 1 "Download Version Doesn't Exist" $db return -code } set_variables_after_query return [download_admin_authorize $db $download_id]