callback::subsite::parameter_changed::impl::acs-content-repository (private)

 callback::subsite::parameter_changed::impl::acs-content-repository \
    -package_id package_id -parameter parameter -value value

Defined in packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl

Implementation of subsite::parameter_changed for acs-content-repository. This is needed as we can change the CRFileLocationRoot parameter. As the cr_fs_path is stored in an NSV we would need to update the NSV the moment we change the parameter so we don't need to restart the server.

Switches:
-package_id
(required)
the package_id of the package the parameter was changed for
-parameter
(required)
the parameter name
-value
(required)
the new value
Author:
Malte Sussdorff <malte.sussdorff@cognovis.de>
Created:
2005-10-29
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_key_from_id apm_package_key_from_id (public) parameter::get_from_package_key parameter::get_from_package_key (public) callback::subsite::parameter_changed::impl::acs-content-repository callback::subsite::parameter_changed::impl::acs-content-repository callback::subsite::parameter_changed::impl::acs-content-repository->apm_package_key_from_id callback::subsite::parameter_changed::impl::acs-content-repository->parameter::get_from_package_key

Testcases:
No testcase defined.
Source code:
    ::callback::subsite::parameter_changed::contract__arg_parser {*}$args

    ns_log Debug "subsite::parameter_changed -impl acs-content-repository called for $parameter"
    
    set package_key [apm_package_key_from_id $package_id]
    
    if {$package_key eq "acs-content-repository" && $parameter eq "CRFileLocationRoot" && $value ne ""} {
        nsv_unset CR_LOCATIONS CR_FILES
    
    # Take the directory from the FileLocation parameter that 
    # must be specified in acs-content-repository package.
    set relativepath_p [parameter::get_from_package_key -package_key "acs-content-repository" -parameter FileLocationRelativeP]
    set file_location ""
    
    if {$relativepath_p} {
        # The file location is relative to $::acs::rootdir
        append file_location "$::acs::rootdir/"
    }
    append file_location [parameter::get_from_package_key -package_key "acs-content-repository" -parameter "CRFileLocationRoot" -default "content-repository-content-files"]
    
    nsv_set CR_LOCATIONS CR_FILES "$file_location"
    
    } else {
    ns_log Debug "subsite::parameter_changed -impl acs-content-repository don't care about $parameter"
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: