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.6 -r1.7 --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 15 Mar 2007 12:10:50 -0000 1.6 +++ openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 25 May 2007 11:52:02 -0000 1.7 @@ -57,14 +57,15 @@ multirow append days_of_week [lindex $week_days [expr {($i + $first_day_of_week) % 7}]] } -db_foreach entries_this_month "select count(ci.item_id), date_trunc('day',p.publish_date) as d \ +db_foreach entries_this_month "select count(ci.item_id), + [::xo::db::sql date_trunc day p.publish_date] as d \ from xowiki_pagei p, cr_items ci \ where ci.parent_id = $folder_id \ and ci.item_id = p.item_id and ci.live_revision = p.page_id \ and ci.content_type not in ('::xowiki::PageTemplate') \ and ci.item_id != $including_item_id \ and ci.publish_status <> 'production' \ - and date_trunc('month', p.publish_date) = '$year-$month-01' \ + and [::xo::db::sql date_trunc_expression month p.publish_date $year-$month-01] \ group by d" { set entries([lindex $d 0]) $count }