Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 19 Apr 2001 04:23:11 -0000 1.5 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 20 Apr 2001 14:20:34 -0000 1.6 @@ -323,7 +323,9 @@ # DRB: without the quotes ${base}www turns into the two element list # {${base} www}, not what was wanted... - set dirs [list "${base}www"] + + # SDW: look in www and all it's subdirectories + set dirs [apm_subdirs "${base}www"] set paths [list] # DRB: For now just slurp all .sql files @@ -355,6 +357,19 @@ ns_log Notice "APM/QD = DONE looping through files to load queries from" } +ad_proc -private apm_subdirs { path } { + + Returns a list of subdirectories of path (including path itself) + +} { + set dirs [list] + lappend dirs $path + foreach subdir [glob -nocomplain -type d [file join $path *]] { + set dirs [concat $dirs [apm_subdirs $subdir]] + } + return $dirs +} + ad_proc -private apm_pretty_name_for_file_type { type } { Returns the pretty name corresponding to a particular file type key