rp_resources_filter_aolserver

 rp_resources_filter_aolserver

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 rp_resources_filter rp_resources_filter (private) rp_resources_filter_aolserver rp_resources_filter_aolserver rp_resources_filter->rp_resources_filter_aolserver acs_package_root_dir acs_package_root_dir (public) rp_resources_filter_aolserver->acs_package_root_dir ad_conn ad_conn (public) rp_resources_filter_aolserver->ad_conn ad_file ad_file (public) rp_resources_filter_aolserver->ad_file rp_serve_resource_file rp_serve_resource_file (private) rp_resources_filter_aolserver->rp_serve_resource_file

Testcases:
No testcase defined.
Source code:
    if {[namespace which ::valgrind] ne ""} {
        ::valgrind start
    }

    ad_conn -set untrusted_user_id 0

    set urlv [ns_conn urlv]
    set package_key [lindex $urlv 1]
    set resource [join [lrange $urlv 2 end] /]

    # This would map resources to their alternative in the theme
    # package. Works, but needs some extra thought regarding
    # performance etc. and is therefore commented out.
    # set path "packages/$package_key/www/resources/$resource"
    # set themed_path [template::resource_path -type templates -style $path]
    # if { [ad_file isfile $themed_path] } {
    #     return [rp_serve_resource_file $themed_path]
    # }

    set path "[acs_package_root_dir $package_key]/www/resources/$resource"
    if { [ad_file isfile $path] } {
        return [rp_serve_resource_file $path]
    }

    set path $::acs::rootdir/www/[ns_conn url]
    if { [ad_file isfile $path] } {
        return [rp_serve_resource_file $path]
    }

    set path [acs_package_root_dir acs-subsite]/www/[ns_conn url]
    if { [ad_file isfile $path] } {
        return [rp_serve_resource_file $path]
    }

    ns_log Warning "rp_sources_filter: file \"$path\" does not exists trying to serve as a normal request"
    return filter_ok
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: