Index: openacs-4/packages/acs-content-repository/acs-content-repository.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v
diff -u -N -r1.56.2.9 -r1.56.2.10
--- openacs-4/packages/acs-content-repository/acs-content-repository.info 20 Oct 2005 18:06:17 -0000 1.56.2.9
+++ openacs-4/packages/acs-content-repository/acs-content-repository.info 29 Oct 2005 12:29:58 -0000 1.56.2.10
@@ -7,7 +7,7 @@
t
t
-
+
OpenACS
The canonical repository for OpenACS content.
@@ -21,7 +21,7 @@
other CMS backing functionality. Utilized by Bug Tracker, File Storage, and other packages.
-
+
@@ -30,6 +30,7 @@
+
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 -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl 29 Oct 2005 12:29:58 -0000 1.1.2.1
@@ -0,0 +1,42 @@
+# packages/acs-content-repository/tcl/acs-content-repository-callback-procs.tcl
+
+ad_library {
+
+ Callback procs for acs-content-repository
+
+ @author Malte Sussdorff (sussdorff@sussdorff.de)
+ @creation-date 2005-06-15
+ @arch-tag: d9aec4df-102d-4b0d-8d0e-3dc470dbe783
+ @cvs-id $Id: acs-content-repository-callback-procs.tcl,v 1.1.2.1 2005/10/29 12:29:58 maltes Exp $
+}
+
+
+ad_proc -public -callback subsite::parameter_changed -impl acs-content-repository {
+ -package_id:required
+ -parameter:required
+ -value:required
+} {
+ 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.
+
+ @author Malte Sussdorff (malte.sussdorff@cognovis.de)
+ @creation-date 2005-10-29
+
+ @param package_id the package_id of the package the parameter was changed for
+ @param parameter the parameter name
+ @param value the new value
+
+} {
+ ns_log Debug "subsite::parameter_changed -impl acs-content-repository called for $parameter"
+
+ set package_key [apm_package_key_from_id $package_id]
+
+ if {[string equal $package_key "acs-content-repository"] && [string equal "CRFileLocationRoot" $parameter] && ![empty_string_p $value]} {
+ 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"
+ }
+}
Index: openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl,v
diff -u -N -r1.9 -r1.9.2.1
--- openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl 19 Dec 2004 05:26:41 -0000 1.9
+++ openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl 29 Oct 2005 12:29:58 -0000 1.9.2.1
@@ -26,10 +26,11 @@
ad_schedule_proc [expr {15 * 60}] acs_cr_scheduled_release_exec
+set file_location [parameter::get_from_package_key -package_key "acs-content-repository" -parameter "CRFileLocationRoot" -default "content-repository-content-files"]
nsv_set CR_LOCATIONS . ""
if ![nsv_exists CR_LOCATIONS CR_FILES] {
- nsv_set CR_LOCATIONS CR_FILES "[file dirname [string trimright [ns_info tcllib] "/"]]/content-repository-content-files"
+ nsv_set CR_LOCATIONS CR_FILES "[file dirname [string trimright [ns_info tcllib] "/"]]/$file_location"
}