Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.153.2.11 -r1.153.2.12 --- openacs-4/packages/xowiki/xowiki.info 15 Mar 2016 10:27:22 -0000 1.153.2.11 +++ openacs-4/packages/xowiki/xowiki.info 11 May 2016 08:59:48 -0000 1.153.2.12 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann A xotcl-based enterprise wiki system with multiple object types 2015-10-04 @@ -55,7 +55,7 @@ BSD-Style 2 - + Index: openacs-4/packages/xowiki/tcl/link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v diff -u -r1.96.2.4 -r1.96.2.5 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 29 Oct 2015 19:43:33 -0000 1.96.2.4 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 11 May 2016 08:59:48 -0000 1.96.2.5 @@ -163,6 +163,7 @@ -name [my name] \ -nls_language $nls_language] } + if {[$page exists __unresolved_object_type]} { # get the desired object_type for unresoved entries set object_type [$page set __unresolved_object_type] @@ -177,7 +178,9 @@ set object_type ::xowiki::Page } } - return [$page new_link -name [my name] -title [my label] -parent_id [my parent_id] \ + return [$page new_link \ + {*}[expr {[info exists object_type] ? [list -object_type $object_type] : {}}] \ + -name [my name] -title [my label] -parent_id [my parent_id] \ -nls_language $nls_language $package_id] } Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.485.2.25 -r1.485.2.26 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 26 Apr 2016 07:17:08 -0000 1.485.2.25 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 11 May 2016 08:59:48 -0000 1.485.2.26 @@ -2215,18 +2215,22 @@ return $result } - Page instproc new_link {-name -title -nls_language -return_url -parent_id page_package_id} { + Page instproc new_link {-object_type -name -title -nls_language -return_url -parent_id page_package_id} { if {[info exists parent_id] && $parent_id eq ""} {unset parent_id} return [$page_package_id make_link -with_entities 0 $page_package_id \ edit-new object_type name title nls_language return_url parent_id autoname] } - FormPage instproc new_link {-name -title -nls_language -parent_id -return_url page_package_id} { - set template_id [my page_template] - if {![info exists parent_id]} {set parent_id [$page_package_id folder_id]} - set form [$page_package_id pretty_link -parent_id $parent_id [$template_id name]] - return [$page_package_id make_link -with_entities 0 -link $form $template_id \ - create-new return_url name title nls_language] + FormPage instproc new_link {-object_type -name -title -nls_language -parent_id -return_url page_package_id} { + if {[info exists object_type]} { + next + } else { + set template_id [my page_template] + if {![info exists parent_id]} {set parent_id [$page_package_id folder_id]} + set form [$page_package_id pretty_link -parent_id $parent_id [$template_id name]] + return [$page_package_id make_link -with_entities 0 -link $form $template_id \ + create-new return_url name title nls_language] + } } #