Index: openacs-4/packages/acs-content-repository/tcl/item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/item-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-content-repository/tcl/item-procs.tcl 1 Nov 2003 08:45:36 -0000 1.15 +++ openacs-4/packages/acs-content-repository/tcl/item-procs.tcl 5 Jan 2004 15:41:34 -0000 1.16 @@ -620,7 +620,7 @@ } ad_proc -public item::get_content { - {-revision_id:required} + {-revision_id ""} {-array:required} {-item_id ""} } { @@ -638,6 +638,8 @@ @option item_id The item_id of the corresponding item. You can provide this as an optimization. + If you don't provide revision_id, you must provide item_id, + and the item must have a live revision. @return 1 on success (and set the array in the calling frame), 0 on failure @@ -654,7 +656,12 @@ ns_log notice "item::get_content: no such revision: $reivision_id" return 0 } + } elseif { [empty_string_p $revision_id] } { + set revision_id [item::get_live_revision $item_id] } + if { [empty_string_p $revision_id] } { + error "You must supply revision_id, or the item must have a live revision." + } return [get_revision_content $revision_id $item_id] }