template::util::file::get_property (public)

 template::util::file::get_property what file_list

Defined in packages/acs-templating/tcl/file-procs.tcl

Return a property from a file datatype structure.

Parameters:
what (required)
Which property to return (filename, etc).
file_list (required)
The file datatype structure.
Returns:
The requested property from the file datatype structure.

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_widget_file template_widget_file (test acs-templating) template::util::file::get_property template::util::file::get_property test_template_widget_file->template::util::file::get_property ad_log ad_log (public) template::util::file::get_property->ad_log content::item::upload_file content::item::upload_file (public) content::item::upload_file->template::util::file::get_property packages/acs-subsite/www/user/portrait/upload.tcl packages/acs-subsite/ www/user/portrait/upload.tcl packages/acs-subsite/www/user/portrait/upload.tcl->template::util::file::get_property packages/acs-templating/www/scripts/xinha/attach-file.tcl packages/acs-templating/ www/scripts/xinha/attach-file.tcl packages/acs-templating/www/scripts/xinha/attach-file.tcl->template::util::file::get_property packages/acs-templating/www/scripts/xinha/attach-image.tcl packages/acs-templating/ www/scripts/xinha/attach-image.tcl packages/acs-templating/www/scripts/xinha/attach-image.tcl->template::util::file::get_property packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->template::util::file::get_property

Testcases:
template_widget_file
Source code:
    if {![string is list $file_list]} {
        #
        # An invalid list may come from a file_list supplied by a
        # malicious attacker.  Return empty in this case.
        #
        ad_log warning "Invalid list '$file_list'"
        return
    }

    switch -- $what {
        filename {
            return [lindex $file_list 0]
        }
        tmp_filename {
            return [lindex $file_list 1]
        }
        mime_type {
            return [lindex $file_list 2]
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: