Index: openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 7 Jun 2008 20:28:48 -0000 1.31 +++ openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 29 Dec 2008 22:01:28 -0000 1.32 @@ -34,14 +34,14 @@ # Look for package-defined root set package_id [ad_conn package_id] set template_root \ - [ad_parameter -package_id $package_id TemplateRoot dummy ""] + [parameter::get -package_id $package_id -parameter TemplateRoot -default ""] if { $template_root eq "" } { # Look for template root defined in the CR set package_id [apm_package_id_from_key "acs-content-repository"] - set template_root [ad_parameter -package_id $package_id \ - TemplateRoot dummy "templates"] + set template_root [parameter::get -package_id $package_id \ + -parameter TemplateRoot -default "templates"] } if { [string index $template_root 0] ne "/" } { Index: openacs-4/packages/acs-content-repository/tcl/image-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/image-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-content-repository/tcl/image-procs.tcl 29 Aug 2008 14:53:42 -0000 1.7 +++ openacs-4/packages/acs-content-repository/tcl/image-procs.tcl 29 Dec 2008 22:01:28 -0000 1.8 @@ -175,7 +175,7 @@ @author Dave Bauer (dave@solutiongrove.com) @creation-date 2006-08-27 } { - if { [ catch {set out [exec [ad_parameter ImageMagickPath]/identify -format "%w %h %m %k %q %#" $file]} errMsg]} { + if { [ catch {set out [exec [parameter::get -parameter ImageMagickPath]/identify -format "%w %h %m %k %q %#" $file]} errMsg]} { return -code error $errMsg } foreach {width height type} [split $out { }] {} Index: openacs-4/packages/acs-content-repository/tcl/search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/search-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-content-repository/tcl/search-procs.tcl 23 Feb 2002 21:28:17 -0000 1.7 +++ openacs-4/packages/acs-content-repository/tcl/search-procs.tcl 29 Dec 2008 22:01:28 -0000 1.8 @@ -145,7 +145,7 @@ } { set package_id [apm_package_id_from_key search] - set driver [ad_parameter -package_id $package_id FtsEngineDriver] + set driver [parameter::get -package_id $package_id -parameter FtsEngineDriver] array set result [acs_sc_call FtsEngineDriver search [list $q $offset $limit] $driver] return $result(ids) Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl 10 Jan 2007 21:22:13 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl 29 Dec 2008 21:53:02 -0000 1.4 @@ -85,18 +85,18 @@ break } - # check quota - set maximum_folder_size [ad_parameter "MaximumFolderSize"] + if {[info exists folder_size]} { + # check 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/acs-templating/www/scripts/xinha/attach-file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl 29 Aug 2008 18:08:35 -0000 1.12 +++ openacs-4/packages/acs-templating/www/scripts/xinha/attach-file.tcl 29 Dec 2008 21:53:02 -0000 1.13 @@ -112,17 +112,20 @@ if { !$error_p } { if {$upload_file ne ""} { - # check quota - # FIXME quota is a good idea, set per-user upload quota?? - # set maximum_folder_size [ad_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 {[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 + } + } + } + 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/acs-templating/www/scripts/xinha/attach-image.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/scripts/xinha/attach-image.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-templating/www/scripts/xinha/attach-image.tcl 29 Aug 2008 18:08:35 -0000 1.8 +++ openacs-4/packages/acs-templating/www/scripts/xinha/attach-image.tcl 29 Dec 2008 21:53:02 -0000 1.9 @@ -98,19 +98,19 @@ } if {$upload_file ne "" } { - # 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/acs-templating/www/scripts/xinha/file-selector.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/scripts/xinha/file-selector.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/scripts/xinha/file-selector.tcl 18 Aug 2006 19:00:07 -0000 1.1 +++ openacs-4/packages/acs-templating/www/scripts/xinha/file-selector.tcl 29 Dec 2008 21:53:02 -0000 1.2 @@ -86,11 +86,10 @@ } # check quota - set maximum_folder_size [ad_parameter "MaximumFolderSize"] - + 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 } { + 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