Index: openacs-4/packages/wiki/lib/page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/page.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/wiki/lib/page.tcl 22 Feb 2005 15:37:07 -0000 1.1.2.4 +++ openacs-4/packages/wiki/lib/page.tcl 25 Nov 2005 19:38:12 -0000 1.1.2.5 @@ -52,8 +52,24 @@ } -db_1row get_content "select content,title from cr_revisions, cr_items where revision_id=live_revision and cr_items.item_id=:item_id" +if {![db_0or1row get_content "select content,title from cr_revisions, cr_items where revision_id=live_revision and cr_items.item_id=:item_id"]} { + + set form [rp_getform] + ns_log debug " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-head-cr-tcl-api/packages/wiki/lib/page.tcl +DB -------------------------------------------------------------------------------- +DB form = '${form}' +DB [ns_set find $form "item_id"] +DB --------------------------------------------------------------------------------" + if {[ns_set find $form "item_id"] < 0} { + rp_form_put item_id $item_id + rp_form_put name $name + } + rp_internal_redirect "/packages/wiki/lib/new" +} + set stream [Wikit::Format::TextToStream $content] set refs [Wikit::Format::StreamToRefs $stream "wiki::get_info"] db_multirow related_items get_related_items "select cr.name, cr.title, cr.description from cr_revisionsx cr, cr_items ci, cr_item_rels cir where cir.related_object_id=:item_id and cir.relation_tag='wiki_reference' and ci.live_revision=cr.revision_id and ci.item_id=cir.item_id"