Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -r1.92.2.5 -r1.92.2.6 --- openacs-4/packages/xotcl-core/xotcl-core.info 1 Dec 2015 13:38:58 -0000 1.92.2.5 +++ openacs-4/packages/xotcl-core/xotcl-core.info 23 Dec 2015 18:21:56 -0000 1.92.2.6 @@ -10,7 +10,7 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) 2015-10-04 @@ -48,7 +48,7 @@ BSD-Style 2 - + Index: openacs-4/packages/xotcl-core/tcl/cr-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/cr-procs.tcl,v diff -u -r1.54.2.7 -r1.54.2.8 --- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 1 Dec 2015 09:29:32 -0000 1.54.2.7 +++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 23 Dec 2015 18:21:56 -0000 1.54.2.8 @@ -1115,7 +1115,7 @@ return "" } - CrItem instproc revisions {} { + CrItem instproc www-revisions {} { set isAdmin [acs_user::site_wide_admin_p] 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.291.2.9 -r1.291.2.10 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 7 Dec 2015 13:51:19 -0000 1.291.2.9 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 23 Dec 2015 18:21:56 -0000 1.291.2.10 @@ -762,7 +762,7 @@ -package_id $id \ -link $computed_link $object $method] } errorMsg ]} { - my log "error in check_permissions: $errorMsg" + ns_log error "error in check_permissions: $errorMsg" set granted 0 } #my msg "--p $id check_permissions $object $method ==> $granted" @@ -838,19 +838,25 @@ } } } - if {[$page_or_package procsearch $method] eq ""} { + if {[$page_or_package procsearch www-$method] eq ""} { return [my error_msg "Method '[ns_quotehtml $method]' is not defined for this object"] } else { #my msg "--invoke [my set object] id=$page_or_package method=$method ([my id] batch_mode $batch_mode)" if {$batch_mode} {[my id] set __batch_mode 1} set err [catch { set r [my call $page_or_package $method ""]} errorMsg] + if {$err} {set errorCode $::errorCode} if {$batch_mode} {[my id] unset -nocomplain __batch_mode} if {$err} { - ns_log notice "error during invocation of method $method errorMsg: $errorMsg, $::errorInfo" - return [my error_msg -status_code 500 \ - -template_file $error_template \ - "error during [ns_quotehtml $method]:
[ns_quotehtml $errorMsg]
"] + lassign $errorCode flag type value + if {$flag eq "AD" && $type eq "EXCEPTION" && $value eq "ad_script_abort"} { + return "" + } else { + ns_log error "error during invocation of method $method errorMsg: $errorMsg, $::errorInfo" + return [my error_msg -status_code 500 \ + -template_file $error_template \ + "error during [ns_quotehtml $method]:
[ns_quotehtml $errorMsg]
"] + } } return $r } @@ -1045,7 +1051,7 @@ } #my log "try to import a prototype page for '$stripped_object'" - set page [my import-prototype-page -lang $lang -add_revision false $(stripped_name)] + set page [my www-import-prototype-page -lang $lang -add_revision false $(stripped_name)] if {$page eq ""} { my log "no prototype for '$object' found" } @@ -1636,7 +1642,7 @@ # import for prototype pages # - Package instproc import-prototype-page { + Package instproc www-import-prototype-page { {-add_revision:boolean true} {-lang en} {prototype_name ""} @@ -1785,7 +1791,7 @@ $object $method] if {$allowed} { #my log "--p calling $object ([$object name] [$object info class]) '$method'" - $object $method {*}$options + $object www-$method {*}$options } else { my log "not allowed to call $object $method" } @@ -1865,7 +1871,7 @@ # user callable methods on package level # - Package ad_instproc refresh-login {} { + Package ad_instproc www-refresh-login {} { Force a refresh of a login and do a redict. Intended for use from ajax. } { set return_url [my query_parameter return_url] @@ -1881,7 +1887,7 @@ # reindex (for site wide search) # - Package ad_instproc reindex {} { + Package ad_instproc www-reindex {} { reindex all items of this package } { my instvar folder_id id @@ -1902,7 +1908,7 @@ # # change-page-order (normally called via ajax POSTs) # - Package ad_instproc change-page-order {} { + Package ad_instproc www-change-page-order {} { Change Page Order for pages by renumbering and filling gaps. The parameter "clean" is just used for page inserts. @@ -1926,7 +1932,7 @@ # # RSS 2.0 support # - Package ad_instproc rss { + Package ad_instproc www-rss { -maxentries -name_filter -entries_of @@ -1980,7 +1986,7 @@ # Google sitemap support # - Package ad_instproc google-sitemap { + Package ad_instproc www-google-sitemap { {-max_entries ""} {-changefreq "daily"} {-priority "0.5"} @@ -2039,7 +2045,7 @@ ns_return 200 $t $content } - Package ad_proc google-sitemapindex { + Package ad_proc www-google-sitemapindex { {-changefreq "daily"} {-priority "priority"} } { @@ -2083,8 +2089,8 @@ ns_return 200 $t $content } - Package instproc google-sitemapindex {} { - [self class] [self proc] + Package instproc www-google-sitemapindex {} { + [self class] www-google-sitemapindex } Package instproc clipboard-copy {} { @@ -2095,7 +2101,7 @@ # Create new pages # - Package instproc edit-new {} { + Package instproc www-edit-new {} { my instvar folder_id id set object_type [my query_parameter object_type "::xowiki::Page"] set autoname [my get_parameter autoname 0] @@ -2128,14 +2134,14 @@ $page set name "" } - return [$page edit -new true -autoname $autoname] + return [$page www-edit -new true -autoname $autoname] } # # manage categories # - Package instproc manage-categories {} { + Package instproc www-manage-categories {} { set object_id [my query_parameter object_id] if {![string is integer -strict $object_id]} { return [my error_msg "No valid object_id provided!"] } @@ -2149,7 +2155,7 @@ # edit a single category tree # - Package instproc edit-category-tree {} { + Package instproc www-edit-category-tree {} { set object_id [my query_parameter object_id] if {![string is integer -strict $object_id]} { return [my error_msg "No valid object_id provided!"] } set tree_id [my query_parameter tree_id] @@ -2201,7 +2207,7 @@ ::xo::db::sql::content_revision del -revision_id $revision_id } - Package instproc delete {-item_id -name -parent_id} { + Package instproc www-delete {-item_id -name -parent_id} { # # This delete method does not require an instanantiated object, # while the class-specific delete methods in xowiki-procs need these. @@ -2436,7 +2442,6 @@ {{regexp {name {(weblog|index)$}}} package_id admin} {package_id write} } - save-form-data {{package_id write}} save-attributes {{package_id write}} make-live-revision {{package_id write}} delete-revision {{package_id admin}} 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.19 -r1.485.2.20 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 7 Dec 2015 14:25:50 -0000 1.485.2.19 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 23 Dec 2015 18:21:56 -0000 1.485.2.20 @@ -1080,7 +1080,7 @@ if {[catch { set success [string match [lindex $value 1] [my set [lindex $value 0]]] } errorMsg]} { - my log "error during match: $errorMsg" + ns_log error "error during condition match: $errorMsg" set success 0 } return $success @@ -1108,7 +1108,7 @@ if {[catch { set success [regexp [lindex $value 1] [my set [lindex $value 0]]] } errorMsg]} { - my log "error during regexp: $errorMsg" + ns_log error "error during condition regexp: $errorMsg" set success 0 } return $success @@ -3530,7 +3530,7 @@ if {[catch { my create_form_fields_from_form_constraints $form_constraints } errorMsg]} { - ns_log error "$errorMsg\n$::errorInfo" + ns_log error "error during form_constraints validator: $errorMsg\n$::errorInfo" my uplevel [list set errorMsg $errorMsg] #my msg "ERROR: invalid spec '$short_spec' for form field '$spec_name' -- $errorMsg" return 0 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.327.2.9 -r1.327.2.10 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 24 Sep 2015 12:12:53 -0000 1.327.2.9 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 23 Dec 2015 18:21:56 -0000 1.327.2.10 @@ -18,7 +18,7 @@ # # externally callable method: clipboard-add # - Page instproc clipboard-add {} { + Page instproc www-clipboard-add {} { my instvar package_id if {![my exists_form_parameter "objects"]} { @@ -43,7 +43,7 @@ # # externally callable method: clipboard-clear # - Page instproc clipboard-clear {} { + Page instproc www-clipboard-clear {} { my instvar package_id ::xowiki::clipboard clear ::$package_id returnredirect [my query_parameter "return_url" [::xo::cc url]] @@ -52,7 +52,7 @@ # # externally callable method: clipboard-content # - Page instproc clipboard-content {} { + Page instproc www-clipboard-content {} { my instvar package_id set clipboard [::xowiki::clipboard get] if {$clipboard eq ""} { @@ -72,7 +72,7 @@ # # externally callable method: clipboard-copy # - Page instproc clipboard-copy {} { + Page instproc www-clipboard-copy {} { my instvar package_id set clipboard [::xowiki::clipboard get] set item_ids [::xowiki::exporter include_needed_objects $clipboard] @@ -92,7 +92,7 @@ # # externally callable method: clipboard-export # - Page instproc clipboard-export {} { + Page instproc www-clipboard-export {} { my instvar package_id set clipboard [::xowiki::clipboard get] ::xowiki::exporter export $clipboard @@ -105,7 +105,7 @@ # externally callable method: create-new # - Page instproc create-new { + Page instproc www-create-new { {-parent_id 0} {-view_method edit} {-name ""} @@ -231,14 +231,14 @@ # externally callable method: create-or-use # - Page instproc create-or-use { + Page instproc www-create-or-use { {-parent_id 0} {-view_method edit} {-name ""} {-nls_language ""} } { # can be overloaded - my create-new \ + my www-create-new \ -parent_id $parent_id -view_method $view_method \ -name $name -nls_language $nls_language } @@ -247,7 +247,7 @@ # externally callable method: csv-dump # - Page instproc csv-dump {} { + Page instproc www-csv-dump {} { if {![my is_form]} { error "not called on a form" } @@ -263,15 +263,15 @@ set includelet_key name:form-usages,form_item_ids:$form_item_id,field_names:[join $attributes " "], ::xo::cc set queryparm(includelet_key) $includelet_key # call the includelet - my view [my include [list form-usages -field_names $attributes \ + my www-view [my include [list form-usages -field_names $attributes \ -extra_form_constraints _creation_user:numeric,format=%d \ -form_item_id [my item_id] -generate csv]] } # # externally callable method: use-template # - PageInstance instproc use-template {} { + PageInstance instproc www-use-template {} { my instvar package_id set formName [my query_parameter "form" ""] if {$formName eq ""} { @@ -301,13 +301,13 @@ # externally callable method: delete # - Page instproc delete {} { + Page instproc www-delete {} { my instvar package_id item_id name # delete always via package - $package_id delete -item_id $item_id -name $name + $package_id www-delete -item_id $item_id -name $name } - PageTemplate instproc delete {} { + PageTemplate instproc www-delete {} { my instvar package_id item_id name set count [my count_usages -publish_status all] #my msg count=$count @@ -327,7 +327,7 @@ # externally callable method: delete-revision # - Page instproc delete-revision {} { + Page instproc www-delete-revision {} { my instvar revision_id package_id item_id ::xo::dc 1row get_revision { select latest_revision,live_revision from cr_items where item_id = :item_id @@ -363,7 +363,7 @@ # externally callable method: diff # - Page instproc diff {} { + Page instproc www-diff {} { my instvar package_id set compare_id [my query_parameter "compare_revision_id" 0] @@ -466,7 +466,7 @@ # # externally callable method: download # - File instproc download {} { + File instproc www-download {} { my instvar mime_type # # determine the delivery method @@ -525,7 +525,7 @@ # forwarder methods like the following: # - # FormPage instproc download {} { + # FormPage instproc www-download {} { # # If there is a link to a file, it can be downloaded as well # set target [my get_target_from_link_page] # if {$target ne "" && [$target istype ::xowiki::File]} { @@ -584,7 +584,7 @@ # externally callable method: edit # - Page instproc edit { + Page instproc www-edit { {-new:boolean false} {-autoname:boolean false} {-validation_errors ""} @@ -703,7 +703,7 @@ return [my pretty_link] } - FormPage instproc edit { + FormPage instproc www-edit { {-validation_errors ""} {-disable_input_fields 0} {-view true} @@ -839,7 +839,7 @@ # __feedback_mode to prevent recursive loops. set redirect_method [my form_parameter __form_redirect_method "view"] #my log "__redirect_method=$redirect_method" - return [my view] + return [my www-view] } else { # @@ -1035,7 +1035,7 @@ #my log "calling VIEW with HTML [string length $html]" if {$view} { - my view $html + my www-view $html } else { return $html } @@ -1044,18 +1044,18 @@ # # externally callable method: list # - Page instproc list {} { + Page instproc www-list {} { if {[my is_form]} { # The following line is here to provide a short description for # larger form-usages (a few MB) where otherwise # "ad_html_text_convert" in Page.get_description tend to use forever # (at least in Tcl 8.5) my set description "form-usages for [my name] [my title]" - return [my view [my include [list form-usages -form_item_id [my item_id]]]] + return [my www-view [my include [list form-usages -form_item_id [my item_id]]]] } if {[my is_folder_page]} { - return [my view [my include [list child-resources -publish_status all]]] + return [my www-view [my include [list child-resources -publish_status all]]] } #my msg "method list undefined for this kind of object" [my package_id] returnredirect [::xo::cc url] @@ -1065,7 +1065,7 @@ # externally callable method: make-live-revision # - Page instproc make-live-revision {} { + Page instproc www-make-live-revision {} { my instvar package_id set page_id [my query_parameter "revision_id"] if {[string is integer -strict $page_id]} { @@ -1083,7 +1083,7 @@ # externally callable method: popular-tags # - Page instproc popular-tags {} { + Page instproc www-popular-tags {} { my instvar package_id item_id parent_id set limit [my query_parameter "limit" 20] set weblog_page [$package_id get_parameter weblog_page weblog] @@ -1107,7 +1107,7 @@ # externally callable method: save-attributes # - Page ad_instproc save-attributes {} { + Page ad_instproc www-save-attributes {} { The method save-attributes is typically callable over the REST interface. It allows to save attributes of a page without adding a new revision. @@ -1180,7 +1180,7 @@ # externally callable method: revisions # - Page instproc revisions {} { + Page instproc www-revisions {} { my instvar package_id name item_id set context [list [list [$package_id url] $name ] [_ xotcl-core.revisions]] set title "[_ xotcl-core.revision_title] '$name'" @@ -1196,7 +1196,7 @@ # externally callable method: save-tags # - Page instproc save-tags {} { + Page instproc www-save-tags {} { my instvar package_id item_id revision_id ::xowiki::Page save_tags \ -user_id [::xo::cc user_id] \ @@ -1213,7 +1213,7 @@ # externally callable method: validate-attribute # - Page instproc validate-attribute {} { + Page instproc www-validate-attribute {} { set field_names [my field_names] set validation_errors 0 @@ -1243,7 +1243,7 @@ # externally callable method: view # - Page instproc view {{content ""}} { + Page instproc www-view {{content ""}} { # The method "view" is used primarily for the toplevel call, when # the xowiki page is viewed. It is not intended for e.g. embedded # wiki pages (see include), since it contains full framing, etc. Index: openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl,v diff -u -r1.11.2.1 -r1.11.2.2 --- openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 18 Aug 2015 12:42:28 -0000 1.11.2.1 +++ openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 23 Dec 2015 18:21:57 -0000 1.11.2.2 @@ -657,7 +657,24 @@ } } - + set v 5.9.1d1 + if {[apm_version_names_compare $from_version_name $v] == -1 && + [apm_version_names_compare $to_version_name $v] > -1} { + ns_log notice "-- upgrading to $v" + + foreach package_id [::xowiki::Package instances -closure true] { + ns_log notice "::xowiki::Package initialize -package_id $package_id -init_url false" + if {[catch { + ::xowiki::Package initialize -package_id $package_id -init_url false + } errorMsg]} { + ns_log notice "Could not initialize package '$package_id': $errorMsg" + continue + } + ns_log notice "update prototype page" + # reload updated prototype pages + $package_id import-prototype-page sitemapindex.xml + } + } } } Index: openacs-4/packages/xowiki/www/prototypes/sitemapindex.xml.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/prototypes/sitemapindex.xml.page,v diff -u -r1.3 -r1.3.4.1 --- openacs-4/packages/xowiki/www/prototypes/sitemapindex.xml.page 13 Sep 2012 16:05:39 -0000 1.3 +++ openacs-4/packages/xowiki/www/prototypes/sitemapindex.xml.page 23 Dec 2015 18:21:57 -0000 1.3.4.1 @@ -1,6 +1,6 @@ # -*- tcl-*- ::xowiki::Object new -title "sitemap.xml" -set publish_status production -text { - proc content {} { ::xowiki::Package google-sitemapindex } + proc content {} { ::xowiki::Package www-google-sitemapindex } }