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.58 -r1.59 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 29 Dec 2008 02:26:46 -0000 1.58 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 26 Jan 2009 21:26:07 -0000 1.59 @@ -113,7 +113,7 @@ } set name [my name] set title [my label] - set new_link [$package_id make_link $package_id edit-new object_type name title] + set new_link [$page new_link $package_id] #set href [export_vars -base [$package_id package_url] \ # {{edit-new 1} object_type name title}] Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.158 -r1.159 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 29 Dec 2008 02:26:47 -0000 1.158 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 26 Jan 2009 21:26:07 -0000 1.159 @@ -31,7 +31,7 @@ #TODO can most probably further simplified set page [::xo::db::CrClass get_instance_from_db -item_id $item_id -revision_id $revision_id] - #my log "--I get_instance_from_db i=$item_id revision_id=$revision_id page=$page" + #my log "--I get_instance_from_db i=$item_id revision_id=$revision_id page=$page, package_id=[$page set package_id]" set folder_id [$page set parent_id] if {[apm_version_names_compare [ad_acs_version] 5.2] <= -1} { @@ -1360,6 +1360,7 @@ download {{package_id read}} } Class Form -array set require_permission { + view admin create-new {{item_id write}} create-or-use {{item_id write}} list {{package_id read}} Index: openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 6 Oct 2008 12:06:57 -0000 1.25 +++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 26 Jan 2009 21:26:07 -0000 1.26 @@ -16,7 +16,6 @@ #ns_log notice "--sc datasource called with revision_id = $revision_id" set page [::xowiki::Package instantiate_page_from_id -revision_id $revision_id -user_id 0] - $page volatile #ns_log notice "--sc package=[[$page package_id] serialize]" ns_log notice "--sc $page [$page set publish_status]" Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.210 -r1.211 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 26 Jan 2009 09:15:24 -0000 1.210 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 26 Jan 2009 21:26:07 -0000 1.211 @@ -175,14 +175,9 @@ if {[my exists __link(new)]} { set new_link [my set __link(new)] } else { - if {[my istype ::xowiki::FormPage]} { - set template_id [my page_template] - set form [$page_package_id pretty_link [$template_id name]] - set new_link [$page_package_id make_link -with_entities 0 -link $form $template_id create-new return_url] - } else { - set new_link [$page_package_id make_link -with_entities 0 $page_package_id edit-new object_type return_url autoname] - } + set new_link [my new_link $page_package_id] } + set admin_link [$context_package_id make_link -privilege admin -link admin/ $context_package_id {} {}] set index_link [$context_package_id make_link -privilege public -link "" $context_package_id {} {}] set create_in_req_locale_link "" @@ -232,7 +227,13 @@ if {[info command ::template::head::add_meta] ne ""} { set meta(lang) [my lang] set meta(description) [my description] - set meta(keyworkds) [$context_package_id get_parameter keywords ""] + set meta(keywords) "" + if {[my istype ::xowiki::FormPage]} { + set meta(keywords) [string trim [my property keywords]] + } + if {$meta(keywords) eq ""} { + set meta(keywords) [$context_package_id get_parameter keywords ""] + } foreach i [array names meta] { # don't set empty meta tags if {$meta($i) eq ""} continue @@ -268,6 +269,9 @@ namespace eval ::xowiki { + Page instproc new_link {page_package_id} { + return [$page_package_id make_link -with_entities 0 $page_package_id edit-new object_type return_url autoname] + } Page instproc edit { {-new:boolean false} @@ -476,6 +480,11 @@ } namespace eval ::xowiki { + FormPage instproc new_link {page_package_id} { + set template_id [my page_template] + set form [$page_package_id pretty_link [$template_id name]] + return [$page_package_id make_link -with_entities 0 -link $form $template_id create-new return_url] + } FormPage proc get_table_form_fields { -base_item