Index: openacs-4/packages/download/download.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/download.info,v diff -u -r1.11 -r1.12 --- openacs-4/packages/download/download.info 13 Jan 2005 13:57:50 -0000 1.11 +++ openacs-4/packages/download/download.info 12 Sep 2013 10:26:11 -0000 1.12 @@ -7,7 +7,7 @@ f f - + oracle postgresql @@ -19,8 +19,9 @@ OpenACS Intended to support downloads of versioned software and packages. UI needs work. - - + + + Index: openacs-4/packages/download/sql/postgresql/download-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/download/sql/postgresql/download-create.sql 12 Mar 2004 19:19:47 -0000 1.7 +++ openacs-4/packages/download/sql/postgresql/download-create.sql 12 Sep 2013 10:26:11 -0000 1.8 @@ -331,14 +331,15 @@ da.archive_id, da.archive_type_id, da.archive_desc_id, - desc_item.title as summary, - desc_item.description as description, - desc_item.mime_type as description_type, - desc_item.creation_user, - desc_item.creation_date, - desc_item.creation_ip - from download_archives da, cr_items cri, download_archive_descsi desc_item - where da.archive_desc_id = desc_item.revision_id and + crr.title as summary, + crr.description as description, + crr.mime_type as description_type, + o.creation_user, + o.creation_date, + o.creation_ip + from download_archives da, cr_items cri, cr_revisions crr, acs_objects o + where da.archive_desc_id = crr.revision_id and + da.archive_desc_id = o.object_id and da.archive_id = cri.item_id; create view download_arch_revisions_obj as 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.12 -r1.13 --- openacs-4/packages/download/tcl/download-procs.tcl 1 Mar 2005 00:01:29 -0000 1.12 +++ openacs-4/packages/download/tcl/download-procs.tcl 12 Sep 2013 10:26:11 -0000 1.13 @@ -19,11 +19,11 @@ } -column_array repository ] } { #Package not setup if { $do_redirect } { - set admin_p [ad_permission_p $package_id "admin"] + 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" - ad_return_exception_page 200 "Not setup" "Please configure this instance of the download module." + ad_return_exception_page 200 "Not setup" "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." } @@ -37,7 +37,7 @@ }] 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_return_exceptio_page 200 "Not setup" "Please add a download type." ad_script_abort } } @@ -139,7 +139,7 @@ ad_script_abort } - ad_require_permission $revision_id "read" + permission::require_permission -object_id $revision_id -privilege "read" ##Record the download for all time!! set double_click_p [db_string download_count "select count(*) from download_downloads where download_id = :download_id"] Index: openacs-4/packages/download/www/all-metadata.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/all-metadata.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/all-metadata.adp 7 Nov 2003 22:11:36 -0000 1.5 +++ openacs-4/packages/download/www/all-metadata.adp 12 Sep 2013 10:26:11 -0000 1.6 @@ -1,6 +1,7 @@ All @pretty_name;noquote@ All Metadata -@table;noquote@ + + Index: openacs-4/packages/download/www/all-metadata.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/all-metadata.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/www/all-metadata.tcl 24 Feb 2005 13:33:11 -0000 1.4 +++ openacs-4/packages/download/www/all-metadata.tcl 12 Sep 2013 10:26:11 -0000 1.5 @@ -21,17 +21,19 @@ set answer_column [download_metadata_column $data_type] set metadata_select "metadata$metadata_id" -set table_def [list \ - [list $metadata_select $pretty_name {} \ - "\$$metadata_select"] \ - {version_count "[_ download._Versions]" - {version_count $order} - {$version_count}} \ - {archive_count "[_ download._Files]" - {archive_count $order} - {$archive_count}} \ -] +if {$orderby eq ""} { + set orderby $metadata_select +} +set elements [list \ + $metadata_select {label $pretty_name display_template {@metadata.$metadata_select@} orderby "$metadata_select"} \ + version_count { label "[_ download._Versions]" orderby version_count } \ + archive_count { label "[_ download._Files]" orderby archive_count}] + +template::list::create -name metadata_list \ + -multirow metadata \ + -html {width "100%"} \ + -elements $elements -filters {metadata_id {}} set sql_query " select $answer_column as $metadata_select, @@ -41,12 +43,10 @@ where drd.revision_id = dar.revision_id and drd.metadata_id = :metadata_id group by $answer_column - [ad_order_by_from_sort_spec $orderby $table_def]" + [template::list::orderby_clause -orderby -name metadata_list]" -set table [ad_table \ - -Torderby $orderby \ - -Ttable_extra_html { width=100% } \ - -bind [ad_tcl_vars_to_ns_set metadata_id] \ - all_metadata_list $sql_query $table_def ] +db_multirow -extend {url_one_metadata} metadata all_metadata_list $sql_query { + set url_one_metadata [export_vars -base one-mestada {metadata_id}] +} ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/archive-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/archive-add-2.tcl 24 Mar 2004 03:33:42 -0000 1.3 +++ openacs-4/packages/download/www/archive-add-2.tcl 12 Sep 2013 10:26:11 -0000 1.4 @@ -27,10 +27,10 @@ ##Then insert into the download_revision_data set user_id [ad_conn user_id] set package_id [ad_conn package_id] -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] # check for write permission on this repository -ad_require_permission $repository_id write +permission::require_permission -object_id $repository_id -privilege write set approved_p [ad_decode $admin_p 0 [db_null] "t"] set approved_date [ad_decode $admin_p 0 [db_null] "sysdate"] Index: openacs-4/packages/download/www/archive-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/archive-add.adp 13 Jan 2005 13:57:51 -0000 1.5 +++ openacs-4/packages/download/www/archive-add.adp 12 Sep 2013 10:26:11 -0000 1.6 @@ -3,7 +3,7 @@ @context;noquote@
-<%= [export_form_vars archive_type_id return_url]%> +<%= [export_vars -form {archive_type_id return_url}]%>

#download.lt_Add_a_New_Software_Ar#

@@ -30,7 +30,7 @@ - @extra_form_elts@ + @extra_form_elts;noquote@ #download.lt_Version_Number_option# Index: openacs-4/packages/download/www/archive-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/www/archive-add.tcl 1 Mar 2005 00:01:29 -0000 1.4 +++ openacs-4/packages/download/www/archive-add.tcl 12 Sep 2013 10:26:11 -0000 1.5 @@ -19,7 +19,7 @@ set description $repository(description) set help_text $repository(help_text) -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] set extra_form_elts "" db_foreach metadata { Index: openacs-4/packages/download/www/archive-version-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/archive-version-add-2.tcl 10 Sep 2002 22:22:34 -0000 1.2 +++ openacs-4/packages/download/www/archive-version-add-2.tcl 12 Sep 2013 10:26:11 -0000 1.3 @@ -24,10 +24,10 @@ ##Then insert into the download_revision_data set repository_id [download_repository_id] set user_id [ad_conn user_id] -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] # check for write permission on this folder -ad_require_permission $archive_id write +permission::require_permission -object_id $archive_id -privilege write set approved_p [ad_decode $admin_p 0 [db_null] "t"] set approved_date [ad_decode $admin_p 0 [db_null] "sysdate"] Index: openacs-4/packages/download/www/archive-version-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/archive-version-add.adp 13 Jan 2005 13:57:51 -0000 1.5 +++ openacs-4/packages/download/www/archive-version-add.adp 12 Sep 2013 10:26:11 -0000 1.6 @@ -3,7 +3,7 @@ @context;noquote@ -<%= [export_form_vars archive_id return_url]%> +<%= [export_vars -form {archive_id return_url}]%>

#download.lt_Add_a_New_Archive_Rev#

@@ -13,7 +13,7 @@ - @extra_form_elts@ + @extra_form_elts;noquote@ #download.File# Index: openacs-4/packages/download/www/archive-version-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/archive-version-add.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/archive-version-add.tcl 12 Sep 2013 10:26:11 -0000 1.6 @@ -16,7 +16,7 @@ auth::require_login set repository_id [download_repository_id] -ad_require_permission $archive_id write +permission::require_permission -object_id $archive_id -privilege write if ![db_0or1row archive_info_select { select da.archive_name, Index: openacs-4/packages/download/www/download-verify.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/download-verify.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/download-verify.adp 13 Jan 2005 13:57:51 -0000 1.8 +++ openacs-4/packages/download/www/download-verify.adp 12 Sep 2013 10:26:12 -0000 1.9 @@ -10,7 +10,7 @@ - <%= [export_form_vars download_id revision_id] %> + <%= [export_vars -form {download_id revision_id}] %> #download.Reason_for_Download# @reason_widget;noquote@ Index: openacs-4/packages/download/www/download-verify.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/download-verify.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/download-verify.tcl 1 Mar 2005 00:01:29 -0000 1.8 +++ openacs-4/packages/download/www/download-verify.tcl 12 Sep 2013 10:26:12 -0000 1.9 @@ -12,9 +12,9 @@ set repository_id [download_repository_id] auth::require_login -ad_require_permission $revision_id "read" +permission::require_permission -object_id $revision_id -privilege "read" -set admin_p [ad_permission_p $repository_id admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] set approval "" if { $admin_p == 0 } { set approval "and dar.approved_p = 't'" Index: openacs-4/packages/download/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/www/index-oracle.xql 16 May 2001 09:41:05 -0000 1.4 +++ openacs-4/packages/download/www/index-oracle.xql 12 Sep 2013 10:26:12 -0000 1.5 @@ -45,7 +45,7 @@ acs_permission.permission_p(dar.revision_id, :user_id, 'read') = 't' $approval [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name download_list] Index: openacs-4/packages/download/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/www/index-postgresql.xql 16 May 2001 09:41:05 -0000 1.4 +++ openacs-4/packages/download/www/index-postgresql.xql 12 Sep 2013 10:26:12 -0000 1.5 @@ -45,7 +45,7 @@ acs_permission__permission_p(dar.revision_id, :user_id, 'read') = 't' $approval [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name download_list] Index: openacs-4/packages/download/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/download/www/index.adp 13 Jan 2005 13:57:51 -0000 1.9 +++ openacs-4/packages/download/www/index.adp 12 Sep 2013 10:26:12 -0000 1.10 @@ -1,3 +1,4 @@ + @title;noquote@ @@ -8,17 +9,18 @@
#download.Help#
@description@ - + -

#download.You_must# register +

#download.You_must# register #download.lt_before_you_can_downlo#

- +
@dimensional_html;noquote@

-@table;noquote@ + +

#download.lt_Upload_a_New_Version_#

    Index: openacs-4/packages/download/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/index.tcl 1 Mar 2005 00:01:29 -0000 1.8 +++ openacs-4/packages/download/www/index.tcl 12 Sep 2013 10:26:12 -0000 1.9 @@ -24,9 +24,9 @@ array set repository [download_repository_info] set repository_id $repository(repository_id) -set master_admin_p [ad_permission_p [ad_conn package_id] admin] -set admin_p [ad_permission_p $repository_id admin] -set write_p [ad_permission_p $repository_id write] +set master_admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] +set admin_p [permission::permission_p -object_id $repository_id -privilege admin] +set write_p [permission::permission_p -object_id $repository_id -privilege write] set title $repository(title) set description $repository(description) @@ -67,16 +67,27 @@ set approval " and dar.approved_p = 't' " } +set element_list { + archive_name { + label "Software Name" + display_template { + + +  @downloads_multirow.archive_name@ @downloads_multirow.version_name@ +  (@downloads_multirow.file_size@k)
    @downloads_multirow.summary@ + } + orderby "archive_name" + } + archive_type { + label "Software Type" + orderby "archive_type" + } + downloads { + label "# Downloads" + orderby "downloads" + } +} -set table_def [list \ - [list archive_name "[_ download.Software_Name_1]"\ - {lower(archive_name) $order} \ - {  $archive_name $version_name  (${file_size}k)
    $summary} - ] \ - [list archive_type "[_ download.Software_Type]" "" ""] \ - [list downloads "[_ download._Downloads]" "" ""] \ - ] - #Setup the metadata set metadata_selects "" db_foreach metadata { @@ -95,67 +106,54 @@ append metadata_selects ", (select $answer_column from download_revision_data where revision_id = dar.revision_id and metadata_id = $metadata_id) as $metadata_select " if { $linked_p == "t" } { - set display "\$$metadata_select" + set display "@downloads_multirow.$metadata_select@" } else { set display "" } - lappend table_def [list $metadata_select $pretty_name {} $display] + lappend element_list $metadata_select [list label $pretty_name display_template $display] } ##Add on the metadata columns if { $admin_p } { - lappend table_def [list dar.approved_p "[_ download.Approval]" \ - {} \ - { \ - [ad_decode $approved_p \ - "t" "approved - \[ - reject\]" \ - "f" "rejected - \[ - approve\]" \ - "pending - \[ - approve | - reject\] - "] - }] + lappend element_list approved_p { + label "[_ download.Approval]" + display_template { + @downloads_multirow.approved_text@ + \[@downloads_multirow.approved_action@\] + } } +} -set sql_query " -select da.archive_id, - dat.pretty_name as archive_type, - da.archive_type_id, - da.archive_name, - da.summary, - dar.revision_id, - dar.file_name, - dar.version_name, - dbms_lob.getlength(dar.content) as file_size, - (select count(*) from download_downloads where revision_id = dar.revision_id) as downloads, - dar.approved_p - $metadata_selects -from download_archives_obj da, - download_archive_types dat, - download_arch_revisions_obj dar -where da.repository_id = :repository_id and - dat.archive_type_id = da.archive_type_id and - da.archive_id = dar.archive_id and - acs_permission.permission_p(dar.revision_id, :user_id, 'read') = 't' - $approval - [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def]" +template::list::create -name download_list \ + -multirow downloads_multirow \ + -elements $element_list \ + -filters {archive_type_id {} query_string {} updated {}} -set dimensional_html [ad_dimensional $dimensional] -set table [ad_table \ - -Torderby $orderby \ - -Tband_colors {{} {\"\#cccccc\"}} \ - -bind [ad_tcl_vars_to_ns_set user_id repository_id] \ - -Ttable_extra_html { cellpadding=3 } \ - download_index_query $sql_query $table_def ] +set img_url "[ad_conn package_url]/graphics/download.gif" +db_multirow -extend {metadata_url download_img revision_url download_url approved_color approved_text approved_url approved_action reject_url} downloads_multirow download_index_query {*} { + set download_img $img_url + if {$approved_p} { + set approved_url [export_vars -base admin/approve-or-reject {{action reject} revision_id return_url}] + set approved_text "approved" + set approved_color green + set approved_action "reject" + } else { + set approved_url [export_vars -base admin/approve-or-reject {{action approve} revision_id return_url}] + set approved_text "rejected" + set approved_action approve + set approved_color red + } + set download_url "download/$file_name?revision_id=$revision_id" + set revision_url "one-revision?revision_id=$revision_id" + set metadata_url [export_vars -base one-metadata {metadata_id}] +} + + +set dimensional_html [ad_dimensional $dimensional] + db_multirow types types_select { select archive_type_id, pretty_name, description from download_archive_types where repository_id = :repository_id } @@ -177,4 +175,4 @@ -ad_return_template \ No newline at end of file +ad_return_template Index: openacs-4/packages/download/www/one-archive.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-archive.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/one-archive.tcl 24 Feb 2005 13:33:12 -0000 1.8 +++ openacs-4/packages/download/www/one-archive.tcl 12 Sep 2013 10:26:12 -0000 1.9 @@ -9,11 +9,11 @@ archive_id:integer,notnull } -ad_require_permission $archive_id read +permission::require_permission -object_id $archive_id -privilege read -set master_admin_p [ad_permission_p [ad_conn package_id] admin] -set admin_p [ad_permission_p $archive_id admin] -set write_p [ad_permission_p $archive_id write] +set master_admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] +set admin_p [permission::permission_p -object_id $archive_id -privilege admin] +set write_p [permission::permission_p -object_id $archive_id -privilege write] if ![db_0or1row archive_info_select { select da.archive_name, Index: openacs-4/packages/download/www/one-revision.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-revision.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/download/www/one-revision.adp 13 Jan 2005 13:57:52 -0000 1.7 +++ openacs-4/packages/download/www/one-revision.adp 12 Sep 2013 10:26:12 -0000 1.8 @@ -13,7 +13,7 @@ [#download.Download_Now#] - [>#download.See_All_Versions#]
      + [#download.See_All_Versions#]
     

    #download.Summary# @summary@ Index: openacs-4/packages/download/www/one-revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-revision.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/download/www/one-revision.tcl 24 Feb 2005 13:33:12 -0000 1.10 +++ openacs-4/packages/download/www/one-revision.tcl 12 Sep 2013 10:26:12 -0000 1.11 @@ -13,11 +13,11 @@ } set repository_id [download_repository_id] -set admin_p [ad_permission_p $revision_id "admin"] -set master_admin_p [ad_permission_p [ad_conn package_id] admin] +set admin_p [permission::permission_p -object_id $revision_id -privilege "admin"] +set master_admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] ##FIXME: Need to do the metadata thing here! -ad_require_permission $revision_id "read" +permission::require_permission -object_id $revision_id -privilege "read" set archive_type_id [db_string get_archive_type "select archive_type_id from download_arch_revisions_obj dar, download_archives da where dar.archive_id = da.archive_id and dar.revision_id = :revision_id"] Index: openacs-4/packages/download/www/admin/approve-or-reject-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/approve-or-reject-2.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/admin/approve-or-reject-2.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/approve-or-reject-2.tcl 12 Sep 2013 10:26:12 -0000 1.6 @@ -22,7 +22,7 @@ set repository_id $repository_info(repository_id) set user_id [ad_conn user_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" if { $action == "approve" } { set approved_p "t" @@ -54,7 +54,7 @@ ad_returnredirect $return_url # do not abort/return here! -if {[ad_parameter -package_id [ad_conn package_id] "approval_notification" "download" 1] == 1} { +if {[parameter::get -package_id [ad_conn package_id] -parameter approval_notification -default 1] == 1} { # We want to send email to use who submitted the version to let # them know it's approved (or rejected). Index: openacs-4/packages/download/www/admin/approve-or-reject.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/approve-or-reject.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/download/www/admin/approve-or-reject.adp 13 Jan 2005 13:57:52 -0000 1.6 +++ openacs-4/packages/download/www/admin/approve-or-reject.adp 12 Sep 2013 10:26:12 -0000 1.7 @@ -4,7 +4,7 @@ - <%= [export_form_vars return_url action revision_id] %> + <%= [export_vars -form {return_url action revision_id}] %> Index: openacs-4/packages/download/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/index.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/index.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/index.tcl 12 Sep 2013 10:26:12 -0000 1.3 @@ -13,6 +13,6 @@ set description $repository(description) set help_text $repository(help_text) -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-by-ip.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-ip.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/download/www/admin/report-by-ip.adp 13 Jan 2005 13:57:52 -0000 1.9 +++ openacs-4/packages/download/www/admin/report-by-ip.adp 12 Sep 2013 10:26:12 -0000 1.10 @@ -10,4 +10,5 @@

    @dimensional_html;noquote@ -@table;noquote@ + + \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-by-ip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-ip.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/download/www/admin/report-by-ip.tcl 16 Jan 2003 13:46:20 -0000 1.7 +++ openacs-4/packages/download/www/admin/report-by-ip.tcl 12 Sep 2013 10:26:12 -0000 1.8 @@ -24,20 +24,28 @@ {all "all" {}}}} } -set table_def { - {download_ip "From IP" - {no_sort} - {}} - {download_hostname "Hostname" {} {}} - {num_downloads "# Downloads" {no_sort} {}} -} +template::list::create -name ips_list \ + -multirow ips \ + -html {width "90%" align center} \ + -elements { + download_ip { + label "From IP" + link_url_col one_ip_url + } + download_hostname { + label "Hostname" + } + num_downloads { + label "# Downloads" + } + } set dimensional_html [ad_dimensional $dimensional] -set table [ad_table \ - -Ttable_extra_html { width="90%" align="center" } \ - -bind [ad_tcl_vars_to_ns_set repository_id downloaded] \ - download_table { *SQL* } $table_def ] +db_multirow -extend {one_ip_url} ips download_table { *SQL* } { + set one_ip_url [export_vars -base report-one-ip {download_ip downloaded}] +} + # query users to spam set user_id_list [db_list users_to_spam { *SQL* }] set user_id_list_export [export_vars -form -sign user_id_list] Index: openacs-4/packages/download/www/admin/report-by-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-user.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/admin/report-by-user.adp 13 Jan 2005 13:57:52 -0000 1.8 +++ openacs-4/packages/download/www/admin/report-by-user.adp 12 Sep 2013 10:26:12 -0000 1.9 @@ -10,4 +10,4 @@

    @dimensional_html;noquote@ -@table;noquote@ + Index: openacs-4/packages/download/www/admin/report-by-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-user.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/download/www/admin/report-by-user.tcl 16 Jan 2003 13:46:20 -0000 1.7 +++ openacs-4/packages/download/www/admin/report-by-user.tcl 12 Sep 2013 10:26:12 -0000 1.8 @@ -24,19 +24,28 @@ {all "all" {}}}} } -set table_def { - {user_name "User Name (Last name, first name)" - {no_sort} - {}} - {num_downloads "# Downloads" {no_sort} {}} -} - set dimensional_html [ad_dimensional $dimensional] -set table [ad_table \ - -Ttable_extra_html { width="90%" align="center" } \ - -bind [ad_tcl_vars_to_ns_set repository_id downloaded] \ - download_table { *SQL* } $table_def ] +template::list::create -name users_list \ + -multirow users \ + -html { width "90%" align center} \ + -elements { + user_name { + label "User Name (Last name, first name)" + display_template { + @users.user_name@ + (@users.email@) + } + } + num_downloads { + label "# Downloads" + } + } + +db_multirow -extend {report_one_url} users download_table { *SQL* } { + set report_one_url "[export_vars -base report-one-user {user_id downloaded}]" +} + # query users to spam set user_id_list [db_list users_to_spam { *SQL* }] set user_id_list_export [export_vars -form -sign user_id_list] Index: openacs-4/packages/download/www/admin/report-one-ip-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-ip-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/report-one-ip-oracle.xql 16 Jan 2003 13:46:20 -0000 1.3 +++ openacs-4/packages/download/www/admin/report-one-ip-oracle.xql 12 Sep 2013 10:26:12 -0000 1.4 @@ -22,7 +22,7 @@ and dr.download_reason_id(+) = d.reason_id and u.user_id = d.user_id [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name history_list] Index: openacs-4/packages/download/www/admin/report-one-ip-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-ip-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/report-one-ip-postgresql.xql 16 Jan 2003 13:46:20 -0000 1.2 +++ openacs-4/packages/download/www/admin/report-one-ip-postgresql.xql 12 Sep 2013 10:26:12 -0000 1.3 @@ -27,7 +27,7 @@ and d.download_ip = :download_ip and u.user_id = d.user_id [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name history_list] Index: openacs-4/packages/download/www/admin/report-one-ip.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-ip.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/admin/report-one-ip.adp 13 Jan 2005 13:57:52 -0000 1.8 +++ openacs-4/packages/download/www/admin/report-one-ip.adp 12 Sep 2013 10:26:12 -0000 1.9 @@ -10,4 +10,5 @@

    @dimensional_html;noquote@ -@table;noquote@ + + \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-one-ip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-ip.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/download/www/admin/report-one-ip.tcl 16 Jan 2003 13:46:20 -0000 1.6 +++ openacs-4/packages/download/www/admin/report-one-ip.tcl 12 Sep 2013 10:26:12 -0000 1.7 @@ -28,31 +28,42 @@ } } +template::list::create -name history_list \ + -multirow history \ + -html {width "90%" align center} \ + -elements { + archive_name { + label "Archive" + link_url_col url_archive + orderby archive_name + } + version_name { + label "Version" + link_url_col url_archive + orderby version_name + } + user_name { + label "User Name" + link_url_col url_one_user + orderby user_name + } + download_date { + label "Download Date" + orderby download_date + } + reason { + label "Download Reason" + orderby reason + } + } -filters {download_ip {} downloaded {}} -set table_def { - {archive_name "Archive" - {archive_name $order} - {}} - {version_name "Version" - {version_name $order} - {}} - {user_name "User Name" - {user_name} - {}} - {download_date "Download Date" - {download_date} - {}} - {reason "Download Reason" - {reason} - {}} -} - set dimensional_html [ad_dimensional $dimensional] -set table [ad_table \ - -Ttable_extra_html { width="90%" align="center" } \ - -bind [ad_tcl_vars_to_ns_set repository_id download_ip] \ - download_table { *SQL* } $table_def ] +db_multirow -extend {url_one_user url_archive} history download_table { *SQL* } { + set url_archive [export_vars -base "../one-revision" {archive_id}] + set url_one_user [export_vars -base "report-one-user" {user_id downloaded}] +} + # query users to spam set user_id_list [db_list users_to_spam { *SQL* }] set user_id_list_export [export_vars -form -sign user_id_list] Index: openacs-4/packages/download/www/admin/report-one-user-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-user-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/report-one-user-oracle.xql 16 Jan 2003 13:46:20 -0000 1.3 +++ openacs-4/packages/download/www/admin/report-one-user-oracle.xql 12 Sep 2013 10:26:12 -0000 1.4 @@ -20,7 +20,7 @@ and d.user_id = :user_id and dr.download_reason_id(+) = d.reason_id [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name history_list] Index: openacs-4/packages/download/www/admin/report-one-user-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-user-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/report-one-user-postgresql.xql 16 Jan 2003 13:46:20 -0000 1.2 +++ openacs-4/packages/download/www/admin/report-one-user-postgresql.xql 12 Sep 2013 10:26:12 -0000 1.3 @@ -24,7 +24,7 @@ and d.revision_id = dar.revision_id and d.user_id = :user_id [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name history_list] Index: openacs-4/packages/download/www/admin/report-one-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-user.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/download/www/admin/report-one-user.adp 13 Jan 2005 13:57:52 -0000 1.7 +++ openacs-4/packages/download/www/admin/report-one-user.adp 12 Sep 2013 10:26:12 -0000 1.8 @@ -3,4 +3,5 @@ @context;noquote@ @dimensional_html;noquote@ -@table;noquote@ + + Index: openacs-4/packages/download/www/admin/report-one-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-user.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/download/www/admin/report-one-user.tcl 16 Jan 2003 13:46:20 -0000 1.6 +++ openacs-4/packages/download/www/admin/report-one-user.tcl 12 Sep 2013 10:26:12 -0000 1.7 @@ -27,31 +27,46 @@ } -set table_def { - {archive_name "Archive" - {archive_name $order} - {}} - {version_name "Version" - {version_name $order} - {}} - {download_date "Download Date" - {download_date} - {}} - {download_ip "From IP" - {download_ip} - {}} - {reason "Download Reason" - {reason} - {}} -} +template::list::create -name history_list \ + -multirow history \ + -html { width "90%" align "center"} \ + -elements { + archive_name { + label "Archive" + link_url_col url_archive_id + orderby archive_name + } + version_name { + label "Version" + link_url_col url_archive_id + orderby version_name + } + download_date { + label "Download Date" + orderby download_date + } + download_ip { + label "From IP" + display_template { + @history.download_ip@ (@history.download_hostname@) + } + orderby download_ip + } + reason { + label "Download Reason" + orderby reason + } + } -filters {user_id {} downloaded {}} db_1row name_select { *SQL* } set dimensional_html [ad_dimensional $dimensional] -set table [ad_table \ - -Ttable_extra_html { width="90%" align="center" } \ - -bind [ad_tcl_vars_to_ns_set repository_id user_id] \ - download_table { *SQL* } $table_def ] +db_multirow -extend {url_one_ip url_archive_id} history download_table { *SQL* } { + set url_archive_id [export_vars -base "../one-revision" {revision_id}] + set url_one_ip [export_vars -base "report-one-ip" {download_ip downloaded}] +} + + set context [list [list "report-by-user" "Downloads by User"] "$first_names $last_name"] ad_return_template Index: openacs-4/packages/download/www/admin/report-version-downloads-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/report-version-downloads-oracle.xql 16 Jan 2003 13:46:20 -0000 1.3 +++ openacs-4/packages/download/www/admin/report-version-downloads-oracle.xql 12 Sep 2013 10:26:12 -0000 1.4 @@ -21,7 +21,7 @@ and dar.revision_id = d.revision_id and dr.download_reason_id(+) = d.reason_id [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name download_list] Index: openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql 16 Jan 2003 13:46:20 -0000 1.3 +++ openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql 12 Sep 2013 10:26:12 -0000 1.4 @@ -23,7 +23,7 @@ and dar.archive_id = :archive_id and dar.revision_id = d.revision_id [ad_dimensional_sql $dimensional where] - [ad_order_by_from_sort_spec $orderby $table_def] + [template::list::orderby_clause -orderby -name download_list] Index: openacs-4/packages/download/www/admin/report-version-downloads.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/download/www/admin/report-version-downloads.adp 13 Jan 2005 13:57:52 -0000 1.8 +++ openacs-4/packages/download/www/admin/report-version-downloads.adp 12 Sep 2013 10:26:12 -0000 1.9 @@ -12,4 +12,4 @@ @dimensional_html;noquote@
    #download.lt_Total_downloads_liste#
    -@table;noquote@ + Index: openacs-4/packages/download/www/admin/report-version-downloads.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/download/www/admin/report-version-downloads.tcl 16 Jan 2003 13:46:20 -0000 1.6 +++ openacs-4/packages/download/www/admin/report-version-downloads.tcl 12 Sep 2013 10:26:12 -0000 1.7 @@ -6,7 +6,7 @@ @cvs-id $Id$ } { {archive_id:integer,notnull} - {orderby "last_name"} + {orderby "user_name"} {downloaded 1m} {versions "current"} } -properties { @@ -21,7 +21,7 @@ set repository_id [download_repository_id] -ad_require_permission $archive_id "admin" +permission::require_permission -object_id $archive_id -privilege "admin" set dimensional { {versions "Versions" current { @@ -37,35 +37,52 @@ }} } -set table_def { - {user_name "User Name" - {user_name $order} - {}} - {version_name "Version" - {version_name $order} - {}} - {download_date "Download Date" - {download_date $order} - {}} - {download_ip "From IP (hostname)" - {download_ip $order} - {}} - {reason "Download Reason" - {reason $order} - {}} -} +template::list::create -name download_list \ + -multirow downloads \ + -html {width "90%" align center} \ + -elements { + user_name { + label "User Name" + orderby user_name + link_url_col url_one_user + } + version_name { + label "Version" + orderby version_name + link_url_col url_one_revision + + } + download_date { + label "Download Date" + orderby download_date + } + download_ip { + label "From IP (hostname)" + orderby download_ip + display_template { + @downloads.download_ip@ (@downloads.download_hostname@) + } + } + reason { + label "Download Reason" + orderby reason + } + } -filters {archive_id {} downloaded {} versions {}} db_1row name_select { *SQL* } set current_count [db_string current_count { *SQL* }] set total_count [db_string total_count { *SQL* }] set dimensional_html [ad_dimensional $dimensional] -set table [ad_table \ - -Ttable_extra_html { width="90%" align="center" } \ - -bind [ad_tcl_vars_to_ns_set archive_id] \ - download_table { *SQL* } $table_def ] +set pkg_url [ad_conn package_url] +db_multirow -extend {url_one_ip url_one_revision url_one_user} downloads download_table { *SQL* } { + set url_one_user [export_vars -base report-one-user {user_id}] + set url_one_revision [export_vars -base "${pkg_url}one-revision" {revision_id downloaded}] + set url_one_ip [export_vars -base report-one-ip {download_ip downloaded}] +} + # query users to spam set user_id_list [db_list users_to_spam { *SQL* }] set user_id_list_export [export_vars -form -sign user_id_list] Index: openacs-4/packages/download/www/admin/repository-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-ae.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/admin/repository-ae.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/repository-ae.tcl 12 Sep 2013 10:26:13 -0000 1.6 @@ -11,7 +11,7 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] -ad_require_permission $package_id "admin" +permission::require_permission -object_id $package_id -privilege "admin" form create ae_repository element create ae_repository return_url -label "ReturnUrl" -datatype text -widget hidden Index: openacs-4/packages/download/www/admin/repository-metadata-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-delete.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/repository-metadata-delete.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-metadata-delete.tcl 12 Sep 2013 10:26:13 -0000 1.3 @@ -9,7 +9,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_dml metadata_delete { delete from download_archive_metadata where metadata_id = :metadata_id Index: openacs-4/packages/download/www/admin/repository-metadata-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-edit.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/www/admin/repository-metadata-edit.tcl 18 Sep 2002 13:06:33 -0000 1.4 +++ openacs-4/packages/download/www/admin/repository-metadata-edit.tcl 12 Sep 2013 10:26:13 -0000 1.5 @@ -11,7 +11,7 @@ set context [list "Metadata edit"] set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_0or1row metadata_select { select Index: openacs-4/packages/download/www/admin/repository-metadata-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-edit.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/repository-metadata-edit.xql 22 May 2001 04:17:45 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-metadata-edit.xql 12 Sep 2013 10:26:13 -0000 1.3 @@ -17,7 +17,7 @@ dam.mainpage_p, dam.computed_p from download_archive_metadata dam left join download_archive_types dat - using archive_type_id + using (archive_type_id) where dam.repository_id = :repository_id and dam.metadata_id = :metadata_id order by archive_type_id Index: openacs-4/packages/download/www/admin/repository-reasons-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-delete.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/repository-reasons-delete.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-reasons-delete.tcl 12 Sep 2013 10:26:13 -0000 1.3 @@ -9,7 +9,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_dml reason_delete { delete from download_reasons where download_reason_id = :download_reason_id Index: openacs-4/packages/download/www/admin/repository-reasons-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/admin/repository-reasons-edit.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/repository-reasons-edit.tcl 12 Sep 2013 10:26:13 -0000 1.6 @@ -11,7 +11,7 @@ set repository_id [download_repository_id] set user_id [ad_conn user_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" form create edit_reason element create edit_reason download_reason_id -label "Reason ID" -datatype integer -widget hidden Index: openacs-4/packages/download/www/admin/repository-reasons.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/repository-reasons.tcl 10 Sep 2002 22:22:35 -0000 1.3 +++ openacs-4/packages/download/www/admin/repository-reasons.tcl 12 Sep 2013 10:26:13 -0000 1.4 @@ -8,7 +8,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" set title "Download Repository Download Reasons" set context [list "Download Reasons"] Index: openacs-4/packages/download/www/admin/repository-types-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-delete.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/repository-types-delete.tcl 10 Sep 2002 22:22:35 -0000 1.2 +++ openacs-4/packages/download/www/admin/repository-types-delete.tcl 12 Sep 2013 10:26:13 -0000 1.3 @@ -9,7 +9,7 @@ } set repository_id [download_repository_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" db_dml type_delete { delete from download_archive_types where repository_id = :repository_id and archive_type_id = :archive_type_id Index: openacs-4/packages/download/www/admin/repository-types-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/admin/repository-types-edit.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/repository-types-edit.tcl 12 Sep 2013 10:26:13 -0000 1.6 @@ -11,7 +11,7 @@ set repository_id [download_repository_id] set user_id [ad_conn user_id] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" form create edit_type element create edit_type archive_type_id -label "ArchiveType ID" -datatype integer -widget hidden Index: openacs-4/packages/download/www/admin/repository-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/repository-types.tcl 10 Sep 2002 22:22:35 -0000 1.3 +++ openacs-4/packages/download/www/admin/repository-types.tcl 12 Sep 2013 10:26:13 -0000 1.4 @@ -8,7 +8,7 @@ } set repository_id [download_repository_id [ad_conn package_id] 0] -ad_require_permission $repository_id "admin" +permission::require_permission -object_id $repository_id -privilege "admin" set title "Download Repository Archive Types" set context [list "Archive Types"] Index: openacs-4/packages/download/www/admin/spam-users-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/download/www/admin/spam-users-2.tcl 1 Mar 2005 00:01:29 -0000 1.6 +++ openacs-4/packages/download/www/admin/spam-users-2.tcl 12 Sep 2013 10:26:13 -0000 1.7 @@ -10,7 +10,7 @@ msgbody:notnull } -ad_require_permission [ad_conn package_id] "admin" +permission::require_permission -object_id [ad_conn package_id] -privilege "admin" set user_id [ad_conn user_id] Index: openacs-4/packages/download/www/admin/spam-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/download/www/admin/spam-users.tcl 1 Mar 2005 00:01:29 -0000 1.5 +++ openacs-4/packages/download/www/admin/spam-users.tcl 12 Sep 2013 10:26:13 -0000 1.6 @@ -14,7 +14,7 @@ no_spam_count:onevalue } -ad_require_permission [ad_conn package_id] "admin" +permission::require_permission -object_id [ad_conn package_id] -privilege "admin" set user_id [ad_conn user_id] # get name, email and
    [#download.Version_History#]
    $download_ip$user_name ($email) $archive_name$version_name$user_name $archive_name$version_name$download_ip ($download_hostname) $user_name$version_name$download_ip ($download_hostname)$reason