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.6 -r1.7 --- openacs-4/packages/acs-admin/www/apm/file-watch.tcl 31 Jan 2003 12:23:46 -0000 1.6 +++ openacs-4/packages/acs-admin/www/apm/file-watch.tcl 25 Feb 2003 16:57:20 -0000 1.7 @@ -1,48 +1,20 @@ 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,multiple -} -validate { - valid_version_id { - 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.} -} + version_id:integer + paths:multiple +} -set file_id_list $file_id +apm_version_info $version_id set count 0 -foreach file_id $file_id_list { +foreach path $paths { incr count - 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" lappend path_list $path