Index: openacs-4/packages/acs-admin/www/apm/file-watch.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/file-watch.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-admin/www/apm/file-watch.tcl 18 Sep 2002 14:54:45 -0000 1.5 +++ openacs-4/packages/acs-admin/www/apm/file-watch.tcl 31 Jan 2003 12:23:46 -0000 1.6 @@ -7,43 +7,52 @@ @creation-date 17 April 2000 @cvs-id $Id$ } { - file_id:integer + file_id:integer,multiple } -validate { valid_version_id { - set version_id [apm_version_from_file $file_id] - if {$version_id == 0} { - ad_complain - } + foreach single_file_id $file_id { + set version_id [apm_version_from_file $single_file_id] + if { $version_id == 0 } { + ad_complain + } + } } } -errors { valid_version_id {The file you have requested is not registerd.} } +set file_id_list $file_id -db_1row apm_get_file_to_watch { - select t.package_key, t.pretty_name, - v.version_name, v.package_key, v.installed_p, - f.path, f.version_id - from apm_package_types t, apm_package_versions v, apm_package_files f - where f.file_id = :file_id - and f.version_id = v.version_id - and v.package_key = t.package_key -} +set count 0 +foreach file_id $file_id_list { + incr count -# Why did we need all that information? -KS + db_1row apm_get_file_to_watch { + select t.package_key, t.pretty_name, + v.version_name, v.package_key, v.installed_p, + f.path, f.version_id + from apm_package_types t, apm_package_versions v, apm_package_files f + where f.file_id = :file_id + and f.version_id = v.version_id + and v.package_key = t.package_key + } + + # Why did we need all that information? -KS + + db_1row apm_get_path_from_file_id { + select path from apm_package_files where file_id = :file_id + } + + apm_file_watch "packages/$package_key/$path" -doc_body_append "[apm_header -form "method=post action=\"file-add-2\"" [list "version-view?version_id=$version_id" "$pretty_name $version_name"] [list "version-files?version_id=$version_id" "Files"] "Watch file"] - -" - -db_1row apm_get_path_from_file_id { - select path from apm_package_files where file_id = :file_id + lappend path_list $path } -apm_file_watch "packages/$package_key/$path" +doc_body_append "[apm_header -form "method=post action=\"file-add-2\"" [list "version-view?version_id=$version_id" "$pretty_name $version_name"] [list "version-files?version_id=$version_id" "Files"] "Watch file"]" -doc_body_append "Marking the following file to be watched: +doc_body_append "Marking the following files to be watched: + Return to the list of files for $pretty_name $version_name
Return to the Package Manager