download_repository_info (public)
download_repository_info [ package_id ] [ do_redirect ]
Defined in packages/download/tcl/download-procs.tcl
Get information about the repository mounted for package_id.
- Parameters:
- package_id (optional)
- do_redirect (optional, defaults to
"1"
)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$package_id eq ""} { set package_id [ad_conn package_id] } if { ![db_0or1row repository_info { select repository_id, title, description, help_text from download_repository_obj where parent_id = :package_id } -column_array repository ] } { #Package not setup if { $do_redirect } { set admin_p [permission::permission_p -object_id $package_id -privilege "admin"] if { $admin_p } { set repository_id [db_nextval acs_object_id_seq] set return_url "[ad_conn package_url]admin/repository-types" set href [export_vars -base [ad_conn package_url]admin/repository-ae {repository_id return_url}] ad_return_exception_page 200 "Not setup" [subst {Please <a href="[ns_quotehtml $href]">configure this instance of the download module</a>.}] } else { ad_return_exception_page 200 "Not setup" "Please have an admin configure this instance of the download module." } ad_script_abort } } else { if { $do_redirect } { set repository_id $repository(repository_id) set count [db_string type_info { select count(*) from download_archive_types where repository_id = :repository_id }] if { $count == 0 } { set return_url "[ad_conn url]?[ad_conn query]" set href [export_vars -base [ad_conn package_url]admin/repository-types {repository_id return_url}] ad_return_exception_page 200 "Not setup" [subst {Please <a href="[ns_quotehtml $href]">add a download type</a>.}] ad_script_abort } } } return [array get repository]Generic XQL file: <fullquery name="download_repository_info.repository_info"> <querytext> select repository_id, title, description, help_text from download_repository_obj where parent_id = :package_id </querytext> </fullquery> <fullquery name="download_repository_info.type_info"> <querytext> select count(*) from download_archive_types where repository_id = :repository_id </querytext> </fullquery>packages/download/tcl/download-procs.xql
PostgreSQL XQL file: packages/download/tcl/download-procs-postgresql.xql
Oracle XQL file: packages/download/tcl/download-procs-oracle.xql