Index: openacs-4/packages/xowiki/tcl/weblog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/weblog-procs.tcl,v diff -u -r1.63.2.7 -r1.63.2.8 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 23 Mar 2015 11:54:42 -0000 1.63.2.7 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 11 May 2015 11:12:51 -0000 1.63.2.8 @@ -76,16 +76,19 @@ set date_clause "" } if {$category_id ne ""} { - set cnames [list] + set cnames {} + set category_ids {} foreach cid [split $category_id ,] { - if {![string is integer -strict $category_id]} { + if {![string is integer -strict $cid]} { ns_log warning "weblog: ignoring invalid category_id $cid" continue } append extra_where_clause "and exists (select * from category_object_map \ - where object_id = ci.item_id and category_id = $cid)" + where object_id = ci.item_id and category_id = '$cid')" lappend cnames [::category::get_name $cid] + lappend category_ids $cid } + set category_id [join $category_ids ,] append extra_from_clause "" set filter_msg "Filtered by category [join $cnames {, }]" set query_parm "&category_id=$category_id"