Index: openacs-4/packages/xowiki/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/notification-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/tcl/notification-procs.tcl 17 Aug 2006 01:44:26 -0000 1.3 +++ openacs-4/packages/xowiki/tcl/notification-procs.tcl 30 Dec 2006 01:55:17 -0000 1.4 @@ -81,13 +81,19 @@ if {![info exists page]} { set page [::xowiki::Package instantiate_page_from_id -revision_id $revision_id] $page volatile - } + } + if {[$page set publish_status] eq "production"} { + # don't do notification for pages under construction + ns_log notice "--n xowiki::notification NO NOTIFCATION XXX" + return + } + $page absolute_links 1 if {![info exists html]} {set html [$page render]} if {![info exists text]} {set text [ad_html_text_convert -from text/html -to text/plain -- $html]} - ns_log notice "--n xowiki::notification::do_notifications called for item_id [$page set revision_id]" + ns_log notice "--n xowiki::notification::do_notifications called for item_id [$page set revision_id] publish_status=[$page set publish_status] XXX" $page instvar package_id set link [::$package_id pretty_link -absolute 1 [$page name]] append html "
For more details, see [$page set title]
" Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 29 Dec 2006 11:08:19 -0000 1.24 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 30 Dec 2006 01:55:17 -0000 1.25 @@ -159,13 +159,13 @@ return 1 } - WikiForm instproc data_from_form {} { + WikiForm instproc data_from_form {{-new 0}} { my instvar data if {[$data exists_form_parameter text.format]} { $data set mime_type [$data form_parameter text.format] } - if {[[$data set package_id] get_parameter production_mode 0]} { - $data set content_item.publish_status production + if {$new && [[$data set package_id] get_parameter production_mode 0]} { + $data set publish_status production } } WikiForm instproc update_references {} { @@ -191,24 +191,25 @@ if {![$data istype ::xowiki::Object] && ![$data istype ::xowiki::PageTemplate] } { if {[$data istype ::xowiki::PageInstance]} { - if {[$data set instance_attributes] ne ""} { - # fieldless page instances are not notified. problem? - #my log "--i instance_attributes = <[$data set instance_attributes]>" - ::xowiki::notification::do_notifications -page $data - } + if {[$data set instance_attributes] ne ""} { + # fieldless page instances are not notified. problem? + # my log "--i instance_attributes = <[$data set instance_attributes]>" + ::xowiki::notification::do_notifications -page $data + } } else { - ::xowiki::notification::do_notifications -page $data + ::xowiki::notification::do_notifications -page $data } } + #my log "v=[ad_acs_version] 5.2] compare: [apm_version_names_compare [ad_acs_version] 5.2]" if {[apm_version_names_compare [ad_acs_version] 5.2.99] == 1} { application_data_link::update_links_from \ -object_id [$data set item_id] \ -text [$data set text] } } + - WikiForm instproc new_request {} { my instvar data $data set creator [::xo::get_user_name [ad_conn user_id]] @@ -225,15 +226,15 @@ WikiForm instproc new_data {} { my instvar data - my data_from_form + my data_from_form -new 1 set item_id [next] $data set creation_user [ad_conn user_id] my update_references return $item_id } WikiForm instproc edit_data {} { - my data_from_form + my data_from_form -new 0 set item_id [next] my update_references return $item_id 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.15 -r1.16 --- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 17 Aug 2006 01:44:26 -0000 1.15 +++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 30 Dec 2006 01:55:17 -0000 1.16 @@ -17,6 +17,13 @@ set page [::xowiki::Package instantiate_page_from_id -revision_id $revision_id -user_id 0] $page volatile + + if {[$page set publish_status] eq "production"} { + # no data source for for pages under construction + ns_log notice "--sc page under construction, no datasource" + return + } + $page absolute_links 1 ns_log notice "--sc setting absolute links for page = $page [$page set name]" Index: openacs-4/packages/xowiki/www/view-book.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/view-book.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/view-book.adp 29 Dec 2006 11:01:36 -0000 1.1 +++ openacs-4/packages/xowiki/www/view-book.adp 30 Dec 2006 01:55:17 -0000 1.2 @@ -84,8 +84,8 @@