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.284 -r1.285 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 27 Sep 2008 17:27:56 -0000 1.284 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Oct 2008 10:11:39 -0000 1.285 @@ -1089,38 +1089,45 @@ if {[info exists $__v]} continue [my info class] instvar $__v } - set __ignorelist [list __v __ignorelist __varlist __template_variables__ \ + set __ignorelist [list __v __vars __l __ignorelist __varlist \ + __last_includelet __unresolved_references \ text item_id content lang_links] - set __varlist [list] - set __template_variables__ "
Possible values are$__template_variables__" + return "
Possible values are$__template_variables__" } return $template_value } @@ -1145,8 +1152,11 @@ Page instproc get_content {} { #my log "--" - return [my substitute_markup [my set text]] + set content [my set text] + if {[my render_adp]} {set content [my adp_subst $content]} + return [my substitute_markup $content] } + Page instproc set_content {text} { my text [list [string map [list >> "\n>>" << "<<\n"] \ [string trim $text " \n"]] text/html] @@ -1214,7 +1224,7 @@ } Page instproc render {-update_references:switch} { - my instvar item_id revision_id references lang render_adp unresolved_references parent_id + my instvar item_id revision_id references lang unresolved_references parent_id my array set lang_links {found "" undefined ""} #my log "-- my class=[my info class]" set name [my set name] @@ -1229,15 +1239,14 @@ my update_references $item_id [lsort -unique $references] } unset references - set html [expr {$render_adp ? [my adp_subst $content] : $content}] if {[::xo::cc get_parameter content-type text/html] eq "text/html"} { - append html "
\n" } - return $html + return $content } Page instproc record_last_visited {-user_id} { @@ -1339,10 +1348,10 @@ PlainPage set markupmap(escape) [list "\\\[\[" \03\01 "\\\{\{" \03\02 {\>>} \03\03] PlainPage set markupmap(unescape) [list \03\01 "\[\[" \03\02 "\{\{" \03\03 {>>}] - PlainPage instproc get_content {} { - #my msg "-- my class=[my info class]" - return [my substitute_markup [my set text]] + set content [my set text] + if {[my render_adp]} {set content [my adp_subst $content]} + return [my substitute_markup $content] } PlainPage instproc set_content {text} { my text $text @@ -1690,10 +1699,11 @@ # # Methods of ::xowiki::Object # - Object instproc get_content {} { if {[[self]::payload info methods content] ne ""} { - return [my substitute_markup [[self]::payload content]] + set content [[self]::payload content] + if {[my render_adp]} {set content [my adp_subst $content]} + return [my substitute_markup $content] } else { return "[string map {> > < <} [my set text]]" } @@ -1916,10 +1926,9 @@ -page_number $page_number \ -base_table xowiki_form_pagei \ ] - my log $sql + #my log $sql set items [::xowiki::FormPage instantiate_objects -sql $sql \ -object_class ::xowiki::FormPage] - if {$h_where ne "" && !$use_hstore} { set init_vars $wc(vars) foreach p [$items children] { @@ -2096,6 +2105,9 @@ FormPage instproc get_value {before varname} { set value [my property $varname] + # todo: do we have to check for current_user here? + #set current_user [::xo::cc user_id] + # todo: might be more efficient to check, if it exists already set f [my create_raw_form_field -name $varname \ -slot [my find_slot [string trimleft $varname _]] \