Index: openacs-4/packages/acs-templating/tcl/file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/file-procs.tcl,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/acs-templating/tcl/file-procs.tcl 5 Jul 2019 17:16:33 -0000 1.12.2.1 +++ openacs-4/packages/acs-templating/tcl/file-procs.tcl 8 Jul 2019 12:14:07 -0000 1.12.2.2 @@ -2,7 +2,6 @@ File procs } - namespace eval template {} namespace eval template::data {} namespace eval template::data::transform {} @@ -26,20 +25,36 @@ @return the list { file_name temp_file_name content_mime_type }. } { + if {[ns_info name] eq "NaviServer"} { + # + # NaviServer + # + # Get the files information using 'ns_querygetall' + # + set filenames [ns_querygetall $element_id] + set tmpfiles [ns_querygetall $element_id.tmpfile] + set types [ns_querygetall $element_id.content-type] + } else { + # + # AOLserver + # + # ns_querygetall behaves differently in AOLserver, using the ns_queryget + # legacy version instead + # + set filenames [ns_queryget $element_id] + set tmpfiles [ns_queryget $element_id.tmpfile] + set types [ns_queryget $element_id.content-type] + } # - # Get the files information using 'ns_querygetall' and return it in a list - # per file - # - set files [list] - set filenames [ns_querygetall $element_id] - # # No files, get out # if {$filenames eq ""} { return "" } - set tmpfiles [ns_querygetall $element_id.tmpfile] - set types [ns_querygetall $element_id.content-type] + # + # Return the files info in a list per file + # + set files [list] for {set file 0} {$file < [llength $filenames]} {incr file} { set filename [lindex $filenames $file] set tmpfile [lindex $tmpfiles $file] @@ -94,7 +109,6 @@ } - # Local variables: # mode: tcl # tcl-indent-level: 4