Index: openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 23 Sep 2002 16:21:06 -0000 1.9 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 28 Jan 2003 13:00:44 -0000 1.9.2.1 @@ -177,7 +177,10 @@ # If it's not a Tcl file, we can't do a heck of a lot yet. Eventually # we'll be able to handle ADPs, at least. - if { ![string equal [file extension $path] ".tcl"] } { + if { [string equal [file extension $path] ".xql"] } { + append out "
DB Query file
\n" + return $out + } elseif { ![string equal [file extension $path] ".tcl"] } { append out "
Delivered as [ns_guesstype $path]
\n" return $out } @@ -712,3 +715,35 @@ } { return "$proc" } + +ad_proc -private api_xql_links_list { path } { + + Returns list of xql files related to tcl script file + @param path path and filename from [acs_root_dir] + + +} { + + set linkList [list] + set filename "[acs_root_dir]/$path" + set path_dirname [file dirname $path] + set file_dirname [file dirname $filename] + set file_rootname [file rootname [file tail $filename]] + regsub {(-oracle|-postgresql)$} $file_rootname {} file_rootname + set files \ + [lsort -decreasing \ + [glob -nocomplain \ + -directory $file_dirname \ + "${file_rootname}{,-}{,oracle,postgresql}.{adp,tcl,xql}" ]] + + foreach file $files { + lappend linkList [list \ + filename $file \ + link "content-page-view?source_p=1&path=[ns_urlencode "$path_dirname/[file tail $file]"]" \ + ] + + } + + return $linkList + +}