Index: openacs-4/packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl 10 Jan 2007 21:22:03 -0000 1.3 +++ openacs-4/packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl 29 Aug 2007 18:28:16 -0000 1.4 @@ -33,10 +33,20 @@ set package_key [apm_package_key_from_id $package_id] - if {$package_key eq "acs-content-repository" && "CRFileLocationRoot" eq $parameter && $value ne ""} { - nsv_unset CR_LOCATIONS CR_FILES - nsv_set CR_LOCATIONS CR_FILES "[file dirname [string trimright [ns_info tcllib] "/"]]/$value" - } else { - ns_log Debug "subsite::parameter_changed -impl acs-content-repository don't care about $parameter" + 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 -package_id $package_id -parameter FileLocationRelative] + set file_location "" + if {$relativepath_p} { + append file_location "[acs_root_dir]/" + } + append file_location "[parameter::get -package_id $package_id -parameter FileLocation]" + + nsv_set CR_LOCATIONS CR_FILES "$file_location" + + } else { + ns_log Debug "subsite::parameter_changed -impl acs-content-repository don't care about $parameter" } }