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.361 -r1.362 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 22 May 2009 10:04:30 -0000 1.361 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Jul 2009 09:12:42 -0000 1.362 @@ -2364,17 +2364,21 @@ -object_class ::xowiki::FormPage] if {!$use_hstore && $wc(tcl) ne "true"} { + # Make sure, that the expr method is available; + # in xotcl 2.0 this will not be needed + ::xotcl::alias ::xowiki::FormPage expr -objscope ::expr + set init_vars $wc(vars) foreach p [$items children] { array set __ia $init_vars array set __ia [$p instance_attributes] - if {![$p eval expr $wc(tcl)]} {$items delete $p} + if {![$p expr $wc(tcl)]} {$items delete $p} } } return $items } - - # + + # # begin property management # Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.234 -r1.235 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 19 Jun 2009 13:34:07 -0000 1.234 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 1 Jul 2009 09:12:42 -0000 1.235 @@ -556,7 +556,7 @@ } { array set tcl_op {= eq < < > > >= >= <= <=} array set sql_op {= = < < > > >= >= <= <=} - array set op_map {contains,sql {$lhs_var like '%$rhs%'} contains,tcl {[lsearch -- $lhs_var {$rhs}] > -1}} + array set op_map {contains,sql {$lhs_var like '%$rhs%'} contains,tcl {[lsearch $lhs_var {$rhs}] > -1}} #my msg unless=$unless #example for unless: wf_current_state = closed|accepted || x = 1 set tcl_clause [list] Index: openacs-4/packages/xowiki/www/admin/test.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/Attic/test.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/xowiki/www/admin/test.tcl 30 Apr 2009 09:02:05 -0000 1.19 +++ openacs-4/packages/xowiki/www/admin/test.tcl 1 Jul 2009 09:12:42 -0000 1.20 @@ -584,7 +584,7 @@ ? {::xowiki::FormPage filter_expression \ "_state=created|accepted|approved|tested|developed|deployed&&_assignee=123" &&} \ - {tcl {[lsearch -exact -- {created accepted approved tested developed deployed} [my property _state]] > -1&&[my property _assignee] eq {123}} h {} vars {} sql {{state in ('created','accepted','approved','tested','developed','deployed')} {assignee = '123'}}} filter_expr_where_1 + {tcl {[lsearch -exact {created accepted approved tested developed deployed} [my property _state]] > -1&&[my property _assignee] eq {123}} h {} vars {} sql {{state in ('created','accepted','approved','tested','developed','deployed')} {assignee = '123'}}} filter_expr_where_1 ? {::xowiki::FormPage filter_expression \ "_assignee<=123 && y>=123" &&} \ @@ -593,12 +593,17 @@ ? {::xowiki::FormPage filter_expression \ "betreuer contains en:person1" &&} \ - {tcl {[lsearch -- $__ia(betreuer) {en:person1}] > -1} h {} vars {betreuer {}} sql {{instance_attributes like '%en:person1%'}}} \ + {tcl {[lsearch $__ia(betreuer) {en:person1}] > -1} h {} vars {betreuer {}} sql {{instance_attributes like '%en:person1%'}}} \ filter_expr_where_3 ? {::xowiki::FormPage filter_expression \ + "_state=closed" ||} \ + {tcl {[my property _state] eq {closed}} h {} vars {} sql {{state = 'closed'}}} \ + filter_expr_unless_1 + +? {::xowiki::FormPage filter_expression \ "_state= closed|accepted || x = 1" ||} \ - {tcl {[lsearch -exact -- {closed accepted} [my property _state]] > -1||$__ia(x) eq {1}} h x=>1 vars {x {}} sql {{state in ('closed','accepted')}}} \ + {tcl {[lsearch -exact {closed accepted} [my property _state]] > -1||$__ia(x) eq {1}} h x=>1 vars {x {}} sql {{state in ('closed','accepted')}}} \ filter_expr_unless_1