Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.180.2.64 -r1.180.2.65 --- openacs-4/packages/xowiki/xowiki.info 14 Jul 2021 09:51:12 -0000 1.180.2.64 +++ openacs-4/packages/xowiki/xowiki.info 2 Aug 2021 21:23:19 -0000 1.180.2.65 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann A xotcl-based enterprise wiki system with multiple object types 2017-08-06 @@ -55,8 +55,8 @@ BSD-Style 2 - - + + Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.165 -r1.284.2.166 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 27 Jul 2021 12:09:07 -0000 1.284.2.165 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 2 Aug 2021 21:23:19 -0000 1.284.2.166 @@ -3137,7 +3137,7 @@ set :editor "none" return ${:editor} } - + set editor_class [self class]::$editor if {$editor ne "" && ![:hasclass $editor_class]} { if {![:isclass $editor_class]} { @@ -3996,15 +3996,17 @@ # if {![:exists test_item_in_position]} { set :test_item_in_position [${:object} property position] + #ns_log notice "${:name} randomized_indices get position ${:test_item_in_position} from property" + } else { + #ns_log notice "${:name} randomized_indices position ${:test_item_in_position} already set" } set seeds [${:object} property seeds] set seed [expr {$seeds ne "" && ${:test_item_in_position} ne "" ? [lindex $seeds ${:test_item_in_position}] : [xo::cc user_id]}] set shuffled [::xowiki::randomized_indices -seed $seed $length] #ns_log notice "${:name} randomized_indices for seed $seed (user_id [xo::cc user_id])" \ - "(${:test_item_in_position} - $seeds): $shuffled" \ - "(inp [:exists test_item_in_position])" + "(${:test_item_in_position} - $seeds): $shuffled" } else { set shuffled [::xowiki::randomized_indices $length] } @@ -4560,6 +4562,7 @@ Class create text_fields -superclass {CompoundField ShuffleField} -parameter { {descriptions ""} {paste:boolean true} + {substvalues} } -ad_doc { Provide multiple text and short text entries. This field is a @@ -5629,8 +5632,7 @@ } } #:msg "guess mime_type of $entry_name = [::xowiki::guesstype $entry_name]" - set import_file [ad_tmpnam] - ::xo::write_file $import_file $img + ::xo::write_tmp_file import_file $img set file_object [::xowiki::File new -destroy_on_cleanup \ -title $entry_name \ -name $entry_name \ Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.542.2.107 -r1.542.2.108 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 25 May 2021 19:43:51 -0000 1.542.2.107 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 2 Aug 2021 21:23:20 -0000 1.542.2.108 @@ -1052,15 +1052,16 @@ File instproc demarshall {args} { next - # we have to care about recoding the file content + # we have to care about saving the file content if {[info exists :__file_content]} { - set :import_file [ad_tmpnam] - ::xo::write_file ${:import_file} [::base64::decode ${:__file_content}] + ::xo::write_tmp_file :import_file [::base64::decode ${:__file_content}] unset :__file_content + } elseif {[info exists :__file_name]} { set :import_file ${:__file_name} unset :__file_name + } else { error "either __file_content or __file_name must be set" } Index: openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl,v diff -u -r1.57.2.24 -r1.57.2.25 --- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 28 Jun 2021 19:46:02 -0000 1.57.2.24 +++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 2 Aug 2021 21:23:20 -0000 1.57.2.25 @@ -41,8 +41,9 @@ && [info commands ::util::which] ne ""} { set tidycmd [::util::which tidy] if {$tidycmd ne ""} { - set in_file [ad_tmpnam] - ::xo::write_file $in_file $text + + ::xo::write_tmp_file in_file $text + catch {exec $tidycmd -q -w 0 -ashtml < $in_file 2> /dev/null} output file delete -- $in_file #:msg o=$output Index: openacs-4/packages/xowiki/tcl/test/test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/test-procs.tcl,v diff -u -r1.15.2.20 -r1.15.2.21 --- openacs-4/packages/xowiki/tcl/test/test-procs.tcl 14 Jul 2021 09:51:12 -0000 1.15.2.20 +++ openacs-4/packages/xowiki/tcl/test/test-procs.tcl 2 Aug 2021 21:23:20 -0000 1.15.2.21 @@ -125,8 +125,8 @@ set f [::xowiki::File new -name $name -description "" \ -parent_id $parent_id -package_id $package_id \ -mime_type $mime_type] - set import_file [ad_tmpnam] - ::xo::write_file $import_file [::base64::decode $file_content] + + ::xo::write_tmp_file import_file [::base64::decode $file_content] $f set import_file $import_file } $f publish_status ready