Index: openacs-4/packages/lars-blogger/www/admin/entry-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/Attic/entry-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/www/admin/entry-edit.tcl 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/admin/entry-edit.tcl 12 Sep 2002 15:08:40 -0000 1.2 @@ -76,8 +76,11 @@ } else { set set_clauses { "title = :title" "content = :content" "entry_date = to_date(:entry_date, 'YYYY-MM-DD')" "draft_p = :draft_p" } - if { [string equal $draft_p [db_string org_draft_p { select draft_p from pinds_blog_entries where entry_id = :entry_id } ]] } { - lappend set_clauses "[db_map now]" + set org_draft_p [db_string org_draft_p { select draft_p from pinds_blog_entries where entry_id = :entry_id } ] + + if { [string equal $draft_p "t"] && [string equal $org_draft_p "f"] } { + # If this is a publish, set the posted_date to now + lappend set_clauses [db_map now] } db_dml update_entry { *SQL* }