Index: openacs-4/tcl/zz-postload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/tcl/zz-postload.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/tcl/zz-postload.tcl 20 Apr 2001 20:40:31 -0000 1.2 +++ openacs-4/tcl/zz-postload.tcl 30 Jan 2003 22:51:00 -0000 1.3 @@ -29,19 +29,32 @@ } } -# OpenACS (ben) # 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} -set oacs_root [acs_root_dir] +# 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]}] +} + foreach dir $dirs { - set files [glob -nocomplain "${oacs_root}/$dir/*.xql"] + set files [ad_find_all_files -check_file_func __is_xql [acs_root_dir]/$dir] - ns_log Notice "QD=Postload files to load: $files" + ns_log Debug "QD=Postload files to load: $files" foreach file $files { db_qd_load_query_file $file } } +rename __is_xql {} + nsv_unset ad_after_server_initialization . Index: openacs-4/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/Attic/index-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/www/index-oracle.xql 11 May 2001 00:14:48 -0000 1.1 +++ openacs-4/www/index-oracle.xql 30 Jan 2003 22:51:28 -0000 1.2 @@ -5,7 +5,7 @@ 8.1.6 - + select site_node.url(node_id) as url, acs_object.name(object_id) as name from site_nodes Index: openacs-4/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/Attic/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/www/index-postgresql.xql 20 Apr 2001 20:40:31 -0000 1.1 +++ openacs-4/www/index-postgresql.xql 30 Jan 2003 22:51:28 -0000 1.2 @@ -5,7 +5,7 @@ 7.1 - + select site_node__url(node_id) as url, acs_object__name(object_id) as name from site_nodes Index: openacs-4/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/Attic/index.xql,v diff -u -r1.1 -r1.2 --- openacs-4/www/index.xql 11 May 2001 00:14:48 -0000 1.1 +++ openacs-4/www/index.xql 30 Jan 2003 22:51:28 -0000 1.2 @@ -1,6 +1,6 @@ - + select first_names || ' ' || last_name as name, email