Index: openacs-4/packages/wiki/lib/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/new.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/wiki/lib/new.tcl 6 Jan 2005 23:37:43 -0000 1.1.2.1 +++ openacs-4/packages/wiki/lib/new.tcl 7 Jan 2005 16:51:51 -0000 1.1.2.2 @@ -30,6 +30,12 @@ } -new_data { + ns_log notice " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-1/packages/wiki/lib/new.tcl +DB -------------------------------------------------------------------------------- +DB new.adp new_data +DB --------------------------------------------------------------------------------" content::item::new \ -name $name \ -parent_id $folder_id \ @@ -47,6 +53,12 @@ set refs [Wikit::Format::StreamToRefs $stream "wiki::info"] } -edit_data { +ns_log notice " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-1/packages/wiki/lib/new.tcl +DB -------------------------------------------------------------------------------- +DB new.adp edit_data +DB --------------------------------------------------------------------------------" content::revision::new \ -item_id $item_id \ @@ -60,10 +72,22 @@ # do something clever with internal refs set stream [Wikit::Format::TextToStream $content] set refs [Wikit::Format::StreamToRefs $stream "wiki::info"] + ns_log notice " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-1/packages/wiki/lib/new.tcl +DB -------------------------------------------------------------------------------- +DB refs = '${refs}' +DB --------------------------------------------------------------------------------" if {![llength $refs]} { set refs [list ""] } - db_foreach get_ids "select ci.item_id as ref_item_id from cr_items ci left join cr_item_rels cr on (cr.item_id=:item_id or cr.related_object_id=:item_id) where ci.parent_id=:folder_id and ci.name in ([template::util:::tcl_to_sql_list $refs]) and cr.rel_id is null" { + ns_log notice " +DB -------------------------------------------------------------------------------- +DB DAVE debugging /var/lib/aolserver/openacs-5-1/packages/wiki/lib/new.tcl +DB -------------------------------------------------------------------------------- +DB refs = '${refs}' +DB --------------------------------------------------------------------------------" + db_foreach get_ids "select ci.item_id as ref_item_id from cr_items ci left join cr_item_rels cr on (cr.related_object_id=:item_id) where ci.parent_id=:folder_id and ci.name in ([template::util:::tcl_to_sql_list $refs]) and cr.rel_id is null" { content::item::relate \ -item_id $item_id \ -object_id $ref_item_id \ Index: openacs-4/packages/wiki/tcl/wiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/tcl/wiki-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/wiki/tcl/wiki-procs.tcl 6 Jan 2005 23:37:43 -0000 1.1.2.1 +++ openacs-4/packages/wiki/tcl/wiki-procs.tcl 7 Jan 2005 16:51:51 -0000 1.1.2.2 @@ -133,13 +133,13 @@ # ref doesn't exist yet set ret [list "${ref}" "${ref}" "1"] - ns_log notice " -DB -------------------------------------------------------------------------------- -DB DAVE debugging procedure wiki::info -DB -------------------------------------------------------------------------------- -DB ref = '${ref}' -DB ret = '${ret}' -DB --------------------------------------------------------------------------------" +# ns_log notice " +#DB -------------------------------------------------------------------------------- +#DB DAVE debugging procedure wiki::info +#DB -------------------------------------------------------------------------------- +#DB ref = '${ref}' +#DB ret = '${ret}' +#DB --------------------------------------------------------------------------------" return $ret } Index: openacs-4/packages/wiki/tcl/wikit-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/tcl/wikit-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/wiki/tcl/wikit-procs.tcl 6 Jan 2005 23:37:43 -0000 1.1.2.1 +++ openacs-4/packages/wiki/tcl/wikit-procs.tcl 7 Jan 2005 16:51:51 -0000 1.1.2.2 @@ -770,12 +770,13 @@ set info [$ip $text] foreach {id name date} $info break if {$id == ""} {continue} - - regexp {[0-9]+} $id id + ns_log notice "stream_to_refs id='${id} name='${name}'" + #regexp {[0-9]+} $id id set pages($id) "" } - + ns_log notice "returning names [array names pages]" array names pages + } # Output specific conversion. Extracts all external references