Index: openacs-4/packages/download/tcl/download-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/download/tcl/download-procs.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/download/tcl/download-procs.tcl 6 Aug 2014 16:24:41 -0000 1.17
+++ openacs-4/packages/download/tcl/download-procs.tcl 27 Jun 2015 19:43:38 -0000 1.18
@@ -1,9 +1,9 @@
# /packages/download/tcl/download-procs.tcl
ad_library {
- Procs used by the download module.
- @author jbank@arsdigita.com [jbank@arsdigita.com]
- @creation-date Tue Dec 12 15:13:52 2000
- @cvs-id $Id$
+ Procs used by the download module.
+ @author jbank@arsdigita.com [jbank@arsdigita.com]
+ @creation-date Tue Dec 12 15:13:52 2000
+ @cvs-id $Id$
}
# @author jbank@arsdigita.com [jbank@arsdigita.com]
@@ -23,7 +23,9 @@
if { $admin_p } {
set repository_id [db_nextval acs_object_id_seq]
set return_url "[ad_conn package_url]admin/repository-types"
- ad_return_exception_page 200 "Not setup" "Please configure this instance of the download module."
+ 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 configure
+ this instance of the download module.}]
} else {
ad_return_exception_page 200 "Not setup" "Please have an admin configure this instance of the download module."
}
@@ -35,12 +37,13 @@
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]"
- ad_return_exceptio_page 200 "Not setup" "Please add a download type."
- ad_script_abort
- }
+ 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_exceptio_page 200 "Not setup" [subst {Please add a download type.}]
+ ad_script_abort
}
+ }
}
return [array get repository]
}
@@ -60,23 +63,23 @@
set html ""
set element_name "metadata.$metadata_id"
switch -- $data_type {
- "number" {
- append html ""
- }
- "integer" {
- append html ""
- }
- "shorttext" {
- append html ""
- }
+ "number" {
+ append html ""
+ }
+ "integer" {
+ append html ""
+ }
+ "shorttext" {
+ append html ""
+ }
- "text" {
- append html ""
- }
- "date" {
- append html "[ad_dateentrywidget $element_name $user_value]"
- }
- "boolean" {
+ "text" {
+ append html ""
+ }
+ "date" {
+ append html "[ad_dateentrywidget $element_name $user_value]"
+ }
+ "boolean" {
append html "