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.3 -r1.63.2.4 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 11 Feb 2014 11:58:18 -0000 1.63.2.3 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 7 Mar 2014 09:47:17 -0000 1.63.2.4 @@ -68,7 +68,7 @@ if {$date ne ""} { #set date_clause "and date_trunc('day',bt.publish_date) = '$date'" - set date_clause "and [::xo::dc date_trunc_expression day bt.publish_date $date]" + set date_clause "and [::xo::dc date_trunc_expression day bt.publish_date :date]" set filter_msg "Filtered by date $date" set query_parm "&date=$date" set query [::xo::update_query $query date $date] @@ -170,7 +170,7 @@ } set sql \ - [list -parent_id $query_parent_id \ + [list -parent_id :query_parent_id \ -select_attributes $attributes \ -orderby "publish_date desc" \ -base_table $base_table \ Index: openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/weblog-mini-calendar.tcl,v diff -u -r1.17.2.2 -r1.17.2.3 --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 11 Feb 2014 11:58:20 -0000 1.17.2.2 +++ openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 7 Mar 2014 09:47:17 -0000 1.17.2.3 @@ -49,17 +49,18 @@ multirow append days_of_week [lindex $week_days [expr {($i + $first_day_of_week) % 7}]] } +set date_reference $year-$month-01 set innersql "from xowiki_pagei p, cr_items ci \ - where ci.parent_id = $parent_id \ + where ci.parent_id = :parent_id \ and ci.item_id = p.item_id and ci.live_revision = p.page_id \ and ci.content_type not in ('::xowiki::PageTemplate', '::xowiki::Form') \ - and ci.item_id != $including_item_id \ + and ci.item_id != :including_item_id \ and ci.publish_status <> 'production' " xo::dc foreach entries_this_month "select count(ci.item_id) as c, [::xo::dc date_trunc day p.publish_date] as d \ $innersql - and [::xo::dc date_trunc_expression month p.publish_date $year-$month-01] \ + and [::xo::dc date_trunc_expression month p.publish_date :date_reference] \ group by [::xo::dc date_trunc day p.publish_date]" { set entries([lindex $d 0]) $c }