Index: openacs-4/packages/file-storage/www/download-zip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/download-zip.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/www/download-zip.tcl 16 Jan 2007 17:44:55 -0000 1.1 +++ openacs-4/packages/file-storage/www/download-zip.tcl 1 Mar 2007 11:59:11 -0000 1.2 @@ -47,6 +47,8 @@ # return the archive to the connection. ns_set put [ad_conn outputheaders] Content-Disposition "attachment;filename=\"$download_name\"" +ns_set put [ad_conn outputheaders] Content-Type "application/zip" +ns_set put [ad_conn outputheaders] Content-Size "[file size $out_file]" ns_returnfile 200 application/octet-stream $out_file # clean everything up Index: openacs-4/packages/file-storage/www/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/view/index.vuh,v diff -u -r1.4 -r1.5 --- openacs-4/packages/file-storage/www/view/index.vuh 17 Jan 2007 15:41:16 -0000 1.4 +++ openacs-4/packages/file-storage/www/view/index.vuh 1 Mar 2007 11:59:11 -0000 1.5 @@ -23,11 +23,6 @@ -root_folder_id $content_root \ -resolve_index "f"] -if {[apm_package_installed_p views]} { - set user_id [ad_conn user_id] - views::record_view -object_id $file_id -viewer_id $user_id -} - # Serve the page # DRB: Note that content::init modifies the local variable the_root, which is treated @@ -68,6 +63,11 @@ set user_id [ad_conn user_id] + if {[apm_package_installed_p views]} { + set user_id [ad_conn user_id] + views::record_view -object_id $file_id -viewer_id $user_id + } + ad_require_permission $version_id "read" cr_write_content -revision_id $version_id }