Index: openacs-4/packages/xotcl-core/tcl/cluster-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/Attic/cluster-init.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xotcl-core/tcl/cluster-init.tcl 29 Aug 2008 22:42:53 -0000 1.2 +++ openacs-4/packages/xotcl-core/tcl/cluster-init.tcl 23 Dec 2008 11:34:59 -0000 1.3 @@ -9,7 +9,7 @@ ::xo::Cluster create CS_${host}_$port -host $host -port $port } - foreach ip [ad_parameter -package_id [ad_acs_kernel_id] ClusterAuthorizedIP server-cluster] { + foreach ip [parameter::get -package_id [ad_acs_kernel_id] -parameter ClusterAuthorizedIP] { if {[string first * $ip] > -1} { ::xo::Cluster lappend allowed_host_patterns $ip } else { Index: openacs-4/packages/xotcl-core/tcl/object-cache-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/Attic/object-cache-init.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/xotcl-core/tcl/object-cache-init.tcl 20 Sep 2007 12:05:34 -0000 1.5 +++ openacs-4/packages/xotcl-core/tcl/object-cache-init.tcl 23 Dec 2008 11:34:59 -0000 1.6 @@ -10,5 +10,5 @@ # should provide parameter at some time... -# [ad_parameter -package_id [ad_acs_kernel_id] MaxSize memoize 200000] +# [parameter::get -package_id [ad_acs_kernel_id] -parameter MaxSize -default 200000] Index: openacs-4/packages/xowiki/www/xinha/attach-file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/attach-file.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/xinha/attach-file.tcl 18 Aug 2006 18:57:42 -0000 1.1 +++ openacs-4/packages/xowiki/www/xinha/attach-file.tcl 23 Dec 2008 11:34:59 -0000 1.2 @@ -45,19 +45,19 @@ break } - # check quota - # FIXME quota is a good idea, set per-user upload quota?? -# set maximum_folder_size [ad_parameter "MaximumFolderSize"] + if {[info exists folder_size]} { + # check per folder quota + set maximum_folder_size [parameter::get -parameter "MaximumFolderSize"] + + if { $maximum_folder_size ne "" } { + if { $folder_size+[file size ${upload_file.tmpfile}] > $maximum_folder_size } { + template::form::set_error upload_form upload_file \ + [_ file-storage.out_of_space] + break + } + } + } -# if { $maximum_folder_size ne "" } { -# set max [ad_parameter "MaximumFolderSize"] -# if { $folder_size+[file size ${upload_file.tmpfile}] > $max } { -# template::form::set_error upload_form upload_file \ - [_ file-storage.out_of_space] - # break - # } - # } - set file_name [template::util::file::get_property filename $upload_file] set upload_tmpfile [template::util::file::get_property tmp_filename $upload_file] set mime_type [template::util::file::get_property mime_type $upload_file] Index: openacs-4/packages/xowiki/www/xinha/file-selector.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/file-selector.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/xowiki/www/xinha/file-selector.tcl 3 Oct 2008 08:59:18 -0000 1.11 +++ openacs-4/packages/xowiki/www/xinha/file-selector.tcl 23 Dec 2008 11:34:59 -0000 1.12 @@ -139,17 +139,18 @@ break } - # check quota - set maximum_folder_size [ad_parameter "MaximumFolderSize"] + if {[info exists folder_size]} { + # check per folder quota + set maximum_folder_size [parameter::get -parameter "MaximumFolderSize"] - if { $maximum_folder_size ne "" } { - set max [ad_parameter "MaximumFolderSize"] - if { $folder_size+[file size ${upload_file.tmpfile}] > $max } { - template::form::set_error upload_form upload_file \ - [_ file-storage.out_of_space] - break - } - } + if { $maximum_folder_size ne "" } { + if { $folder_size+[file size ${upload_file.tmpfile}] > $maximum_folder_size } { + template::form::set_error upload_form upload_file \ + [_ file-storage.out_of_space] + break + } + } + } set file_name [template::util::file::get_property filename $upload_file] set upload_tmpfile [template::util::file::get_property tmp_filename $upload_file] Index: openacs-4/packages/xowiki/www/xinha/insert-file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/insert-file.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/xinha/insert-file.tcl 17 Aug 2006 21:29:29 -0000 1.1 +++ openacs-4/packages/xowiki/www/xinha/insert-file.tcl 23 Dec 2008 11:34:59 -0000 1.2 @@ -45,19 +45,19 @@ break } - # check quota - # FIXME quota is a good idea, set per-user upload quota?? -# set maximum_folder_size [ad_parameter "MaximumFolderSize"] + if {[info exists folder_size]} { + # check per folder quota + set maximum_folder_size [parameter::get -parameter "MaximumFolderSize"] + + if { $maximum_folder_size ne "" } { + if { $folder_size+[file size ${upload_file.tmpfile}] > $maximum_folder_size } { + template::form::set_error upload_form upload_file \ + [_ file-storage.out_of_space] + break + } + } + } -# if { $maximum_folder_size ne "" } { -# set max [ad_parameter "MaximumFolderSize"] -# if { $folder_size+[file size ${upload_file.tmpfile}] > $max } { -# template::form::set_error upload_form upload_file \ - [_ file-storage.out_of_space] - # break - # } - # } - set file_name [template::util::file::get_property filename $upload_file] set upload_tmpfile [template::util::file::get_property tmp_filename $upload_file] set mime_type [template::util::file::get_property mime_type $upload_file]