Index: openacs-4/tcl/zz-postload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/tcl/zz-postload.tcl,v diff -u -N -r1.5.16.1 -r1.5.16.2 --- openacs-4/tcl/zz-postload.tcl 21 Aug 2013 11:27:04 -0000 1.5.16.1 +++ openacs-4/tcl/zz-postload.tcl 16 Oct 2014 08:44:26 -0000 1.5.16.2 @@ -7,7 +7,7 @@ ns_log "Notice" "Sourcing files for postload..." foreach file [glob -nocomplain ${::acs::tcllib}/*.tcl.postload] { ns_log Notice "postloading $file" - source "$file" + source $file } ns_log "Notice" "Done." @@ -22,32 +22,29 @@ set init(args) [lindex $init(args) 0] } if { [catch $init(args) error] } { - global errorInfo - ns_log "Error" "Error executing initialization code block $init(name) in $init(script): $errorInfo" + ns_log "Error" "Error executing initialization code block $init(name) in $init(script): $::errorInfo" } } -# We need to load query files for the top-level stuff in www and tcl -# dirs is the list of directories to walk for xql files. Packages .xql -# files are parsed elsewhere in the bootstrap process. -set dirs {www tcl} - # The __is_xql helper function is used to filter out just the xql files. # # It should return true for directories it should descend as well # If you had a large static tree with no .xql files you could return 0 on # the subdirectory and it would not be searched. proc __is_xql {arg} { - return [expr {[file isdir $arg] || [string match -nocase {*.xql} $arg]}] -} + return [expr {[file isdirectory $arg] || [file extension $arg] eq ".xql"}]} -foreach dir $dirs { - set files [ad_find_all_files -check_file_func __is_xql [acs_root_dir]/$dir] - - ns_log Debug "QD=Postload files to load: $files" +# We need to load query files for the top-level stuff in www and tcl +# dirs is the list of directories to walk for xql files. Packages .xql +# files are parsed elsewhere in the bootstrap process. +foreach dir {www tcl} { + + set files [ad_find_all_files -check_file_func __is_xql $::acs::rootdir/$dir] + ns_log Notice "QD=Postload files to load from $dir: $files" + foreach file $files { db_qd_load_query_file $file }