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 -r1.5 -r1.5.2.1 --- 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 5 Mar 2003 14:43:12 -0000 1.5.2.1 @@ -1,49 +1,30 @@ ad_page_contract { Schedules a file to be watched. - - @param file_id The id of the file to watch. @author Jon Salz [jsalz@arsdigita.com] @creation-date 17 April 2000 @cvs-id $Id$ } { - file_id:integer -} -validate { - valid_version_id { - set version_id [apm_version_from_file $file_id] - if {$version_id == 0} { - ad_complain - } - } -} -errors { - valid_version_id {The file you have requested is not registerd.} -} + version_id:integer + paths:multiple +} +apm_version_info $version_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 path $paths { + incr count -# Why did we need all that information? -KS + 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