Index: openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl 7 Aug 2017 23:48:30 -0000 1.2 +++ openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl 8 May 2019 14:33:40 -0000 1.2.2.1 @@ -1,4 +1,4 @@ -set title [$package_id get_parameter PackageTitle [$package_id instance_name]] +set title [::$package_id get_parameter PackageTitle [::$package_id instance_name]] #set toc [$page include [list toc -ajax 0 -open_page $name -decoration plain -remove_levels 0]] set toc [$page include [list toc -style list -open_page $name -expand_all 1 -decoration plain]] set i [$page set __last_includelet] @@ -14,8 +14,8 @@ if {$count > 0} { set book_relpos [format %.2f%% [expr {100.0 * $p / $count}]] - if {$p>1} {set book_prev_link [$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p - 1}]]]} - if {$p<$count} {set book_next_link [$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p + 1}]]]} + if {$p>1} {set book_prev_link [::$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p - 1}]]]} + if {$p<$count} {set book_next_link [::$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p + 1}]]]} set page_title "

[$i current] $title

" } else { set book_relpos 0.0% Index: openacs-4/packages/xowiki/resources/templates/view-book.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book.tcl,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/xowiki/resources/templates/view-book.tcl 7 Aug 2017 23:48:30 -0000 1.2 +++ openacs-4/packages/xowiki/resources/templates/view-book.tcl 8 May 2019 14:33:40 -0000 1.2.2.1 @@ -1,4 +1,4 @@ -set title [$package_id get_parameter PackageTitle [$package_id instance_name]] +set title [::$package_id get_parameter PackageTitle [::$package_id instance_name]] set toc [$page include [list toc -open_page $name -decoration plain -remove_levels 1]] set i [$page set __last_includelet] #$package_id log "--last includelet = $i, class=[$i info class] [$page exists __is_book_page]" @@ -13,8 +13,8 @@ if {$count > 0} { set book_relpos [format %.2f%% [expr {100.0 * $p / $count}]] - if {$p>1} {set book_prev_link [$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p - 1}]]]} - if {$p<$count} {set book_next_link [$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p + 1}]]]} + if {$p>1} {set book_prev_link [::$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p - 1}]]]} + if {$p<$count} {set book_next_link [::$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p + 1}]]]} set page_title "

[$i current] $title

" } else { set book_relpos 0.0% Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v diff -u -r1.54.2.11 -r1.54.2.12 --- openacs-4/packages/xowiki/tcl/chat-procs.tcl 10 Apr 2019 13:20:26 -0000 1.54.2.11 +++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 8 May 2019 14:33:40 -0000 1.54.2.12 @@ -129,7 +129,7 @@ Chat instproc check_age {key ago} { if {$ago > ${:timewindow}} { ::xo::clusterwide nsv_unset ${:array} $key - #my log "--c unsetting $key" + #:log "--c unsetting $key" return 0 } return 1 @@ -138,7 +138,7 @@ Chat instproc get_new {} { set last [expr {[nsv_exists ${:array}-seen ${:session_id}] ? [nsv_get ${:array}-seen ${:session_id}] : 0}] if {[nsv_get ${:array}-seen newest]>$last} { - #my log "--c must check ${:session_id}: [nsv_get ${:array}-seen newest] > $last" + #:log "--c must check ${:session_id}: [nsv_get ${:array}-seen newest] > $last" foreach {key value} [nsv_array get ${:array}] { lassign $value timestamp secs user msg color if {$timestamp > $last} { @@ -165,7 +165,7 @@ :add [Message new -time $secs -user_id $user -msg $msg -color $color] } } - #my log "--chat setting session_id ${:session_id}: ${:now}" + #:log "--chat setting session_id ${:session_id}: ${:now}" ::xo::clusterwide nsv_set ${:array}-seen ${:session_id} ${:now} :render } Index: openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl 17 Dec 2018 18:12:27 -0000 1.1 +++ openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl 8 May 2019 14:33:40 -0000 1.1.2.1 @@ -79,7 +79,7 @@ # we have no community_id, try to get it from site map, case (3) # set :community_id [dotlrn_community::get_community_id] - #my msg "got from context ${:community_id}" + #:msg "got from context ${:community_id}" } if {![info exists :community_id] || ${:community_id} eq ""} { @@ -111,7 +111,7 @@ -applet_key [dotlrn_[:package_key]::applet_key]] } } - #my msg community_id=${:community_id}-package_ids=$package_ids + #:msg community_id=${:community_id}-package_ids=$package_ids :cf [list shaded_p [:shaded] community_id ${:community_id} package_id $package_ids] } Index: openacs-4/packages/xowiki/tcl/folder-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/folder-procs.tcl,v diff -u -r1.55.2.4 -r1.55.2.5 --- openacs-4/packages/xowiki/tcl/folder-procs.tcl 18 Apr 2019 08:07:54 -0000 1.55.2.4 +++ openacs-4/packages/xowiki/tcl/folder-procs.tcl 8 May 2019 14:33:40 -0000 1.55.2.5 @@ -163,7 +163,7 @@ -named_objects true -object_named_after "item_id" \ -object_class ::xowiki::FormPage -initialize true] - #my msg "[llength [$links children]] links" + #:msg "[llength [$links children]] links" set folders [$folder_pages children] @@ -189,9 +189,9 @@ foreach f $sub_folders { - #my msg "$f [$f name] is a folder-link pointing to $target [$target name] current ${:current_folder_id}" + #:msg "$f [$f name] is a folder-link pointing to $target [$target name] current ${:current_folder_id}" if {[$f parent_id] eq [$target item_id]} { - #my msg "1 found child [$f name] and reset parent_id from [$f parent_id] to [$l item_id], package_id [$l package_id]" + #:msg "1 found child [$f name] and reset parent_id from [$f parent_id] to [$l item_id], package_id [$l package_id]" # # reset the current_folder if necessary # @@ -209,17 +209,17 @@ #::xo::db::CrClass get_instance_from_db -item_id [$f item_id] [$f item_id] set_resolve_context -package_id [$l package_id] -parent_id [$l item_id] } else { - #my msg "2 found child [$f name] and reset parent_id from [$f parent_id] to [$f parent_id], package id [$l package_id]" + #:msg "2 found child [$f name] and reset parent_id from [$f parent_id] to [$f parent_id], package id [$l package_id]" $f set_resolve_context -package_id [$l package_id] -parent_id [$f parent_id] #::xo::db::CrClass get_instance_from_db -item_id [$f item_id] [$f item_id] set_resolve_context -package_id [$l package_id] -parent_id [$f parent_id] } - #my msg "including $f [$f name] [$f item_id]" + #:msg "including $f [$f name] [$f item_id]" lappend folders $f } } - #my msg link=$link + #:msg link=$link lappend folders $l } return $folders @@ -233,7 +233,7 @@ set page [$page set __link_source] } set package_id [::xo::cc package_id] - set with_links [$package_id get_parameter "MenuBarSymLinks" 0] + set with_links [::$package_id get_parameter "MenuBarSymLinks" 0] #my ds [::xo::cc serialize] set lang [::xo::cc lang] @@ -245,12 +245,12 @@ -package_id $package_id] set :link_form_id [::xowiki::Weblog instantiate_forms -forms en:link.form \ -package_id $package_id] - #my msg folder_form=${:folder_form_id} + #:msg folder_form=${:folder_form_id} set :current_folder [$page get_folder -folder_form_ids ${:folder_form_id}] set :current_folder_id [${:current_folder} item_id] - #my msg "FOLDERS [$page name] package_id $package_id current_folder ${:current_folder} [${:current_folder} name]" + #:msg "FOLDERS [$page name] package_id $package_id current_folder ${:current_folder} [${:current_folder} name]" # Start with the "package's folder" as root folder set root_folder_id [::$package_id folder_id] @@ -271,7 +271,7 @@ # existence of the variable, so we unset parent_id in this case. # set opt_parent_id "" - set folder_link [$package_id package_url] + set folder_link [::$package_id package_url] if {[info exists parent_id]} {unset parent_id} } else { set parent_id ${:current_folder_id} @@ -280,37 +280,37 @@ set folder_link [${:current_folder} pretty_link] } set return_url [::xo::cc url] - set new_folder_link [$package_id make_form_link -form en:folder.form \ + set new_folder_link [::$package_id make_form_link -form en:folder.form \ -parent_id $opt_parent_id \ -return_url $return_url] if {$with_links} { - set new_sym_link [$package_id make_form_link -form en:link.form \ + set new_sym_link [::$package_id make_form_link -form en:link.form \ -parent_id $opt_parent_id \ -nls_language $nls_language -return_url $return_url] } - # set new_page_link [$package_id make_link \ + # set new_page_link [::$package_id make_link \ # $package_id edit-new \ # {object_type ::xowiki::Page} \ # parent_id return_url autoname template_file] - set new_page_link [$package_id make_form_link -form en:page.form \ + set new_page_link [::$package_id make_form_link -form en:page.form \ -parent_id $opt_parent_id \ -return_url $return_url] - set new_file_link [$package_id make_link \ + set new_file_link [::$package_id make_link \ $package_id edit-new \ {object_type ::xowiki::File} \ parent_id return_url autoname template_file] - set new_form_link [$package_id make_link \ + set new_form_link [::$package_id make_link \ $package_id edit-new \ {object_type ::xowiki::Form} \ parent_id return_url autoname template_file] - set import_link [$package_id make_link -privilege admin \ + set import_link [::$package_id make_link -privilege admin \ -link "admin/import" $package_id {} parent_id return_url] - set import_archive_link [$package_id make_form_link -form en:import-archive.form \ + set import_archive_link [::$package_id make_form_link -form en:import-archive.form \ -parent_id $opt_parent_id] - set index_link [$package_id make_link -link $folder_link ${:current_folder} list] + set index_link [::$package_id make_link -link $folder_link ${:current_folder} list] $mb add_menu_item -name Package.Startpage -item [list url $folder_link] $mb add_menu_item -name Package.Toc -item [list url $index_link] @@ -349,12 +349,12 @@ $mb add_menu_item -name Clipboard.Use.Copy -item [list url $clipboard_copy_link] $mb add_menu_item -name Clipboard.Use.Export -item [list url $clipboard_export_link] - set uploader_link [$package_id make_link ${:current_folder} file-upload] + set uploader_link [::$package_id make_link ${:current_folder} file-upload] $mb add_extra_item -name dropzone1 -type DropZone \ -item [list url $uploader_link label DropZone uploader File] #set modestate [::xowiki::mode::admin get] - #set modebutton_link [$package_id make_link ${:current_folder} toggle-modebutton] + #set modebutton_link [::$package_id make_link ${:current_folder} toggle-modebutton] #$mb add_extra_item -name admin -type ModeButton \ # -item [list url $modebutton_link on $modestate label admin] @@ -364,27 +364,27 @@ -return_url $return_url \ -nls_language $nls_language \ [list \ - {*}[$package_id get_parameter ExtraMenuEntries {}] \ + {*}[::$package_id get_parameter ExtraMenuEntries {}] \ {*}[${:current_folder} property extra_menu_entries]] } set top_folder_of_tree $root_folder # # Check, if the optional context tree view is activated # - if {$context_tree_view || [$package_id get_parameter FolderContextTreeView false]} { + if {$context_tree_view || [::$package_id get_parameter FolderContextTreeView false]} { set parent_id [${:current_folder} parent_id] if {$parent_id ne -100} { set top_folder_of_tree $parent_id - #my msg top_folder_of_tree=$top_folder_of_tree + #:msg top_folder_of_tree=$top_folder_of_tree } } set parent_folder [$top_folder_of_tree parent_id] if {$top_folder_of_tree eq $root_folder || $parent_folder eq "-100"} { set href [::$package_id package_url] set label [::$package_id instance_name] - #my msg "use instance name" + #:msg "use instance name" } else { set href [$top_folder_of_tree pretty_link] set label "[$top_folder_of_tree title] ..." @@ -406,7 +406,7 @@ -folder_form_id ${:folder_form_id} \ -link_form_id ${:link_form_id}] - #my msg "folder ${:folder_form_id} has [llength $folders] entries" + #:msg "folder ${:folder_form_id} has [llength $folders] entries" #foreach f $folders {lappend _ [$f item_id]}; :msg $_ :build_sub_tree -node $node -folders $folders @@ -514,7 +514,7 @@ set current_folder [$current_folder parent_id] ::xo::db::CrClass get_instance_from_db -item_id $current_folder } else { - set page [$package_id get_page_from_item_ref \ + set page [::$package_id get_page_from_item_ref \ -use_package_path true \ -use_site_wide_pages true \ -use_prototype_pages true \ @@ -536,11 +536,11 @@ set index [$current_folder property index] if {$index ne ""} { set download [string match "file:*" $index] - set index_link [$package_id pretty_link \ + set index_link [::$package_id pretty_link \ -parent_id [$current_folder item_id] \ -download $download \ $index] - return [$package_id returnredirect $index_link] + return [::$package_id returnredirect $index_link] } } @@ -551,7 +551,7 @@ $package_id instvar package_key set return_url [ad_return_url -default_url [$current_folder pretty_link]] - set category_url [export_vars -base [$package_id package_url] { {manage-categories 1} {object_id $package_id}}] + set category_url [export_vars -base [::$package_id package_url] { {manage-categories 1} {object_id $package_id}}] set columns {objects edit object_type name last_modified mod_user delete} foreach column $columns {set ::hidden($column) 0 } @@ -564,8 +564,8 @@ set ::__xowiki_with_publish_status [expr {$publish_status ne "ready"}] # unexisting csrf token usually means we are outside a connection thread set csrf [expr {[info exists ::__csrf_token] ? [list __csrf_token $::__csrf_token] : ""}] - set ::__xowiki_folder_link [$package_id make_link $current_folder bulk-delete $csrf] - switch [$package_id get_parameter PreferredCSSToolkit bootstrap] { + set ::__xowiki_folder_link [::$package_id make_link $current_folder bulk-delete $csrf] + switch [::$package_id get_parameter PreferredCSSToolkit bootstrap] { bootstrap {set tableWidgetClass ::xowiki::BootstrapTable} default {set tableWidgetClass ::xowiki::YUIDataTable} } Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.6 -r1.284.2.7 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 22 Apr 2019 10:42:11 -0000 1.284.2.6 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 8 May 2019 14:33:40 -0000 1.284.2.7 @@ -888,7 +888,7 @@ # } - set file_object [$package_id get_page_from_name -name $object_name -parent_id $parent_id] + set file_object [::$package_id get_page_from_name -name $object_name -parent_id $parent_id] if {$file_object ne ""} { # # File entry exists already, create a new revision @@ -918,7 +918,7 @@ # When produduction_mode is set, make sure, the new file object # is not in a published state. # - if {[$package_id get_parameter production_mode 0]} { + if {[::$package_id get_parameter production_mode 0]} { $file_object publish_status "production" } $file_object save_new {*}$save_flag @@ -1046,7 +1046,7 @@ revision_id [:get_from_value ${:value} revision_id ""] \ fn $fns { #:msg "${:name}: [list :get_from_value <${:value}> name] => '$fn'" - set href [$package_id pretty_link -download 1 -parent_id $entry_info(parent_id) $object_name] + set href [::$package_id pretty_link -download 1 -parent_id $entry_info(parent_id) $object_name] if {![:istype image]} { append href ?filename=[ns_urlencode $fn] @@ -1102,9 +1102,9 @@ # # Get the file object of the imported file to obtain is full name and path # - set file_id [$package_id lookup -parent_id [${:object} item_id] -name $(name)] + set file_id [::$package_id lookup -parent_id [${:object} item_id] -name $(name)] ::xo::db::CrClass get_instance_from_db -item_id $file_id - set full_file_name [$file_id full_file_name] + set full_file_name [::$file_id full_file_name] # # Call the archiver to unpack and handle the archive # @@ -1117,7 +1117,7 @@ # lead to maybe unexpected deletions of the form-page # if {[:cleanup]} { - set return_url [$package_id query_parameter "return_url" [$parent_id pretty_link]] + set return_url [::$package_id query_parameter "return_url" [::$parent_id pretty_link]] $package_id returnredirect [${:object} pretty_link -query [export_vars {m delete} return_url]] } } @@ -1911,7 +1911,7 @@ skin: '[:skin]', startupMode: '[:mode]', parent_id: '[${:object} item_id]', - package_url: '[$package_id package_url]', + package_url: '[::$package_id package_url]', extraPlugins: '[join [:extraPlugins] ,]', contentsCss: '[:contentsCss]', imageSelectorDialog: '[:imageSelectorDialog]', @@ -2163,7 +2163,7 @@ startupMode: '[:mode]', disableNativeSpellChecker: false, parent_id: '[${:object} item_id]', - package_url: '[$package_id package_url]', + package_url: '[::$package_id package_url]', extraPlugins: '[join [:extraPlugins] ,]', extraAllowedContent: '[:extraAllowedContent]', contentsCss: '[:contentsCss]', @@ -2923,7 +2923,7 @@ # set object_package_id [$i package_id] if {${:package_id} != $object_package_id} { - set package_prefix /[$object_package_id package_url] + set package_prefix /[::$object_package_id package_url] } else { set package_prefix "" } @@ -2964,7 +2964,7 @@ set :options [list] ::xo::dc foreach instance_select \ [${:type} instance_select_query \ - -folder_id [$package_id folder_id] \ + -folder_id [::$package_id folder_id] \ -with_subtypes ${:with_subtypes} \ -select_attributes [list title] \ -from_clause ", xowiki_page p" \ @@ -3251,24 +3251,25 @@ } set link_type [${:object} get_property_from_link_page link_type] ${:object} references resolved [list $item_id $link_type] + set item $::item_id if {${:resolve_local}} { # # resetting esp. the item-id is dangerous. # Therefore we reset it immediately after the rendering # #:log "set __RESOLVE_LOCAL" - $item_id set __RESOLVE_LOCAL 1 - $item_id set_resolve_context \ + $item set __RESOLVE_LOCAL 1 + $item set_resolve_context \ -package_id [${:object} package_id] -parent_id [${:object} parent_id] \ -item_id [${:object} item_id] - set html [$item_id render] + set html [::$item_id render] - $item_id unset __RESOLVE_LOCAL - $item_id reset_resolve_context + $item unset __RESOLVE_LOCAL + $item reset_resolve_context } else { - set html [$item_id render] + set html [$item render] } return $html } Index: openacs-4/packages/xowiki/tcl/import-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/import-procs.tcl,v diff -u -r1.42 -r1.42.2.1 --- openacs-4/packages/xowiki/tcl/import-procs.tcl 4 Jan 2019 15:54:50 -0000 1.42 +++ openacs-4/packages/xowiki/tcl/import-procs.tcl 8 May 2019 14:33:40 -0000 1.42.2.1 @@ -59,10 +59,10 @@ #:msg "$item_id update: [$object name]" ::xo::db::CrClass get_instance_from_db -item_id $item_id $item_id copy_content_vars -from_object $object - $item_id save -use_given_publish_date [$item_id exists publish_date] \ + $item_id save -use_given_publish_date [::$item_id exists publish_date] \ -modifying_user [$object set modifying_user] #:log "$item_id saved" - $object set item_id [$item_id item_id] + $object set item_id [::$item_id item_id] #:msg "$item_id updated: [$object name]" :report_line $item_id updated incr :updated @@ -82,7 +82,7 @@ # Insert these into the category object map # if {[$object exists __category_ids]} { - #:msg "$item_id map_categories [object set __category_ids] // [$item_id item_id]" + #:msg "$item_id map_categories [object set __category_ids] // [::$item_id item_id]" $item_id map_categories [$object set __category_ids] } @@ -298,10 +298,10 @@ # # For PageInstances (or its subtypes), include the parent-objects as well # - if {[$item_id istype ::xowiki::PageInstance]} { - set template_id [$item_id page_template] + if {[::$item_id istype ::xowiki::PageInstance]} { + set template_id [::$item_id page_template] if {![info exists items($template_id)]} { - ns_log notice "--export including template-object $template_id [$template_id name]" + ns_log notice "--export including template-object $template_id [::$template_id name]" set items($template_id) 1 ::xo::db::CrClass get_instance_from_db -item_id $template_id set new 1 @@ -316,7 +316,7 @@ ::xo::dc foreach export_child_obj $sql { if {![info exists items($item_id)]} { ::xo::db::CrClass get_instance_from_db -item_id $item_id - ns_log notice "--export including child $item_id [$item_id name]" + ns_log notice "--export including child $item_id [::$item_id name]" set items($item_id) 1 set new 1 $item_id set __export_reason implicit_child_page @@ -334,9 +334,9 @@ set content "" foreach item_id $item_ids { ad_try { - set obj [$item_id marshall -mode $mode] + set obj [::$item_id marshall -mode $mode] } on error {errorMsg} { - ns_log error "Error while exporting $item_id [$item_id name]\n$errorMsg\n$::errorInfo" + ns_log error "Error while exporting $item_id [::$item_id name]\n$errorMsg\n$::errorInfo" error $errorMsg } append content $obj\n @@ -357,13 +357,13 @@ ad_return_top_of_page "" foreach item_id $item_ids { - ns_log notice "--exporting $item_id [$item_id name]" - set pretty_link [expr {[$item_id package_id] ne "" ? [$item_id pretty_link] : "(not visible)"}] - ns_write "# exporting $item_id [$item_id name] $pretty_link\n" + ns_log notice "--exporting $item_id [::$item_id name]" + set pretty_link [expr {[::$item_id package_id] ne "" ? [::$item_id pretty_link] : "(not visible)"}] + ns_write "# exporting $item_id [::$item_id name] $pretty_link\n" ad_try { - set obj [$item_id marshall] + set obj [::$item_id marshall] } on error {errorMsg} { - ns_log error "Error while exporting $item_id [$item_id name]\n$errorMsg\n$::errorInfo" + ns_log error "Error while exporting $item_id [::$item_id name]\n$errorMsg\n$::errorInfo" } finally { ns_write "$obj\n" } @@ -422,15 +422,15 @@ return $success } ArchiveFile instproc import {-dir -parent_id} { - set package_id [$parent_id package_id] + set package_id [::$parent_id package_id] foreach tmpfile [glob -nocomplain -directory $dir *] { #:msg "work on $tmpfile [::file isdirectory $tmpfile]" set file_name [::file tail $tmpfile] if {[::file isdirectory $tmpfile]} { # ignore mac os x resource fork directories if {[string match "*__MACOSX" $tmpfile]} continue - set folder_object [$package_id get_page_from_name -assume_folder true \ + set folder_object [::$package_id get_page_from_name -assume_folder true \ -name $file_name -parent_id $parent_id] if {$folder_object ne ""} { # if the folder exists already, we have nothing to do @@ -454,7 +454,7 @@ } else { set mime_type [::xowiki::guesstype $file_name] if {[string match "image/*" $mime_type] && [:use_photo_form]} { - set photo_object [$package_id get_page_from_name -name en:$file_name -parent_id $parent_id] + set photo_object [::$package_id get_page_from_name -name en:$file_name -parent_id $parent_id] if {$photo_object ne ""} { # photo entry exists already, create a new revision :log "Photo $file_name exists already" @@ -488,7 +488,7 @@ #:log "after convert to internal $file_name" } } else { - set file_object [$package_id get_page_from_name -name file:$file_name -parent_id $parent_id] + set file_object [::$package_id get_page_from_name -name file:$file_name -parent_id $parent_id] if {$file_object ne ""} { :msg "file $file_name exists already" # file entry exists already, create a new revision Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.239.2.7 -r1.239.2.8 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 18 Apr 2019 08:07:54 -0000 1.239.2.7 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 8 May 2019 14:33:40 -0000 1.239.2.8 @@ -156,7 +156,7 @@ package_id locale } { - set default_locale [$package_id default_locale] + set default_locale [::$package_id default_locale] set system_locale "" set with_system_locale [regexp {(.*)[+]system} $locale _ locale] @@ -228,9 +228,9 @@ # of the returned pages should be a direct child of the folder. # if {$parent_id eq ""} { - set parent_id [$base_package_id folder_id] + set parent_id [::$base_package_id folder_id] } - set packages [$base_package_id package_path] + set packages [::$base_package_id package_path] if {$use_package_path && [llength $packages] > 0} { set parent_ids [list $parent_id] foreach p $packages {lappend parent_ids [$p folder_id]} @@ -450,7 +450,7 @@ set html [next] set localized_title [::xo::localize $title] set link [expr {[string match "*:*" $name] ? - "[ns_quotehtml $localized_title]" : + "[ns_quotehtml $localized_title]" : $localized_title}] ::xo::render_localizer return [subst [[self class] set template]] @@ -472,7 +472,7 @@ set localized_title [::xo::localize $title] set edit_button [:include [list edit-item-button -book_mode true]] set link [expr {[string match "*:*" $name] ? - "[ns_quotehtml $localized_title]" : + "[ns_quotehtml $localized_title]" : $localized_title}] return [subst [[self class] set template]] } -set template {
@@ -561,7 +561,7 @@ rss-button instproc render {} { :get_parameters set parent_ids [${:__including_page} parent_id] - set href [export_vars -base [$package_id package_url] {{rss $span} parent_ids name_filter title entries_of}] + set href [export_vars -base [::$package_id package_url] {{rss $span} parent_ids name_filter title entries_of}] ::xo::Page requireLink -rel alternate -type application/rss+xml -title RSS -href $href return "RSS" } @@ -582,8 +582,8 @@ bookmarklet-button instproc render {} { :get_parameters set parent_id [${:__including_page} parent_id] - set url [$package_id pretty_link -absolute 1 -siteurl $siteurl -parent_id $parent_id news-item] - if {$label eq ""} {set label "Add to [$package_id instance_name]"} + set url [::$package_id pretty_link -absolute 1 -siteurl $siteurl -parent_id $parent_id news-item] + if {$label eq ""} {set label "Add to [::$package_id instance_name]"} if {![info exists :id]} {set :id [::xowiki::Includelet html_id [self]]} template::add_event_listener \ @@ -667,18 +667,19 @@ categories instproc category_tree_edit_button {-object_id:integer -locale {-allow_edit false} -tree_id:integer} { set allow_p [::xo::cc permission -object_id $object_id -privilege admin -party_id [::xo::cc set untrusted_user_id]] if {$allow_edit && $allow_p} { + set package ::${:package_id} if {[info exists tree_id]} { # # If a tree_id is given, edit directly the category tree ... # - set href "[${:package_id} package_url]?edit-category-tree&object_id=$object_id&tree_id=$tree_id" + set href "[$package package_url]?edit-category-tree&object_id=$object_id&tree_id=$tree_id" return [${:__including_page} include \ [list edit-item-button -link $href -title [_ xowiki.Edit_category] -target _blank]] } else { # # ... otherwise, manage categories (allow defining new category trees, map/unmap, etc.) # - set href "[${:package_id} package_url]?manage-categories&object_id=$object_id" + set href "[$package package_url]?manage-categories&object_id=$object_id" return [${:__including_page} include \ [list edit-item-button -link $href -title [_ xowiki.Manage_categories] -target _blank]] } @@ -695,7 +696,7 @@ } else { set msg "No category tree with name '$name' found." } - ${:package_id} flush_page_fragment_cache -scope agg + ::${:package_id} flush_page_fragment_cache -scope agg set html "
[ns_quotehtml $msg]
" if {$edit_html ne ""} { return "$html Manage Categories? $edit_html" @@ -707,7 +708,7 @@ :get_parameters set content "" - set folder_id [$package_id folder_id] + set folder_id [::$package_id folder_id] set open_item_id [expr {$open_page ne "" ? [::xo::db::CrClass lookup -name $open_page -parent_id $folder_id] : 0}] @@ -926,7 +927,7 @@ -vars "c.category_id, ci.name, ci.parent_id, r.title, r.publish_date, \ to_char(r.publish_date,'YYYY-MM-DD HH24:MI:SS') as formatted_date" \ -from "category_object_map_tree c, cr_items ci, cr_revisions r, xowiki_page p" \ - -where "c.object_id = ci.item_id and ci.parent_id = [$package_id folder_id] \ + -where "c.object_id = ci.item_id and ci.parent_id = [::$package_id folder_id] \ and r.revision_id = ci.live_revision \ and p.page_id = r.revision_id $tree_select_clause $locale_clause \ and ci.publish_status <> 'production'" \ @@ -1011,7 +1012,7 @@ $entry instvar parent_id formatted_date page_id {title entry_title} {name entry_name} set entry_package_id [$entry set package_id] - set page_link [$entry_package_id pretty_link -parent_id $parent_id $entry_name] + set page_link [::$entry_package_id pretty_link -parent_id $parent_id $entry_name] switch -- $pretty_age { 1 {set age [::xowiki::utility pretty_age -timestamp [clock scan $formatted_date] -locale [:locale]]} 2 {set age [::xowiki::utility pretty_age -timestamp [clock scan $formatted_date] -locale [:locale] -levels 2]} @@ -1025,7 +1026,7 @@ if {$allow_edit} { set p [::xo::db::CrClass get_instance_from_db -item_id 0 -revision_id $page_id] - set edit_link [$entry_package_id make_link -link $page_link $p edit return_url] + set edit_link [::$entry_package_id make_link -link $page_link $p edit return_url] #:log "page_link=$page_link, edit=$edit_link" [t1 last_child] set edit.href $edit_link [t1 last_child] set edit " " @@ -1034,7 +1035,7 @@ if {![info exists p]} { set p [::xo::db::CrClass get_instance_from_db -item_id 0 -revision_id $page_id] } - set delete_link [$entry_package_id make_link -link $page_link $p delete return_url] + set delete_link [::$entry_package_id make_link -link $page_link $p delete return_url] [t1 last_child] set delete.href $delete_link [t1 last_child] set delete " " } @@ -1048,7 +1049,7 @@ } else { # provide a link to the original set href $page_link - set label [$entry_package_id instance_name] + set label [::$entry_package_id instance_name] set title [_ xowiki.view_in_context [list context $label]] set alt $title set class "inherited" @@ -1099,7 +1100,7 @@ { t1 add \ -title $title \ - -title.href [$package_id pretty_link -parent_id $parent_id $name] + -title.href [::$package_id pretty_link -parent_id $parent_id $name] } return [t1 asHTML] } @@ -1152,7 +1153,7 @@ -limit $max_entries ] { t1 add \ -title $title \ - -title.href [$package_id pretty_link -parent_id $parent_id $name] \ + -title.href [::$package_id pretty_link -parent_id $parent_id $name] \ -users $nr_different_users } } else { @@ -1174,7 +1175,7 @@ -limit $max_entries] { t1 add \ -title $title \ - -title.href [$package_id pretty_link -parent_id $parent_id $name] \ + -title.href [::$package_id pretty_link -parent_id $parent_id $name] \ -users $nr_different_users \ -count $sum } @@ -1310,7 +1311,7 @@ )" set or_clause "" - set folder_id [$package_id folder_id] + set folder_id [::$package_id folder_id] ::xo::dc foreach unread-items \ [::xo::dc select \ @@ -1330,7 +1331,7 @@ { t1 add \ -title $title \ - -title.href [$package_id pretty_link -parent_id $parent_id $name] + -title.href [::$package_id pretty_link -parent_id $parent_id $name] } return [t1 asHTML] } @@ -1380,9 +1381,9 @@ } set entries [list] - if {![info exists page]} {set page [$package_id get_parameter weblog_page]} + if {![info exists page]} {set page [::$package_id get_parameter weblog_page]} - set href [$package_id package_url]tag/ + set href [::$package_id package_url]tag/ ::xo::dc foreach get_tag_counts $sql { set q [list] if {$summary} {lappend q "summary=[ad_urlencode_query $summary]"} @@ -1412,18 +1413,18 @@ set p_link [${:__including_page} pretty_link] set return_url [::xo::cc url]?[::xo::cc actual_query] - set weblog_page [$package_id get_parameter weblog_page weblog] - set save_tag_link [$package_id make_link -link $p_link ${:__including_page} \ + set weblog_page [::$package_id get_parameter weblog_page weblog] + set save_tag_link [::$package_id make_link -link $p_link ${:__including_page} \ save-tags return_url] - set popular_tags_link [$package_id make_link -link $p_link ${:__including_page} \ + set popular_tags_link [::$package_id make_link -link $p_link ${:__including_page} \ popular-tags] set :tags [lsort [::xowiki::Page get_tags -user_id [::xo::cc user_id] \ -item_id [${:__including_page} item_id] -package_id $package_id]] set entries [list] foreach tag ${:tags} { - set href [export_vars -base [$package_id package_url]/tag/$tag {summary}] + set href [export_vars -base [::$package_id package_url]/tag/$tag {summary}] lappend entries "" } set tags_with_links [join [lsort $entries] {, }] @@ -1466,16 +1467,16 @@ :get_parameters set content "" - set weblog_page [$package_id get_parameter weblog_page weblog] + set weblog_page [::$package_id get_parameter weblog_page weblog] set entries [list] - set href [export_vars -base [$package_id package_url]$weblog_page {summary}] + set href [export_vars -base [::$package_id package_url]$weblog_page {summary}] set notification_type "" - if {[$package_id get_parameter "with_notifications" 1] && + if {[::$package_id get_parameter "with_notifications" 1] && [::xo::cc user_id] != 0} { ;# notifications require login set notification_type [notification::type::get_type_id -short_name xowiki_notif] } - if {[$package_id exists_query_parameter return_url]} { - set return_url [$package_id query_parameter return_url] + if {[::$package_id exists_query_parameter return_url]} { + set return_url [::$package_id query_parameter return_url] } foreach cat_id [category::get_mapped_categories [${:__including_page} set item_id]] { lassign [category::get_data $cat_id] category_id category_name tree_id tree_name @@ -1514,7 +1515,7 @@ my-general-comments instproc render {} { :get_parameters set item_id [${:__including_page} item_id] - set gc_return_url [$package_id url] + set gc_return_url [::$package_id url] # # Even, if general_comments is turned on, don't offer the # link to add comments, unless the user is logged in. @@ -1602,7 +1603,7 @@ :get_parameters set publisher [ad_urlencode $publisher] - set feedname [ad_urlencode [$package_id get_parameter PackageTitle [$package_id instance_name]]] + set feedname [ad_urlencode [::$package_id get_parameter PackageTitle [::$package_id instance_name]]] set rssurl [ad_urlencode $rssurl] set my_yahoo_link "http://us.rd.yahoo.com/my/atm/$publisher/$feedname/*http://add.my.yahoo.com/rss?url=$rssurl" @@ -1725,7 +1726,7 @@ # package root folder. # if {$i eq [${:__including_page} item_id] - || $i eq [$package_id folder_id]} { + || $i eq [::$package_id folder_id]} { continue } set page [::xo::db::CrClass get_instance_from_db -item_id $i] @@ -1801,7 +1802,7 @@ set what " on page [${:__including_page} title]" } else { set extra_where_clause "" - set what " in community [$package_id instance_name]" + set what " in community [::$package_id instance_name]" } if {!$summary} { @@ -1989,7 +1990,7 @@ # TODO just needed for michael aram? set parent_id [${:__including_page} item_id] } else { - #set parent_id [$package_id folder_id] + #set parent_id [::$package_id folder_id] set parent_id [${:__including_page} parent_id] } @@ -2296,7 +2297,7 @@ if {$allow_reorder ne ""} { :page_reorder_init_vars -allow_reorder $allow_reorder js last_level ID min_level - set js "\nYAHOO.xo_page_order_region.DDApp.package_url = '[$package_id package_url]';" + set js "\nYAHOO.xo_page_order_region.DDApp.package_url = '[::$package_id package_url]';" set HTML [$tree render -style listdnd -js $js -context [list min_level $min_level]] } else { set HTML [$tree render -style list] @@ -2432,7 +2433,7 @@ set pages [::xowiki::Page instantiate_objects -sql \ "select page_id, name, title, item_id \ from xowiki_page_live_revision p \ - where parent_id = [$package_id folder_id] \ + where parent_id = [::$package_id folder_id] \ and name in $page_names \ [::xowiki::Page container_already_rendered item_id]" ] foreach p [$pages children] { @@ -2707,7 +2708,7 @@ # TODO just needed for michael aram? set parent_id [${:__including_page} item_id] } else { - #set parent_id [$package_id folder_id] + #set parent_id [::$package_id folder_id] set parent_id [${:__including_page} parent_id] } @@ -3050,15 +3051,15 @@ {-target ""} } { set html "" - if {![info exists return_url] || $return_url eq ""} {set return_url [$package_id url]} + if {![info exists return_url] || $return_url eq ""} {set return_url [::$package_id url]} if {![info exists alt]} {set alt $method} if {![info exists link] || $link eq ""} { if {[$page istype ::xowiki::Package]} { - set link [$package_id make_link $package_id edit-new object_type \ + set link [::$package_id make_link $package_id edit-new object_type \ return_url page_order source_item_id] } else { set p_link [$page pretty_link] - set link [$package_id make_link -link $p_link $page $method \ + set link [::$package_id make_link -link $p_link $page $method \ return_url page_order source_item_id] } } @@ -3301,7 +3302,7 @@ } if {![info exists user_id]} {set user_id [::xo::cc user_id]} - set folder_id [$package_id folder_id] + set folder_id [::$package_id folder_id] ::xo::dc foreach get_collaborators { select count(revision_id), item_id, creation_user from cr_revisions r, acs_objects o @@ -3391,7 +3392,7 @@ -vars "i.item_id, revision_id, creation_user" \ -from "cr_revisions cr, cr_items i, acs_objects o" \ -where "cr.item_id = i.item_id \ - and i.parent_id = [$package_id folder_id] \ + and i.parent_id = [::$package_id folder_id] \ and o.object_id = revision_id" \ -orderby "revision_id desc" \ -limit $max_activities] \ @@ -3635,7 +3636,7 @@ set parent_id [${:__including_page} item_id] } } else { - #set parent_id [$package_id folder_id] + #set parent_id [::$package_id folder_id] set parent_id [${:__including_page} parent_id] } if {![info exists button_objs]} { @@ -3901,10 +3902,10 @@ -default_lang [$o lang] \ -forms $inherit_form -package_id [$o package_id]] if {$inherit_form_id ne ""} { - if {[$inherit_form_id istype ::xowiki::FormPage]} { - set p [$inherit_form_id property form_constraints] + if {[::$inherit_form_id istype ::xowiki::FormPage]} { + set p [::$inherit_form_id property form_constraints] } else { - set p [$inherit_form_id form_constraints] + set p [::$inherit_form_id form_constraints] } append form_constraints $p\n lappend inherit_form_ids $inherit_form_id @@ -3995,7 +3996,7 @@ foreach bulk_action $bulk_actions { if {$bulk_action eq "export"} { append actions [subst {Action bulk-delete -label [_ xowiki.export] -tooltip [_ xowiki.export] \ - -url [$package_id package_url]admin/export}]\n + -url [::$package_id package_url]admin/export}]\n } } if {[llength $bulk_actions] > 0} { @@ -4123,7 +4124,7 @@ } #:log "queries done" if {[info exists wf]} { - set wf_link [$package_id pretty_link -parent_id $parent_id -path_encode false $wf] + set wf_link [::$package_id pretty_link -parent_id $parent_id -path_encode false $wf] } set this_url [ad_return_url] @@ -4160,7 +4161,7 @@ set image inactive.png set state "ready" } - set url [export_vars -base [$package_id package_url]admin/set-publish-state \ + set url [export_vars -base [::$package_id package_url]admin/set-publish-state \ {state {revision_id "[$p set revision_id]"} {return_url $this_url}}] $__c set _publish_status.src /resources/xowiki/$image $__c set _publish_status.href $url @@ -4169,12 +4170,12 @@ $__c set _edit " " $__c set _edit.title #xowiki.edit# #set template_file view-default - $__c set _edit.href [$package_id make_link -link $page_link $p edit return_url template_file] + $__c set _edit.href [::$package_id make_link -link $page_link $p edit return_url template_file] } if {[info exists use_button(delete)]} { $__c set _delete " " $__c set _delete.title #xowiki.delete# - $__c set _delete.href [$package_id make_link -link $page_link $p delete return_url] + $__c set _delete.href [::$package_id make_link -link $page_link $p delete return_url] } if {[info exists use_button(view)]} { $__c set _view " " @@ -4200,7 +4201,7 @@ $__ff($__fn) object $p $__c set $__fn [$__ff($__fn) pretty_value [$p property $__fn]] } - $__c set _name [$package_id external_name -parent_id [$p parent_id] [$p name]] + $__c set _name [::$package_id external_name -parent_id [$p parent_id] [$p name]] } # @@ -4342,7 +4343,7 @@ $item_id set_property form $form } $item_id save - set form_href [$item_id pretty_link] + set form_href [::$item_id pretty_link] set action updated } return "#xowiki.form-$action# [ns_quotehtml $form_name]" @@ -4451,7 +4452,7 @@ set entry_field_names [$entry field_names] set entry_form_fields [::xowiki::FormPage get_table_form_fields \ -base_item $form_item_id -field_names $entry_field_names \ - -form_constraints [$form_item_id set form_constraints]] + -form_constraints [::$form_item_id set form_constraints]] foreach fn $entry_field_names f $entry_form_fields {set ff($fn) $f} } $entry load_values_into_form_fields $entry_form_fields @@ -4534,7 +4535,7 @@ set parent_id [${:__including_page} parent_id] if {[info exists folder]} { - set folder_page [$package_id get_page_from_item_ref -parent_id $parent_id $folder] + set folder_page [::$package_id get_page_from_item_ref -parent_id $parent_id $folder] if {$folder_page eq ""} { error "no such folder '$folder'" } else { @@ -4749,7 +4750,7 @@ if {$title eq ""} {set title $file} set parent_id [${:__including_page} parent_id] - set page [$package_id get_page_from_item_ref -parent_id $parent_id $file] + set page [::$package_id get_page_from_item_ref -parent_id $parent_id $file] if {$page eq ""} { error "could not resolve page from item ref $file" } Index: openacs-4/packages/xowiki/tcl/menu-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/menu-procs.tcl,v diff -u -r1.19 -r1.19.2.1 --- openacs-4/packages/xowiki/tcl/menu-procs.tcl 21 Sep 2018 14:19:14 -0000 1.19 +++ openacs-4/packages/xowiki/tcl/menu-procs.tcl 8 May 2019 14:33:40 -0000 1.19.2.1 @@ -297,12 +297,12 @@ ad_log warning "$me, name 'form_link' is deprecated, use 'entry' instead" } if {[dict exists $properties -form]} { - set link [$package_id make_form_link \ + set link [::$package_id make_form_link \ -form [dict get $properties -form] \ -parent_id $parent_id \ -nls_language $nls_language -return_url $return_url] } elseif {[dict exists $properties -object_type]} { - set link [$package_id make_link \ + set link [::$package_id make_link \ $package_id edit-new \ [list object_type [dict get $properties -object_type]] \ parent_id return_url autoname template_file] @@ -329,7 +329,7 @@ } } - set link [$package_id make_link $parent_id file-upload] + set link [::$package_id make_link $parent_id file-upload] :add_extra_item -name $name -type DropZone \ -item [list url $link uploader $uploader label $label] } @@ -347,7 +347,7 @@ } if {$label eq ""} {set label $button} set state [::xowiki::mode::$button get] - set link [$package_id make_link $parent_id toggle-modebutton] + set link [::$package_id make_link $parent_id toggle-modebutton] :add_extra_item -name $name -type ModeButton \ -item [list url $link on $state label $label] } 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.332.2.7 -r1.332.2.8 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 17 Apr 2019 09:29:57 -0000 1.332.2.7 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 8 May 2019 14:33:40 -0000 1.332.2.8 @@ -337,7 +337,7 @@ set context_name [lindex $parts $index] if {1 && $parent_id in $folder_ids} { #:msg "---- parent $parent_id in $folder_ids" - set context_id [$context_id item_id] + set context_id [::$context_id item_id] set fo [::xo::db::CrClass get_instance_from_db -item_id $context_id] } else { #:msg "context_url $context_url, parts $parts, context_name $context_name // parts $parts // index $index / folder $fo" @@ -346,7 +346,7 @@ set context_folder [:get_page_from_name -parent_id $parent_id -assume_folder true -name $context_name] if {$context_folder eq ""} { :msg "my get_page_from_name -parent_id $parent_id -assume_folder true -name $context_name ==> EMPTY" - :msg "Cannot lookup '$context_name' in package folder $parent_id [$parent_id name]" + :msg "Cannot lookup '$context_name' in package folder $parent_id [::$parent_id name]" set new_path [join [lrange $parts 0 $index] /] set p2 [:get_parent_and_name -path [join [lrange $parts 0 $index] /] -lang "" -parent_id $parent_id parent local_name] @@ -369,9 +369,9 @@ if {[$fo is_link_page]} { set pid [$fo package_id] foreach id $ids { - if {[$id package_id] ne $pid} { - #:msg "SYMLINK ++++ have to fix package_id of $id from [$id package_id] to $pid" - $id set_resolve_context -package_id $pid -parent_id [$id parent_id] + if {[::$id package_id] ne $pid} { + #:msg "SYMLINK ++++ have to fix package_id of $id from [::$id package_id] to $pid" + $id set_resolve_context -package_id $pid -parent_id [::$id parent_id] } } if {0} { @@ -494,7 +494,7 @@ set parent_id [:folder_id] } set folder [:folder_path -parent_id $parent_id -folder_ids $folder_ids -path_encode $path_encode] - set pkg [$parent_id package_id] + set pkg [::$parent_id package_id] if {![:isobject ::$pkg]} { ::xowiki::Package initialize -package_id $pkg -init_url false -keep_cc true } @@ -721,16 +721,17 @@ # ::xowiki::Package initialize -parameter {{-m view}} -url $(url)$(provided_name) \ -actual_query "" - #:log "url=$url=>[$package_id serialize]" + #:log "url=$url=>[::$package_id serialize]" if {$package_id != 0} { # # For the resolver, we create a fresh context to avoid recursive loops, when # e.g. revision_id is set through a query parameter... # - set last_context [expr {[$package_id exists context] ? [$package_id context] : "::xo::cc"}] - $package_id context [::xo::Context new -volatile] - set object_name [$package_id set object] + set package ::$package_id + set last_context [expr {[$package exists context] ? [$package context] : "::xo::cc"}] + $package context [::xo::Context new -volatile] + set object_name [$package set object] #:log "cross package request got object=$object_name" # # A user might force the language by preceding the @@ -743,17 +744,20 @@ } set object_name ${lang}:$object_name } - set page [$package_id resolve_page -simple true $object_name __m] - $package_id context $last_context + set page [$package resolve_page -simple true $object_name __m] + $package context $last_context } $last_package_id set_url -url $last_url } else { + # # It is not a cross package request - set last_context [expr {[$package_id exists context] ? [$package_id context] : "::xo::cc"}] - $package_id context [::xo::Context new -volatile] - set page [$package_id resolve_page -use_package_path $(search) $(page_name) __m] - $package_id context $last_context + # + set package ::$package_id + set last_context [expr {[$package exists context] ? [$package context] : "::xo::cc"}] + $package context [::xo::Context new -volatile] + set page [$package resolve_page -use_package_path $(search) $(page_name) __m] + $package context $last_context } #:log "returning $page" return $page @@ -857,7 +861,7 @@ #:log "instantiate_forms -parent_id $parent_id -forms $form => $form_id " if {$form_id ne ""} { if {$parent_id eq ""} {unset parent_id} - set form_link [$form_id pretty_link] + set form_link [::$form_id pretty_link] #:msg "$form -> $form_id -> $form_link -> [:make_link -link $form_link $form_id \ # create-new return_url title parent_id name nls_language]" return [:make_link -link $form_link $form_id \ @@ -1350,7 +1354,7 @@ set target [$p get_target_from_link_page] set target_package_id [$target package_id] #:msg "SYMLINK LOOKUP from target-package $target_package_id source package $(package_id)" - set target_item_id [$target_package_id lookup \ + set target_item_id [::$target_package_id lookup \ -use_package_path $use_package_path \ -use_site_wide_pages $use_site_wide_pages \ -default_lang $default_lang \ @@ -1647,9 +1651,9 @@ # e.g. special link_types as for e.g. file|image|js|css|swf, etc. # ::xo::db::CrClass get_instance_from_db -item_id $item_id - set name [$item_id name] - set parent_id [$item_id parent_id] - if {[$item_id is_folder_page]} { + set name [::$item_id name] + set parent_id [::$item_id parent_id] + if {[::$item_id is_folder_page]} { return [list link_type "folder" prefix "" stripped_name $name parent_id $parent_id] } set stripped_name $name @@ -1723,7 +1727,7 @@ # We encompassed a link to a page or folder, treat both the same way. # set link_id $(parent_id) - set target [$link_id get_target_from_link_page] + set target [::$link_id get_target_from_link_page] $target set_resolve_context -package_id ${:id} -parent_id $link_id array set "" [list logical_package_id ${:id} logical_parent_id $link_id] @@ -1780,13 +1784,13 @@ # facilities. #:log cross-package - return [$referenced_package_id get_page_from_item_ref \ + return [::$referenced_package_id get_page_from_item_ref \ -allow_cross_package_item_refs false \ -use_package_path false \ -use_site_wide_pages false \ -use_prototype_pages false \ -default_lang $default_lang \ - -parent_id [$referenced_package_id folder_id] \ + -parent_id [::$referenced_package_id folder_id] \ $rest_link] } else { # it is a link to the same package, we start search for page at top. @@ -1924,7 +1928,7 @@ $page set_content [string trim [$page text] " \n"] $page initialize_loaded_object - set p [$package_id get_page_from_name -name $fullName -parent_id $parent_id] + set p [::$package_id get_page_from_name -name $fullName -parent_id $parent_id] #:log "--get_page_from_name --> '$p'" if {$p eq ""} { # We have to create the page new. The page is completed with @@ -2178,8 +2182,7 @@ @param days report entries changed in specified last days } { - set package_id ${:id} - set folder_id [$package_id folder_id] + set folder_id [:${:id} folder_id] if {![info exists name_filter]} { set name_filter [:get_parameter -type word name_filter ""] } @@ -2230,8 +2233,8 @@ @param priority priority as defined by google } { - set package_id ${:id} - set folder_id [::$package_id folder_id] + set package ::${:id} + set folder_id [$package folder_id] set timerange_clause "" @@ -2261,7 +2264,7 @@ set time "[clock format [clock scan $time] -format {%Y-%m-%dT%T}]${tz}:00" append content \n\ - [::$package_id pretty_link -absolute true -parent_id $parent_id $name] \n\ + [$package pretty_link -absolute true -parent_id $parent_id $name] \n\ $time \n\ $changefreq \n\ $priority \n\ Index: openacs-4/packages/xowiki/tcl/repeat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/repeat-procs.tcl,v diff -u -r1.14.2.4 -r1.14.2.5 --- openacs-4/packages/xowiki/tcl/repeat-procs.tcl 9 Apr 2019 14:08:12 -0000 1.14.2.4 +++ openacs-4/packages/xowiki/tcl/repeat-procs.tcl 8 May 2019 14:33:40 -0000 1.14.2.5 @@ -176,7 +176,7 @@ set values [:value] :trim_values set r [next] - #my msg name=[:name],value=[:get_compound_value] + #:msg name=[:name],value=[:get_compound_value] # # remove "unneeded" entries from instance attributes Index: openacs-4/packages/xowiki/tcl/weblog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/weblog-procs.tcl,v diff -u -r1.75.2.7 -r1.75.2.8 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 10 Mar 2019 21:01:03 -0000 1.75.2.7 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 8 May 2019 14:33:40 -0000 1.75.2.8 @@ -43,7 +43,7 @@ error "invalid form specification '$t'" } #:log "trying to get $t // parent_id $parent_id" - set page [$package_id get_page_from_item_ref \ + set page [::$package_id get_page_from_item_ref \ -use_prototype_pages true \ -use_package_path true \ -parent_id $parent_id \ 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.147.2.2 -r1.147.2.3 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 31 Mar 2019 11:18:00 -0000 1.147.2.2 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 8 May 2019 14:33:40 -0000 1.147.2.3 @@ -58,7 +58,7 @@ # if there is no field spec, use the default from the slot definitions set __spec [expr {[info exists :f.$__field] ? [set :f.$__field] : "="}] set __wspec [lindex $__spec 0] - #my msg "$__field: wspec=$__wspec, spec=$__spec" + #:msg "$__field: wspec=$__wspec, spec=$__spec" # check first if we have widget_specs. # TODO: this part is likely to be removed in the future. @@ -217,7 +217,7 @@ $data instvar package_id if {[$data istype ::xowiki::PodcastItem] && $duration eq "" && [$data exists import_file]} { set filename [expr {[$data exists full_file_name] ? [$data full_file_name] : [$data set import_file]}] - set ffmpeg [$package_id get_parameter "ffmpeg" "/usr/bin/ffmpeg"] + set ffmpeg [::$package_id get_parameter "ffmpeg" "/usr/bin/ffmpeg"] if {[file exists $ffmpeg]} { catch {exec $ffmpeg -i $filename} output if {[info exists output]} { @@ -238,7 +238,7 @@ $form instvar data } $data instvar package_id - set cc [$package_id context] + set cc [::$package_id context] set old_name [$cc form_parameter __object_name ""] #$data msg "validate: old='$old_name', current='$name'" @@ -252,9 +252,9 @@ # Caveat: the error message is always the same. # set package_id [$cc package_id] - set computed_link [export_vars -base [$package_id package_url] {{edit-new 1} name + set computed_link [export_vars -base [::$package_id package_url] {{edit-new 1} name {object_type ::xowiki::File}}] - set granted [$package_id check_permissions -link $computed_link $package_id edit-new] + set granted [::$package_id check_permissions -link $computed_link $package_id edit-new] #$data msg computed_link=$computed_link,granted=$granted if {!$granted} { util_user_message -message "User not authorized to create a file named $name" 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.542.2.13 -r1.542.2.14 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 11 Apr 2019 14:04:39 -0000 1.542.2.13 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 8 May 2019 14:33:40 -0000 1.542.2.14 @@ -1186,7 +1186,7 @@ Page proc import {-user_id -package_id -folder_id {-replace 0} -objects} { :log "DEPRECATED" if {![info exists package_id]} {set package_id [::xo::cc package_id]} - set cmd [list $package_id import -replace $replace] + set cmd [list ::$package_id import -replace $replace] if {[info exists user_id]} {lappend cmd -user_id $user_id} if {[info exists objects]} {lappend cmd -objects $objects} @@ -1340,7 +1340,7 @@ # get_form_entries via item-ids, not via new-objects ::xo::db::CrClass get_instance_from_db -item_id ${:item_id} - set props [::xo::cc cache [list ${:item_id} compute_link_properties $item_ref]] + set props [::xo::cc cache [list ::${:item_id} compute_link_properties $item_ref]] if {[dict exists $props $property]} { #${:item_id} msg "prop $property ==> [dict get $props $property]" return [dict get $props $property] @@ -1375,7 +1375,7 @@ FormPage instproc compute_link_properties {item_ref} { set package_id ${:package_id} - set page [$package_id get_page_from_item_ref \ + set page [::$package_id get_page_from_item_ref \ -default_lang [:lang] \ -parent_id ${:parent_id} \ $item_ref] @@ -1425,7 +1425,7 @@ :instvar name item_id package_id parent_id publish_status \ page_template instance_attributes assignee state - set useHstore [$package_id get_parameter use_hstore 0] + set useHstore [::$package_id get_parameter use_hstore 0] set updateVars {name = :name, package_id = :package_id, parent_id = :parent_id, publish_status = :publish_status, page_template = :page_template, assignee = :assignee, @@ -1951,7 +1951,7 @@ # Include a wiki page, tailorable. # #set page [:resolve_included_page_name $page_name] - set page [$package_id get_page_from_item_ref \ + set page [::$package_id get_page_from_item_ref \ -use_package_path true \ -use_site_wide_pages true \ -use_prototype_pages true \ @@ -1963,7 +1963,7 @@ # we use as default decoration for included pages # the "portlet" decoration # - $page set __decoration [$package_id get_parameter default-portlet-decoration portlet] + $page set __decoration [::$package_id get_parameter default-portlet-decoration portlet] } } @@ -2044,7 +2044,7 @@ } if {[$page istype ::xowiki::Page]} { set package_id [$page package_id] - set allowed [[$package_id set policy] check_permissions \ + set allowed [[::$package_id set policy] check_permissions \ -package_id $package_id \ -user_id [::xo::cc set untrusted_user_id] \ $page view] @@ -2293,7 +2293,7 @@ set link_info [:get_anchor_and_query $link] set parent_id [expr {$package_id == ${:package_id} ? - ${:parent_id} : [$package_id folder_id]}] + ${:parent_id} : [::$package_id folder_id]}] # we might consider make this configurable set use_package_path true @@ -2303,7 +2303,7 @@ # # a language link (it starts with a ':') # - set item_ref_info [$package_id item_ref \ + set item_ref_info [::$package_id item_ref \ -use_package_path $use_package_path \ -default_lang [:lang] \ -parent_id $parent_id \ @@ -2318,7 +2318,7 @@ # set is_self_link true set package_id [:physical_package_id] - set item_ref_info [$package_id item_ref \ + set item_ref_info [::$package_id item_ref \ -use_package_path $use_package_path \ -default_lang [:lang] \ -parent_id [:physical_item_id] \ @@ -2330,7 +2330,7 @@ # # A plain link, search relative to the parent. # - set item_ref_info [$package_id item_ref \ + set item_ref_info [::$package_id item_ref \ -use_package_path $use_package_path \ -default_lang [:lang] \ -parent_id $parent_id \ @@ -2383,7 +2383,7 @@ if {[info exists parent_id] && $parent_id eq ""} { unset parent_id } - return [$page_package_id make_link $page_package_id \ + return [::$page_package_id make_link $page_package_id \ edit-new object_type name title nls_language return_url parent_id autoname] } @@ -2393,10 +2393,10 @@ } else { set template_id [:page_template] if {![info exists parent_id]} { - set parent_id [$page_package_id folder_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 -link $form $template_id \ + set form [::$page_package_id pretty_link -parent_id $parent_id [::$template_id name]] + return [::$page_package_id make_link -link $form $template_id \ create-new return_url name title nls_language] } } @@ -2615,8 +2615,8 @@ Page instproc get_rich_text_spec {field_name default} { set package_id ${:package_id} set spec "" - #:msg WidgetSpecs=[$package_id get_parameter WidgetSpecs] - foreach {s widget_spec} [$package_id get_parameter WidgetSpecs] { + #:msg WidgetSpecs=[::$package_id get_parameter WidgetSpecs] + foreach {s widget_spec} [::$package_id get_parameter WidgetSpecs] { lassign [split $s ,] page_name var_name # in case we have no name (edit new page) we use the first value or the default. set name [expr {[info exists :name] ? ${:name} : $page_name}] @@ -2679,11 +2679,11 @@ if {[ns_conn isconnected]} { set url "[ns_conn location][::xo::cc url]" - set package_url "[ns_conn location][$package_id package_url]" + set package_url "[ns_conn location][::$package_id package_url]" } set tags "" - if {[$package_id get_parameter "with_tags" 1] && + if {[::$package_id get_parameter "with_tags" 1] && ![:exists_query_parameter no_tags] && [::xo::cc user_id] != 0 } { @@ -2696,21 +2696,21 @@ set tag_content "" } - if {[$package_id get_parameter "with_digg" 0] && [info exists url]} { + if {[::$package_id get_parameter "with_digg" 0] && [info exists url]} { if {![info exists description]} {set description [:get_description $content]} append footer "
" \ [:include [list digg -description $description -url $url]] "
\n" } - if {[$package_id get_parameter "with_delicious" 0] && [info exists url]} { + if {[::$package_id get_parameter "with_delicious" 0] && [info exists url]} { if {![info exists description]} {set description [:get_description $content]} append footer "
" \ [:include [list delicious -description $description -url $url -tags $tags]] \ "
\n" } - if {[$package_id get_parameter "with_yahoo_publisher" 0] && [info exists package_url]} { - set publisher [$package_id get_parameter "my_yahoo_publisher" \ + if {[::$package_id get_parameter "with_yahoo_publisher" 0] && [info exists package_url]} { + set publisher [::$package_id get_parameter "my_yahoo_publisher" \ [::xo::get_user_name [::xo::cc user_id]]] append footer "
" \ [:include [list my-yahoo-publisher \ @@ -2719,11 +2719,11 @@ "
\n" } - if {[$package_id get_parameter "show_page_references" 1]} { + if {[::$package_id get_parameter "show_page_references" 1]} { append footer [:include my-references] } - if {[$package_id get_parameter "show_per_object_categories" 1]} { + if {[::$package_id get_parameter "show_per_object_categories" 1]} { set html [:include my-categories] if {$html ne ""} { append footer $html
@@ -2733,7 +2733,7 @@ append footer $tag_content - if {[$package_id get_parameter "with_general_comments" 0] && + if {[::$package_id get_parameter "with_general_comments" 0] && ![:exists_query_parameter no_gc]} { append footer [:include my-general-comments] } @@ -3124,7 +3124,7 @@ if {![info exists package_id]} { set package_id ${:package_id} } if {![info exists parent_id]} { set parent_id ${:parent_id} } if {$creation_user eq ""} { - set creation_user [[$package_id context] user_id] + set creation_user [[::$package_id context] user_id] } set f [FormPage new -destroy_on_cleanup \ @@ -3305,7 +3305,7 @@ # # substitute relative links to download links in the same folder # - set prefix [$parent_id pretty_link -absolute true -download true] + set prefix [::$parent_id pretty_link -absolute true -download true] foreach n [$root selectNodes //img] { set src [$n getAttribute src] if {[regexp {^[^/]} $src]} { @@ -3364,9 +3364,9 @@ set parent_id ${:parent_id} set package_id ${:package_id} # don't require permissions here, such that rss can present the link - #set page_link [$package_id make_link -privilege public [self] download ""] + #set page_link [::$package_id make_link -privilege public [self] download ""] - set ctx [$package_id context] + set ctx [::$package_id context] set revision_id [$ctx query_parameter revision_id] set query [expr {$revision_id ne "" ? "revision_id=$revision_id" : ""}] set page_link [:pretty_link -download true -query $query] @@ -4098,7 +4098,7 @@ set filter_clause "" array set wc $h_where set use_hstore [expr {[::xo::dc has_hstore] && - [$package_id get_parameter use_hstore 0] + [::$package_id get_parameter use_hstore 0] }] if {$use_hstore && $wc(h) ne ""} { set filter_clause " and '$wc(h)' <@ hkey" @@ -4232,7 +4232,7 @@ # lappend aggregated_folder_refs {*}$additional_folder_refs foreach item_ref $additional_folder_refs { - set page [$package_id get_page_from_item_ref $item_ref] + set page [::$package_id get_page_from_item_ref $item_ref] if {$page eq ""} {error "configured inherited folder $item_ref cannot be resolved"} set aggregated_folder_refs \ [FormPage get_super_folders $package_id [$page item_id] $aggregated_folder_refs] @@ -4261,7 +4261,7 @@ #:log inherit_folders=$inherit_folders foreach item_ref $inherit_folders { - set folder [::xo::cc cache [list $package_id get_page_from_item_ref $item_ref]] + set folder [::xo::cc cache [list ::$package_id get_page_from_item_ref $item_ref]] if {$folder eq ""} { ad_log error "Could not resolve parameter folder page '$item_ref' of FormPage [self]." } else { @@ -4327,7 +4327,7 @@ if {![regexp {/?..:} $pp]} { ad_log error "Name of parameter page '$pp' of FormPage [self] must contain a language prefix" } else { - set page [::xo::cc cache [list ${:package_id} get_page_from_item_ref $pp]] + set page [::xo::cc cache [list ::${:package_id} get_page_from_item_ref $pp]] if {$page eq ""} { ad_log error "Could not resolve parameter page '$pp' of FormPage [self]." } @@ -4775,7 +4775,7 @@ # are not, change on the first save the status to ready # if {[:is_new_entry $old_name]} { - if {![$package_id get_parameter production_mode 0]} { + if {![::$package_id get_parameter production_mode 0]} { set :publish_status "ready" } } Index: openacs-4/packages/xowiki/tcl/xowiki-uploader-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-uploader-procs.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/xowiki/tcl/xowiki-uploader-procs.tcl 7 Jul 2018 10:58:20 -0000 1.3 +++ openacs-4/packages/xowiki/tcl/xowiki-uploader-procs.tcl 8 May 2019 14:33:40 -0000 1.3.2.1 @@ -71,7 +71,7 @@ set package_id [${:parent_object} package_id] set parent_id [${:parent_object} item_id] - set photo_object [$package_id get_page_from_name -name en:${:file_name} -parent_id $parent_id] + set photo_object [::$package_id get_page_from_name -name en:${:file_name} -parent_id $parent_id] if {$photo_object ne ""} { # # The photo page instance exists already, create a new revision. Index: openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl,v diff -u -r1.57 -r1.57.2.1 --- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 28 Sep 2018 08:43:01 -0000 1.57 +++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 8 May 2019 14:33:40 -0000 1.57.2.1 @@ -130,7 +130,7 @@ ns_log notice "$package_id: ::xo::Package initialize took [expr {$t1-$t0}]ms" set t0 $t1 - if {![::xo::dc has_hstore] && [$package_id get_parameter use_hstore 0] } { + if {![::xo::dc has_hstore] && [::$package_id get_parameter use_hstore 0] } { return 0 } @@ -172,7 +172,7 @@ #::xo::db::select_driver DB foreach package_id [lsort [::xowiki::Package instances -closure true]] { ::xo::Package initialize -package_id $package_id -init_url false -user_id 0 - if {[$package_id get_parameter use_hstore 0] == 0} { + if {[::$package_id get_parameter use_hstore 0] == 0} { continue } ad_try { @@ -418,7 +418,7 @@ proc ::xowiki::transform_root_folder {package_id} { ::xo::Package initialize -package_id $package_id - set item_id [$package_id folder_id] + set item_id [::$package_id folder_id] if {$item_id == 0} { # @@ -447,7 +447,7 @@ return } set revision_id [::xo::db::sql::content_revision new \ - -title [$package_id instance_name] -text "" \ + -title [::$package_id instance_name] -text "" \ -item_id $item_id -package_id $package_id] ::xo::dc dml chg1 "insert into xowiki_page (page_id) values ($revision_id)" ::xo::dc dml chg2 "insert into xowiki_page_instance (page_instance_id, page_template) values ($revision_id, $form_id)" @@ -489,7 +489,7 @@ ns_log notice "got package_id=$package_id, object_id=$object_id, type=$type" ::xowiki::Package initialize -package_id $package_id if {[::xotcl::Object isobject ::$package_id]} { - return [$package_id package_url] + return [::$package_id package_url] } else { return "" } 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.368.2.12 -r1.368.2.13 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 9 Apr 2019 15:55:06 -0000 1.368.2.12 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 8 May 2019 14:33:40 -0000 1.368.2.13 @@ -124,7 +124,7 @@ } else { foreach item_id $clipboard { if {[::xo::db::CrClass get_instance_from_db -item_id $item_id] ne ""} { - util_user_message -message [$item_id pretty_link] + util_user_message -message [::$item_id pretty_link] } else { util_user_message -message "item $item_id deleted" } @@ -156,7 +156,7 @@ return } set folder_id [expr {[:is_folder_page] ? ${:item_id} : ${:parent_id}}] - set msg [$package_id import -replace 0 -create_user_ids 1 \ + set msg [::$package_id import -replace 0 -create_user_ids 1 \ -parent_id $folder_id -objects $item_ids] util_user_message -html -message $msg ::xowiki::clipboard clear @@ -216,7 +216,7 @@ -actual_query "" } on error {errorMsg} { ns_log error "Package initialize: $errorMsg\n$::errorInfo" - return [$original_package_id error_msg \ + return [::$original_package_id error_msg \ "Page '${:name}' invalid provided package instance=$package_instance

$errorMsg

"] } } @@ -315,7 +315,7 @@ if {$name eq ""} { $f save_new } else { - set id [$fp_package_id lookup -parent_id $fp_parent_id -name $name] + set id [::$fp_package_id lookup -parent_id $fp_parent_id -name $name] if {$id == 0} { $f save_new } else { @@ -414,14 +414,14 @@ error "no form specified" } $package_id get_lang_and_name -default_lang [::xo::cc lang] -path $formName lang stripped_url - set d [$package_id item_ref -default_lang $lang -parent_id [$package_id folder_id] $formName] + set d [::$package_id item_ref -default_lang $lang -parent_id [::$package_id folder_id] $formName] set item_id [dict get $d item_id] if {$item_id == 0} { error "cannot lookup page $formName" } ::xo::db::CrClass get_instance_from_db -item_id $item_id if {[info commands ::$item_id] eq "" - || "::xowiki::PageTemplate" ni [$item_id info precedence]} { + || "::xowiki::PageTemplate" ni [::$item_id info precedence]} { error "OK $formName is not suited to be used as template. Should be a Form!" } if {[:page_template] == $item_id} { @@ -511,7 +511,7 @@ if {$latest_revision ne ""} { # otherwise, "delete" did already the redirect ${:package_id} returnredirect [:query_parameter "return_url" \ - [export_vars -base [$package_id url] {{m revisions}}]] + [export_vars -base [::$package_id url] {{m revisions}}]] } } @@ -742,9 +742,9 @@ set package_id ${:package_id} # set some default values if they are provided foreach key {name title page_order last_page_id nls_language} { - if {[$package_id exists_query_parameter $key]} { - #:log "setting [self] set $key [$package_id query_parameter $key]" - set :$key [$package_id query_parameter $key] + if {[::$package_id exists_query_parameter $key]} { + #:log "setting [self] set $key [::$package_id query_parameter $key]" + set :$key [::$package_id query_parameter $key] } } } @@ -773,7 +773,7 @@ # Page instproc changed_redirect_url {} { set package_id ${:package_id} - if {[$package_id exists_query_parameter "return_url"]} { + if {[::$package_id exists_query_parameter "return_url"]} { return "" } return [:pretty_link] @@ -803,7 +803,7 @@ :edit_set_default_values set fs_folder_id [:edit_set_file_selector_folder] - if {[$package_id exists_query_parameter "return_url"]} { + if {[::$package_id exists_query_parameter "return_url"]} { set submit_link [:get_query_parameter_return_url] set return_url $submit_link } else { @@ -830,9 +830,9 @@ # Determine the package_id of some mounted xowiki instance to find # the directory + URL, from where the scripts called from Xinha # can be used. - if {[$package_id info class] eq "::xowiki::Package"} { + if {[::$package_id info class] eq "::xowiki::Package"} { # The actual instance is a plain xowiki instance, we can use it - set folder_spec [list script_dir [$package_id package_url]] + set folder_spec [list script_dir [::$package_id package_url]] } else { # The actual instance is not a plain xowiki instance, so, we try # to find one, where the current user has at least read @@ -841,7 +841,7 @@ set first_instance_id [::xowiki::Package first_instance -party_id [::xo::cc user_id] -privilege read] if {$first_instance_id ne ""} { ::xowiki::Package require $first_instance_id - set folder_spec [list script_dir [$first_instance_id package_url]] + set folder_spec [list script_dir [::$first_instance_id package_url]] } } @@ -850,7 +850,7 @@ } [$object_type getFormClass -data [self]] create ::xowiki::f1 -volatile \ - -action [export_vars -base [$package_id url] $action_vars] \ + -action [export_vars -base [::$package_id url] $action_vars] \ -data [self] \ -folderspec $folder_spec \ -submit_link $submit_link \ @@ -866,19 +866,19 @@ ::xowiki::f1 instvar edit_form_page_title context formTemplate if {[info exists item_id]} { - set rev_link [$package_id make_link [self] revisions] - set view_link [$package_id make_link [self] view] + set rev_link [::$package_id make_link [self] revisions] + set view_link [::$package_id make_link [self] view] } if {[info exists last_page_id]} { - set back_link [$package_id url] + set back_link [::$package_id url] } - set index_link [$package_id make_link -privilege public -link "" $package_id {} {}] - ::xo::Page set_property doc title "[$package_id instance_name] - $edit_form_page_title" + set index_link [::$package_id make_link -privilege public -link "" $package_id {} {}] + ::xo::Page set_property doc title "[::$package_id instance_name] - $edit_form_page_title" array set property_doc [::xo::Page get_property doc] - set edit_tmpl [$package_id get_adp_template "edit"] - set html [$package_id return_page -adp $edit_tmpl \ + set edit_tmpl [::$package_id get_adp_template "edit"] + set html [::$package_id return_page -adp $edit_tmpl \ -form f1 \ -variables {item_id parent_id edit_form_page_title context formTemplate view_link back_link rev_link index_link property_doc}] @@ -1007,7 +1007,7 @@ # # In case we are triggered internally, we might not have a # a connection and therefore do not valide the csrf token - if {![$package_id exists __batch_mode]} { + if {![::$package_id exists __batch_mode]} { security::csrf::validate } @@ -1021,16 +1021,16 @@ # error messages again, but we return simply the validation # problems. # - if {[$package_id exists __batch_mode]} { + if {[::$package_id exists __batch_mode]} { set errors [list] foreach f $form_fields { if {[$f error_msg] ne ""} { lappend errors [list field [$f name] value [$f set value] error [$f error_msg]] } } set evaluation_errors "" - if {[$package_id exists __evaluation_error]} { - set evaluation_errors "\nEvaluation error: [$package_id set __evaluation_error]" + if {[::$package_id exists __evaluation_error]} { + set evaluation_errors "\nEvaluation error: [::$package_id set __evaluation_error]" $package_id unset __evaluation_error } error "[llength $errors] validation error(s): $errors $evaluation_errors" @@ -1066,7 +1066,7 @@ # The method query_parameter uses now "::xo::cc set_parameter ...." # with highest precedence # - set return_url [$package_id query_parameter return_url $url] + set return_url [::$package_id query_parameter return_url $url] #:log "${:name}: url=$url, return_url=$return_url" $package_id returnredirect $return_url @@ -1250,7 +1250,7 @@ # through a link. # if {[::xo::cc exists invoke_object] && [::xo::cc invoke_object] ne [self]} { - #:log "=== no return_url specified, using [::xo::cc url] or [[$package_id context] url]" + #:log "=== no return_url specified, using [::xo::cc url] or [[::$package_id context] url]" set return_url [::xo::cc url] } } @@ -1662,36 +1662,36 @@ # # Set up template variables. # - set object_type [$page_package_id get_parameter object_type [:info class]] - set rev_link [$page_package_id make_link -with_entities 0 [self] revisions] + set object_type [::$page_package_id get_parameter object_type [:info class]] + set rev_link [::$page_package_id make_link -with_entities 0 [self] revisions] - if {[$context_package_id query_parameter m ""] eq "edit"} { - set view_link [$page_package_id make_link -with_entities 0 [self] view return_url] + if {[::$context_package_id query_parameter m ""] eq "edit"} { + set view_link [::$page_package_id make_link -with_entities 0 [self] view return_url] set edit_link "" } else { - set edit_link [$page_package_id make_link -with_entities 0 [self] edit return_url] + set edit_link [::$page_package_id make_link -with_entities 0 [self] edit return_url] set view_link "" } - set delete_link [$page_package_id make_link -with_entities 0 [self] delete return_url] + set delete_link [::$page_package_id make_link -with_entities 0 [self] delete return_url] if {[info exists :__link(new)]} { set new_link [set :__link(new)] } else { set new_link [: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 toc_link [$context_package_id make_link -privilege public -link "list" $context_package_id {} {}] - set import_link [$context_package_id make_link -privilege admin -link "" $context_package_id {} {}] - set page_show_link [$page_package_id make_link -privilege admin [self] show-object return_url] - set view_link [$page_package_id make_link -with_entities 0 [self] view return_url] + 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 toc_link [::$context_package_id make_link -privilege public -link "list" $context_package_id {} {}] + set import_link [::$context_package_id make_link -privilege admin -link "" $context_package_id {} {}] + set page_show_link [::$page_package_id make_link -privilege admin [self] show-object return_url] + set view_link [::$page_package_id make_link -with_entities 0 [self] view return_url] set notification_subscribe_link "" - if {[$context_package_id get_parameter "with_notifications" 1]} { + if {[::$context_package_id get_parameter "with_notifications" 1]} { if {[::xo::cc user_id] != 0} { ;# notifications require login set notifications_return_url [expr {[info exists return_url] ? $return_url : [ad_return_url]}] set notification_type [notification::type::get_type_id -short_name xowiki_notif] - set notification_text "Subscribe to [$context_package_id instance_name]" + set notification_text "Subscribe to [::$context_package_id instance_name]" set notification_subscribe_link \ [export_vars -base /notifications/request-new \ {{return_url $notifications_return_url} @@ -1707,7 +1707,7 @@ # # The menubar is work in progress # - set mb [$context_package_id get_parameter "MenuBar" 0] + set mb [::$context_package_id get_parameter "MenuBar" 0] if {$mb ne "0" && [info commands ::xowiki::MenuBar] ne ""} { set clipboard_size [::xowiki::clipboard size] @@ -1717,7 +1717,7 @@ # Define standard xowiki menubar # set mb [::xowiki::MenuBar create ::__xowiki__MenuBar -id menubar] - $mb add_menu -name Package -label [$context_package_id instance_name] + $mb add_menu -name Package -label [::$context_package_id instance_name] $mb add_menu -name New -label [_ xowiki.menu-New] $mb add_menu -name Clipboard -label $clipboard_label $mb add_menu -name Page -label [_ xowiki.menu-Page] @@ -1762,15 +1762,15 @@ # # These variables can be influenced via set-parameter. # - set autoname [$page_package_id get_parameter autoname 0] + set autoname [::$page_package_id get_parameter autoname 0] # # Setup top includeletes and footers. # set footer [:htmlFooter -content $content] set top_includelets "" - set vp [string trim [$context_package_id get_parameter "top_includelet" ""]] + set vp [string trim [::$context_package_id get_parameter "top_includelet" ""]] if {$vp ne "" && $vp ne "none"} { set top_includelets [:include $vp] } @@ -1779,7 +1779,7 @@ # # The following block should not be here, but in the templates. # - set showFolders [$context_package_id get_parameter "MenuBarWithFolder" 1] + set showFolders [::$context_package_id get_parameter "MenuBarWithFolder" 1] if {$showFolders} { set folderhtml [:include {folders -style folders}] } else { @@ -1794,15 +1794,15 @@ ::xo::Page set_property body menubarHTML $mbHTML } - if {[$context_package_id get_parameter "with_user_tracking" 1]} { + if {[::$context_package_id get_parameter "with_user_tracking" 1]} { :record_last_visited } # # Deal with the views package (many thanks to Malte for this # snippet!) # - if {[$context_package_id get_parameter with_views_package_if_available 1] + if {[::$context_package_id get_parameter with_views_package_if_available 1] && [info commands ::views::record_view] ne ""} { views::record_view -object_id ${:item_id} -viewer_id [::xo::cc user_id] array set views_data [views::get -object_id ${:item_id}] @@ -1814,25 +1814,25 @@ #:log "--after notifications [info exists notification_image]" - set master [$context_package_id get_parameter "master" 1] + set master [::$context_package_id get_parameter "master" 1] if {![string is boolean -strict $master]} { ad_return_complaint 1 "value of master is not boolean" ad_script_abort } if {$master} { set context [list ${:title}] - #:msg "$context_package_id title=[$context_package_id instance_name] - ${:title}" + #:msg "$context_package_id title=[::$context_package_id instance_name] - ${:title}" #:msg "::xo::cc package_id = [::xo::cc package_id] ::xo::cc url= [::xo::cc url] " - ::xo::Page set_property doc title "[$context_package_id instance_name] - ${:title}" + ::xo::Page set_property doc title "[::$context_package_id instance_name] - ${:title}" ::xo::Page set_property body title ${:title} # We could offer a user to translate the current page to his preferred language # # set create_in_req_locale_link "" - # if {[$context_package_id get_parameter use_connection_locale 0]} { - # $context_package_id get_lang_and_name -path [$context_package_id set object] req_lang req_local_name - # set default_lang [$page_package_id default_language] + # if {[::$context_package_id get_parameter use_connection_locale 0]} { + # $context_package_id get_lang_and_name -path [::$context_package_id set object] req_lang req_local_name + # set default_lang [::$page_package_id default_language] # if {$req_lang ne $default_lang} { # set l [Link create new -destroy_on_cleanup \ # -page [self] -type language -stripped_name $req_local_name \ @@ -1845,10 +1845,10 @@ # } #:log "--after context delete_link=$delete_link " - set template [$context_package_id get_parameter "template" ""] + set template [::$context_package_id get_parameter "template" ""] set page [self] - foreach css [$context_package_id get_parameter extra_css ""] { + foreach css [::$context_package_id get_parameter extra_css ""] { ::xo::Page requireCSS -order 10 $css } @@ -1926,7 +1926,7 @@ } } if {$meta(keywords) eq ""} { - set meta(keywords) [$context_package_id get_parameter keywords ""] + set meta(keywords) [::$context_package_id get_parameter keywords ""] } foreach i [array names meta] { # don't set empty meta tags @@ -1943,13 +1943,13 @@ array set doc [::xo::Page get_property doc] if {$page_package_id != $context_package_id} { - set page_context [$page_package_id instance_name] + set page_context [::$page_package_id instance_name] } if {$template ne ""} { set __including_page $page #set __adp_stub [acs_root_dir]/packages/xowiki/www/view-default - set __adp_stub [$context_package_id get_adp_template view-default] + set __adp_stub [::$context_package_id get_adp_template view-default] set template_code [template::adp_compile -string $template] # Index: openacs-4/packages/xowiki/tcl/test/test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/test-procs.tcl,v diff -u -r1.15.2.5 -r1.15.2.6 --- openacs-4/packages/xowiki/tcl/test/test-procs.tcl 17 Apr 2019 11:57:26 -0000 1.15.2.5 +++ openacs-4/packages/xowiki/tcl/test/test-procs.tcl 8 May 2019 14:33:40 -0000 1.15.2.6 @@ -256,7 +256,7 @@ set d [acs::test::http \ -last_request $last_request -user_id $user_id \ - $instance/admin/set-publish-state?state=ready&revision_id=[$item_id revision_id]] + $instance/admin/set-publish-state?state=ready&revision_id=[::$item_id revision_id]] acs::test::reply_has_status_code $d 302 aa_log "create_form_page: DONE" } @@ -419,7 +419,7 @@ set d [acs::test::http \ -last_request $last_request -user_id $user_id \ - $instance/admin/set-publish-state?state=ready&revision_id=[$item_id revision_id]] + $instance/admin/set-publish-state?state=ready&revision_id=[::$item_id revision_id]] acs::test::reply_has_status_code $d 302 } 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.15 -r1.15.2.1 --- openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 9 Nov 2018 12:07:14 -0000 1.15 +++ openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 8 May 2019 14:33:40 -0000 1.15.2.1 @@ -300,10 +300,10 @@ # rename swf:name and image:name to file:name db_dml change_swf \ "update cr_items set name = 'file' || substr(name,4) \ - where name like 'swf:%' and parent_id = [$package_id folder_id]" + where name like 'swf:%' and parent_id = [::$package_id folder_id]" db_dml change_image \ "update cr_items set name = 'file' || substr(name,6) \ - where name like 'image:%' and parent_id = [$package_id folder_id]" + where name like 'image:%' and parent_id = [::$package_id folder_id]" # reload updated prototype pages $package_id import-prototype-page book $package_id import-prototype-page weblog @@ -333,10 +333,10 @@ # db_dml change_swf \ "update cr_items set name = 'file' || substr(name,4) \ - where name like 'swf:%' and parent_id = [$package_id folder_id]" + where name like 'swf:%' and parent_id = [::$package_id folder_id]" db_dml change_image \ "update cr_items set name = 'file' || substr(name,6) \ - where name like 'image:%' and parent_id = [$package_id folder_id]" + where name like 'image:%' and parent_id = [::$package_id folder_id]" } } catch { @@ -499,16 +499,16 @@ foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id - set item_id [$package_id lookup -name ::[$package_id folder_id]] + set item_id [::$package_id lookup -name ::[::$package_id folder_id]] if {$item_id ne 0} { ::xowiki::Object get_instance_from_db -item_id $item_id - set p [$item_id get_payload widget_specs] + set p [::$item_id get_payload widget_specs] if {$p ne ""} { - ns_log notice "Transferring widget_specs to parameter WidgetSpecs for $package_id [$package_id package_url]" + ns_log notice "Transferring widget_specs to parameter WidgetSpecs for $package_id [::$package_id package_url]" parameter::set_value -package_id $package_id -parameter WidgetSpecs -value $p } } else { - ns_log notice "no folder object found for $package_id - [$package_id package_url]" + ns_log notice "no folder object found for $package_id - [::$package_id package_url]" } } } Index: openacs-4/packages/xowiki/www/portlet-ajax.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlet-ajax.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/xowiki/www/portlet-ajax.tcl 14 Mar 2018 15:40:49 -0000 1.7 +++ openacs-4/packages/xowiki/www/portlet-ajax.tcl 8 May 2019 14:33:40 -0000 1.7.2.1 @@ -5,7 +5,7 @@ if {![string match "/*" $portlet]} { set folder_id [$__including_page set parent_id] - set package_id [$folder_id set package_id] + set package_id [::$folder_id set package_id] set portlet [lindex [site_node::get_url_from_object_id -object_id $package_id] 0]portlets/$portlet } Index: openacs-4/packages/xowiki/www/admin/export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/export.tcl,v diff -u -r1.24 -r1.24.2.1 --- openacs-4/packages/xowiki/www/admin/export.tcl 22 Dec 2017 13:51:41 -0000 1.24 +++ openacs-4/packages/xowiki/www/admin/export.tcl 8 May 2019 14:33:40 -0000 1.24.2.1 @@ -22,7 +22,7 @@ } else { foreach o $objects { $package_id get_lang_and_name -default_lang [::xo::cc lang] -path $o lang stripped_name - set parent_id [$package_id get_parent_and_name -lang $lang \ + set parent_id [::$package_id get_parent_and_name -lang $lang \ -path $stripped_name -parent_id $folder_id \ parent local_name] #ns_log notice "lookup of $o in $folder_id returns [::xo::db::CrClass lookup -name $o -parent_id $parent_id]" Index: openacs-4/packages/xowiki/www/admin/import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/import.tcl,v diff -u -r1.28 -r1.28.2.1 --- openacs-4/packages/xowiki/www/admin/import.tcl 4 Jan 2019 15:50:36 -0000 1.28 +++ openacs-4/packages/xowiki/www/admin/import.tcl 8 May 2019 14:33:40 -0000 1.28.2.1 @@ -65,7 +65,7 @@ set parent_id [ns_queryget parent_id 0] #::xotcl::Object msg parent_id=$parent_id ad_try { - set msg [$package_id import -replace $replace -create_user_ids $create_user_ids \ + set msg [::$package_id import -replace $replace -create_user_ids $create_user_ids \ -parent_id $parent_id -objects $objects] } on error {errMsg} { ns_log notice "Error during import: $errMsg\nErrInfo: $::errorInfo" Index: openacs-4/packages/xowiki/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v diff -u -r1.31 -r1.31.2.1 --- openacs-4/packages/xowiki/www/admin/index.tcl 9 May 2018 15:33:34 -0000 1.31 +++ openacs-4/packages/xowiki/www/admin/index.tcl 8 May 2019 14:33:40 -0000 1.31.2.1 @@ -16,7 +16,7 @@ set object_types [$object_type object_types] set return_url [ns_conn url] -set category_url [export_vars -base [$package_id package_url] { {manage-categories 1} {object_id $package_id}}] +set category_url [export_vars -base [::$package_id package_url] { {manage-categories 1} {object_id $package_id}}] lang::message::lookup "" xowiki.admin " " TableWidget t1 -volatile \ @@ -63,7 +63,7 @@ set delete_title [_ xowiki.delete_all_items] } else { set add_title [_ xotcl-core.add [list type [$object_type pretty_name]]] - set add_href [$package_id make_link -with_entities 0 $package_id edit-new object_type return_url autoname] + set add_href [::$package_id make_link -with_entities 0 $package_id edit-new object_type return_url autoname] set delete_title [_ xowiki.delete_all_instances] } t1 add \ Index: openacs-4/packages/xowiki/www/admin/list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/list.tcl,v diff -u -r1.38 -r1.38.2.1 --- openacs-4/packages/xowiki/www/admin/list.tcl 22 Jan 2018 18:42:59 -0000 1.38 +++ openacs-4/packages/xowiki/www/admin/list.tcl 8 May 2019 14:33:40 -0000 1.38.2.1 @@ -37,14 +37,14 @@ set return_url [expr {$per_type ? [export_vars -base [::$package_id url] object_type] : [::$package_id url]}] -set category_url [export_vars -base [$package_id package_url] { {manage-categories 1} {object_id $package_id}}] +set category_url [export_vars -base [::$package_id package_url] { {manage-categories 1} {object_id $package_id}}] set actions [subst { Action new -label "[lang::message::lookup {} categories.Categories Categories]" \ -url $category_url }] foreach type $object_types { - set link [$package_id make_link -with_entities 0 \ + set link [::$package_id make_link -with_entities 0 \ $package_id edit-new {object_type $type} return_url autoname] if {$link eq ""} continue append actions [subst { @@ -55,7 +55,7 @@ }] } -set ::individual_permissions [expr {[$package_id set policy] eq "::xowiki::policy3"}] +set ::individual_permissions [expr {[::$package_id set policy] eq "::xowiki::policy3"}] set ::with_publish_status 1 TableWidget create t1 -volatile \ @@ -141,7 +141,7 @@ -edit.title #xowiki.edit# \ -mod_user [::xo::get_user_name $creation_user] \ -delete "" \ - -delete.href [export_vars -base [$package_id package_url] {{delete 1} item_id name return_url}] \ + -delete.href [export_vars -base [::$package_id package_url] {{delete 1} item_id name return_url}] \ -delete.title #xowiki.delete# if {$::individual_permissions} { @@ -159,7 +159,7 @@ } [::template::t1 last_child] set publish_status.src /resources/xowiki/$image [::template::t1 last_child] set publish_status.href \ - [export_vars -base [$package_id package_url]admin/set-publish-state \ + [export_vars -base [::$package_id package_url]admin/set-publish-state \ {state revision_id return_url}] } [::template::t1 last_child] set page_order $page_order Index: openacs-4/packages/xowiki/www/admin/permissions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/permissions.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/xowiki/www/admin/permissions.tcl 7 Aug 2017 23:48:31 -0000 1.8 +++ openacs-4/packages/xowiki/www/admin/permissions.tcl 8 May 2019 14:33:40 -0000 1.8.2.1 @@ -15,13 +15,13 @@ set object_id $item_id set page_name [$page name] set page_title [_ xowiki.permissions_manage_page] - set return_url [$package_id query_parameter return_url [$package_id package_url]admin/list] + set return_url [::$package_id query_parameter return_url [::$package_id package_url]admin/list] } else { set object_id $package_id set package_name [apm_instance_name_from_id $package_id] - set package_name [$package_id get_parameter PackageTitle $package_name] + set package_name [::$package_id get_parameter PackageTitle $package_name] set page_title [_ xowiki.permissions_manage_package] - set return_url [$package_id query_parameter return_url [$package_id package_url]admin] + set return_url [::$package_id query_parameter return_url [::$package_id package_url]admin] } set context [list $page_title] Index: openacs-4/packages/xowiki/www/admin/portal-element-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/portal-element-add.tcl,v diff -u -r1.17 -r1.17.2.1 --- openacs-4/packages/xowiki/www/admin/portal-element-add.tcl 22 Jan 2018 00:53:45 -0000 1.17 +++ openacs-4/packages/xowiki/www/admin/portal-element-add.tcl 8 May 2019 14:33:40 -0000 1.17.2.1 @@ -12,7 +12,7 @@ {-referer .} } -set page [$package_id get_page_from_item_ref $page_name] +set page [::$package_id get_page_from_item_ref $page_name] if {$page eq ""} { # Index: openacs-4/packages/xowiki/www/admin/test.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/Attic/test.tcl,v diff -u -r1.46 -r1.46.2.1 --- openacs-4/packages/xowiki/www/admin/test.tcl 5 Aug 2018 21:13:10 -0000 1.46 +++ openacs-4/packages/xowiki/www/admin/test.tcl 8 May 2019 14:33:40 -0000 1.46.2.1 @@ -157,7 +157,7 @@ ? {$package_id url} /$instance_name/ ? {$package_id id} $package_id "the id of the package object = package_id" -test code [$package_id serialize] +test code [::$package_id serialize] ############################################ test subsection "Basic Setup: Folder Object" @@ -178,8 +178,8 @@ ############################################## ? {$package_id set object} "" "object name parsed" ? {set m} view "method passed from package initialize" -set object [$package_id set object] -set page_item_id [$package_id resolve_page $object $m] +set object [::$package_id set object] +set page_item_id [::$package_id resolve_page $object $m] ? {expr {$page_item_id ne ""}} 1 "index page resolved" ? {::xotcl::Object isobject ::$page_item_id} 1 "we have a page object" ? {expr {[::$page_item_id item_id]>0}} 1 "item_id given" @@ -189,14 +189,14 @@ ? {::$page_item_id name} en:index "name of resolved index page" ? {::$page_item_id istype ::xowiki::Page} 1 "type or subtype of ::xowiki::Page" -set content [$package_id call $page_item_id $m ""] +set content [::$package_id call $page_item_id $m ""] set content_length [string length $content] ? {expr {$content_length > 1000}} 1 \ "page rendered, content-length $content_length > 1000" ? {string first Error $content} -1 "page contains no error" ? {xo::dc get_value count "select count(*) from cr_items where parent_id = $folder_id"} 1 \ "folder contains the index page" -#test code [$page_item_id serialize] +#test code [::$page_item_id serialize] ########################################################### test subsection "Check Permissions based on default policy" @@ -273,8 +273,8 @@ ######################################### ? {$package_id set object} "" "object name parsed" ? {set m} view "method passed from package initialize" -set object [$package_id set object] -set page_item_id [$package_id resolve_page $object $m] +set object [::$package_id set object] +set page_item_id [::$package_id resolve_page $object $m] ? {expr {$page_item_id ne ""}} 1 "index page resolved" ? {::xotcl::Object isobject ::$page_item_id} 1 "we have a page object" ? {expr {[::$page_item_id item_id]>0}} 1 "item_id given" @@ -284,12 +284,12 @@ ? {::$page_item_id name} en:index "name of resolved index page" ? {::$page_item_id istype ::xowiki::Page} 1 "type or subtype of ::xowiki::Page" -set content [$package_id call $page_item_id $m ""] +set content [::$package_id call $page_item_id $m ""] set content_length [string length $content] ? {expr {$content_length > 1000}} 1 \ "page rendered, content-length $content_length > 1000" ? {string first Error $content} -1 "page contains no error" -#test code [$page_item_id serialize] +#test code [::$page_item_id serialize] ######################################################################## # @@ -396,7 +396,7 @@ "SWA sees the delete link" ? {expr {[::$package_id make_link -privilege admin -link admin/ $package_id {} {}] ne ""}} 1 \ "SWA sees admin link" -? {xo::dc get_value count "select count(*) from cr_items where parent_id=[$package_id folder_id]"} 3 \ +? {xo::dc get_value count "select count(*) from cr_items where parent_id=[::$package_id folder_id]"} 3 \ "folder contains: index and weblog page (+1 includelet)" ::xo::at_cleanup @@ -415,7 +415,7 @@ ? {::xo::cc exists __continuation} 1 "continuation exists" ? {::xo::cc set __continuation} "ad_returnredirect /$instance_name/" \ "redirect to main instance" -? {xo::dc get_value count "select count(*) from cr_items where parent_id=[$package_id folder_id]"} 2 \ +? {xo::dc get_value count "select count(*) from cr_items where parent_id=[::$package_id folder_id]"} 2 \ "folder contains: index and weblog page (+0 includelet)" ############################################################################ @@ -425,7 +425,7 @@ -title "Hello World" \ -name en:hello \ -package_id $package_id \ - -parent_id [$package_id folder_id] \ + -parent_id [::$package_id folder_id] \ -destroy_on_cleanup \ -text { Hello [[Wiki]] World. @@ -434,7 +434,7 @@ $page initialize_loaded_object $page save_new ? {$page set package_id} $package_id "package_id $package_id not modified" -? {xo::dc get_value count "select count(*) from cr_items where parent_id=[$package_id folder_id]"} 3 \ +? {xo::dc get_value count "select count(*) from cr_items where parent_id=[::$package_id folder_id]"} 3 \ "folder contains: index and weblog, hello page (+0 includelet)" ? {expr {[$page revision_id]>0}} 1 "revision_id given" ? {expr {[$page item_id]>0}} 1 "item_id given" @@ -443,7 +443,7 @@ $page append title "- V.2" $page save -? {xo::dc get_value count "select count(*) from cr_items where parent_id=[$package_id folder_id]"} 3 \ +? {xo::dc get_value count "select count(*) from cr_items where parent_id=[::$package_id folder_id]"} 3 \ "still 3 pages" ? {expr {[$page revision_id]>$revision_id1}} 1 "revision_id > old revision_id" ? {expr {[$page item_id] == $item_id1}} 1 "item id the same" @@ -467,7 +467,7 @@ ? {expr {$content_length > 1000}} 1 \ "page rendered, content-length $content_length > 1000" ? {string first Error $content} -1 "page contains no error" -? {xo::dc get_value count "select count(*) from cr_items where parent_id=[$package_id folder_id]"} 4 \ +? {xo::dc get_value count "select count(*) from cr_items where parent_id=[::$package_id folder_id]"} 4 \ "again, 4 pages" ::xo::at_cleanup @@ -517,8 +517,8 @@ ? {info exists signature} 1 "signature contained in form" ? {expr {$signature ne ""}} 1 "signature not empty" -set title [$returned_item_id title] -set text [lindex [$returned_item_id text] 0] +set title [::$returned_item_id title] +set text [lindex [::$returned_item_id text] 0] ? {set title} {Hello World- V.2} ? {set text} {Hello [[Wiki]] World.} @@ -704,7 +704,7 @@ if {$item_id == 0} { set form_id [::xowiki::Weblog instantiate_forms -forms en:folder.form -package_id $package_id] - set f [$form_id create_form_page_instance \ + set f [::$form_id create_form_page_instance \ -name $name \ -nls_language en_US \ -default_variables [list title "Folder $name" parent_id $parent_id package_id $package_id]] @@ -723,7 +723,7 @@ set target [::xo::db::CrClass get_instance_from_db -item_id $target_id] set item_ref [[$target package_id] external_name -parent_id [$target parent_id] [$target name]] - set f [$form_id create_form_page_instance \ + set f [::$form_id create_form_page_instance \ -name $name \ -nls_language en_US \ -instance_attributes [list link $item_ref] \ @@ -773,16 +773,16 @@ # destroyed later. However, if some test bails out with an error, # the destroy might not be reached ::xowiki::Page create p \ - -package_id $package_id -nls_language de_DE -parent_id [$package_id folder_id] \ + -package_id $package_id -nls_language de_DE -parent_id [::$package_id folder_id] \ -name p -destroy_on_cleanup p set unresolved_references 0 test subsection "Ingredients:" - set folder_id [$package_id folder_id] + set folder_id [::$package_id folder_id] test hint "folder_id => $folder_id" - set folder_id [$package_id folder_id] + set folder_id [::$package_id folder_id] # make sure, we have folder "f1" with subfolder "f3" with subfolder "subf3" set f1_id [require_folder "f1" $folder_id $package_id] @@ -1272,63 +1272,63 @@ set l [$f1 pretty_link] set test [label "url" "topfolder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $f1_id && $(stripped_name) eq "f1"}} 1 "\n$test:\n [array get {}]\n " set l [$f2 pretty_link] set test [label "url" "folder under topfolder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $f3_id && $(stripped_name) eq "f3"}} 1 "\n$test:\n [array get {}]\n " set l [$f3 pretty_link] set test [label "url" "subsubfolder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $subf3_id && $(stripped_name) eq "subf3"}} 1 "\n$test:\n [array get {}]\n " set l [$p1 pretty_link] set test [label "url" "toppage" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $parentpage_id && $(stripped_name) eq "parentpage"}} 1 "\n$test:\n [array get {}]\n " set l [$p2 pretty_link] set test [label "url" "page in folder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $testpage_id && $(stripped_name) eq "testpage"}} 1 "\n$test:\n [array get {}]\n " set l [$p3 pretty_link] set test [label "url" "page under page" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $childpage_id && $(stripped_name) eq "childpage"}} 1 "\n$test:\n [array get {}]\n " set l [$p4 pretty_link] set test [label "url" "toplevel en page" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $enpage_id && $(stripped_name) eq "page" && $(name) eq "en:page"}} 1 "\n$test:\n [array get {}]\n " set l [$p5 pretty_link] set test [label "url" "en page under subfolder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $f3page_id && $(stripped_name) eq "page" && $(name) eq "en:page"}} 1 "\n$test:\n [array get {}]\n " # image links set l [$i1 pretty_link] set test [label "url" "toplevel image" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $image_id && $(stripped_name) eq "image.png" && $(name) eq "file:image.png"}} 1 "\n$test:\n [array get {}]\n " set l [$i2 pretty_link] set test [label "url" "toplevel image" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $subimage_id && $(stripped_name) eq "image2.png" && $(name) eq "file:image2.png"}} 1 "\n$test:\n [array get {}]\n " set l [$i3 pretty_link] set test [label "url" "toplevel image" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $childimage_id && $(stripped_name) eq "image3.png" && $(name) eq "file:image3.png" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n " @@ -1337,31 +1337,31 @@ set l [$l1 pretty_link] set test [label "url" "toplevel link to page" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $pagelink_id && $(stripped_name) eq "link1" && $(name) eq "link1" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n " set l [$l2 pretty_link] set test [label "url" "toplevel link to folder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $folderlink_id && $(stripped_name) eq "link2" && $(name) eq "link2" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n " set l [$l3 pretty_link] set test [label "url" "toplevel link to page under folder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $subpagelink_id && $(stripped_name) eq "link3" && $(name) eq "link3" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n " set l [$l4 pretty_link] set test [label "url" "toplevel link to folder under folder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $subfolderlink_id && $(stripped_name) eq "link4" && $(name) eq "link4" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n " set l [$l5 pretty_link] set test [label "url" "toplevel link to image under folder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $subimagelink_id && $(stripped_name) eq "link5" && $(name) eq "link5" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n " @@ -1372,41 +1372,41 @@ # download set l /XOWIKI-TEST/download/file/image.png set test [label "url" "toplevel image download" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $image_id && $(stripped_name) eq "image.png" && $(name) eq "file:image.png" && $(method) eq "download"}} 1 "\n$test:\n [array get {}]\n " # download via link #set l /XOWIKI-TEST/download/file/link5 #set test [label "url" "toplevel image download" $l] - #array set "" [$package_id item_info_from_url $l] + #array set "" [::$package_id item_info_from_url $l] #test hint "

found $(item_id) should be $subimagelink_id" # ? {expr {$(item_id) == $subimagelink_id && $(stripped_name) eq "link5" # && $(name) eq "file:link5" && $(method) eq "download"}} 1 "\n$test:\n [array get {}]\n " # tag link set l /XOWIKI-TEST/tag/a set test [label "url" "tag query" $l] - array set "" [$package_id item_info_from_url -default_lang de $l] + array set "" [::$package_id item_info_from_url -default_lang de $l] ? {expr {$(item_id) != 0 && $(stripped_name) eq "weblog" && $(name) eq "en:weblog" && $(method) eq ""}} 1 "\n$test:\n [array get {}]\n" # missing: tag links to subdirectories # url without default lang set l /XOWIKI-TEST/parentpage set test [label "url" "toppage w/o de" $l] - array set "" [$package_id item_info_from_url -default_lang de $l] + array set "" [::$package_id item_info_from_url -default_lang de $l] ? {expr {$(item_id) == $parentpage_id && $(stripped_name) eq "parentpage"}} 1 "\n$test:\n [array get {}]\n " # prefixed name set l /XOWIKI-TEST/de:parentpage set test [label "url" "toppage prefixed eq default_lang" $l] - array set "" [$package_id item_info_from_url -default_lang de $l] + array set "" [::$package_id item_info_from_url -default_lang de $l] ? {expr {$(item_id) == $parentpage_id && $(stripped_name) eq "parentpage"}} 1 "\n$test:\n [array get {}]\n " set l /XOWIKI-TEST/de:parentpage set test [label "url" "toppage prefixed ne default_lang" $l] - array set "" [$package_id item_info_from_url -default_lang en $l] + array set "" [::$package_id item_info_from_url -default_lang en $l] ? {expr {$(item_id) == $parentpage_id && $(stripped_name) eq "parentpage"}} 1 "\n$test:\n [array get {}]\n " @@ -1418,25 +1418,25 @@ set l /XOWIKI-TEST/link2/testpage set test [label "url" "reference page over links to folder default-lang" $l] - array set "" [$package_id item_info_from_url -default_lang de $l] + array set "" [::$package_id item_info_from_url -default_lang de $l] ? {expr {$(item_id) == $testpage_id && $(stripped_name) eq "testpage" && $(name) eq "de:testpage"}} 1 "\n$test:\n [array get {}]\n " set l /XOWIKI-TEST/link2/de:testpage set test [label "url" "reference page over links to folder direct name" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $testpage_id && $(stripped_name) eq "testpage" && $(name) eq "de:testpage"}} 1 "\n$test:\n [array get {}]\n " set l /XOWIKI-TEST/download/file/link2/image2.png set test [label "url" "reference download image over links to folder" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $subimage_id && $(stripped_name) eq "image2.png" && $(name) eq "file:image2.png"}} 1 "\n$test:\n [array get {}]\n " set l /XOWIKI-TEST/link2/f3/page set test [label "url" "path contains link and references finally page" $l] - array set "" [$package_id item_info_from_url $l] + array set "" [::$package_id item_info_from_url $l] ? {expr {$(item_id) == $f3page_id && $(stripped_name) eq "page" && $(name) eq "en:page"}} 1 "\n$test:\n [array get {}]\n " @@ -1447,7 +1447,7 @@ #set l /XOWIKI-TEST/en/folder.form #set test [label "url" "site-wide-page top" $l] - #array set "" [$package_id item_info_from_url -default_lang de $l] + #array set "" [::$package_id item_info_from_url -default_lang de $l] #? {expr {$(item_id) == $parentpage_id && $(stripped_name) eq "parentpage"}} 1 "\n$test:\n [array get {}]\n " # link to page in other package Index: openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/weblog-mini-calendar.tcl,v diff -u -r1.20 -r1.20.2.1 --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 24 Dec 2017 12:51:38 -0000 1.20 +++ openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 8 May 2019 14:33:40 -0000 1.20.2.1 @@ -6,9 +6,9 @@ if {![info exists base_url] || $base_url eq ""} { if {![info exists page]} { - set page [$package_id get_parameter weblog_page] + set page [::$package_id get_parameter weblog_page] } - set base_url [$package_id pretty_link -parent_id $parent_id -path_encode false $page] + set base_url [::$package_id pretty_link -parent_id $parent_id -path_encode false $page] } set date [ns_queryget date] Index: openacs-4/packages/xowiki/www/xinha/insert-wlink.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/insert-wlink.tcl,v diff -u -r1.6.2.1 -r1.6.2.2 --- openacs-4/packages/xowiki/www/xinha/insert-wlink.tcl 30 Mar 2019 19:43:54 -0000 1.6.2.1 +++ openacs-4/packages/xowiki/www/xinha/insert-wlink.tcl 8 May 2019 14:33:40 -0000 1.6.2.2 @@ -43,7 +43,7 @@ $entry instvar name parent_id title formatted_date page_id set entry_package_id [$entry set package_id] - set page_link [$package_id pretty_link -parent_id $parent_id $name] + set page_link [::$package_id pretty_link -parent_id $parent_id $name] t1 add \ -title $title \ -name $name \ @@ -53,7 +53,7 @@ if {$entry_package_id == $package_id} { set label "" } else { - set label [$entry_package_id instance_name] + set label [::$entry_package_id instance_name] } [t1 last_child] set inherited $label } Index: openacs-4/packages/xowf/tcl/atjob-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/atjob-procs.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/xowf/tcl/atjob-procs.tcl 10 Oct 2018 12:58:28 -0000 1.8 +++ openacs-4/packages/xowf/tcl/atjob-procs.tcl 8 May 2019 14:38:41 -0000 1.8.2.1 @@ -53,14 +53,14 @@ set form_id [$class form_id -package_id $package_id -parent_id [${:object} parent_id]] if {$form_id != 0} { ::xo::db::CrClass get_instance_from_db -item_id $form_id - set instance_attributes [dict merge [$form_id default_instance_attributes] [list cmd ${:cmd}]] - set name [::xowiki::autoname new -name [$form_id name] -parent_id $owner_id] + set instance_attributes [dict merge [::$form_id default_instance_attributes] [list cmd ${:cmd}]] + set name [::xowiki::autoname new -name [::$form_id name] -parent_id $owner_id] set f [::xowiki::FormPage new -destroy_on_cleanup \ -package_id $package_id \ -parent_id $owner_id \ -name $name \ -title ${:priority} \ - -nls_language [$form_id nls_language] \ + -nls_language [::$form_id nls_language] \ -publish_status "production" \ -publish_date $ansi_time \ -creation_user ${:party_id} \ @@ -75,7 +75,7 @@ set form_name en:atjob-form set form_id [::xo::db::CrClass lookup -name $form_name -parent_id $parent_id] if {$form_id == 0} { - set page [$package_id resolve_page $form_name __m] + set page [::$package_id resolve_page $form_name __m] if {$page ne ""} {set form_id [$page item_id]} if {$form_id == 0} { ns_log error "Cannot lookup form $form_name; ignore request" @@ -85,7 +85,7 @@ } atjob proc run_jobs {item_ids} { - #my log "---run xowf jobs START" + #:log "---run xowf jobs START" set sql "select package_id, item_id, name, parent_id, publish_status, creation_user, revision_id, page_template, instance_attributes @@ -101,7 +101,7 @@ :log "--at we got [llength [$items children]] scheduled items" foreach item [$items children] { - #my log "--at *** job=[$item serialize] ***\n" + #:log "--at *** job=[$item serialize] ***\n" set owner_id [$item parent_id] set party_id [$item creation_user] set __ia [$item instance_attributes] @@ -117,10 +117,10 @@ # We assume, the package is from the xowiki family; make sure, the url looks like real ::xo::Package initialize \ - -package_id [$owner_id package_id] \ + -package_id [::$owner_id package_id] \ -user_id $party_id \ -init_url 0 -actual_query "" - $package_id set_url -url [$package_id package_url][$owner_id name] + $package_id set_url -url [::$package_id package_url][::$owner_id name] :log "--at executing atjob $cmd" if {[catch {eval $owner_id $cmd} errorMsg]} { @@ -136,7 +136,7 @@ } atjob proc check {{-with_older false}} { - #my log "--at START" + #:log "--at START" # # check, if there are jobs scheduled for execution # Index: openacs-4/packages/xowf/tcl/test-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/test-item-procs.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 30 Apr 2018 09:48:51 -0000 1.7 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 8 May 2019 14:38:41 -0000 1.7.2.1 @@ -187,7 +187,7 @@ set intro_text [:get_named_sub_component_value text] append form "

$intro_text
\n" - #my msg " input_field_names=${:input_field_names}" + #:msg " input_field_names=${:input_field_names}" set mc [:get_named_sub_component_value mc] ns_log notice "MC <$mc>" @@ -227,14 +227,14 @@ "\n" \ "\n" } else { - #my msg $correct_field_name,[:name],$input_field_name + #:msg $correct_field_name,[:name],$input_field_name set correct [expr {"[:name].$input_field_name" eq $correct_field_name}] append form \ "\n" \ "\n" } #ns_log notice "$input_field_name [array get value] corr=$correct" - #my msg "[array get value] corr=$correct" + #:msg "[array get value] corr=$correct" # # build form constraints per input field @@ -248,7 +248,7 @@ lappend if_fc "feedback_answer_incorrect=[::xowiki::formfield:::FormField fc_encode $value(feedback_incorrect)]" } if {[llength $if_fc] > 0} {append fc [list $input_field_name:checkbox,[join $if_fc ,]]\n} - #my msg "$input_field_name .correct = $value(correct)" + #:msg "$input_field_name .correct = $value(correct)" } if {![:multiple]} { @@ -401,7 +401,7 @@ # options set item_id [[${:object} package_id] lookup -name $v] set page [::xo::db::CrClass get_instance_from_db -item_id $item_id] - append form "
  • [$item_id title]

    \n" + append form "
  • [::$item_id title]

    \n" set prefix c$item_id set __ia [$page set instance_attributes] # @@ -443,9 +443,9 @@ if {[regexp {^([^:]+):(.*)$} $f _ field_name definition]} { if {[string match @* $field_name]} continue # keep all form-constraints for which we have altered the name - #my msg "old fc=$f, [list lsearch -exact $alt_inputs $field_name] => [lsearch -exact $alt_inputs $field_name] $alt_values" + #:msg "old fc=$f, [list lsearch -exact $alt_inputs $field_name] => [lsearch -exact $alt_inputs $field_name] $alt_values" set ff [${:object} create_raw_form_field -name $field_name -spec $definition] - #my msg "ff answer => '[$ff answer]'" + #:msg "ff answer => '[$ff answer]'" if {$field_name in $alt_inputs} { lappend fc $prefix-$f } elseif {[$ff exists answer] && $field_name eq [$ff answer]} { @@ -464,7 +464,7 @@ # to combine the values of the items ${:object} set_property -new 1 auto_correct true ;# should be computed ${:object} set_property -new 1 has_solution true ;# should be computed - #my msg "fc=$fc" + #:msg "fc=$fc" } } Index: openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl 31 Jan 2018 14:03:45 -0000 1.1 +++ openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl 8 May 2019 14:38:41 -0000 1.1.2.1 @@ -23,7 +23,7 @@ -package_id $package_id] ::xo::db::sql::content_item set_live_revision \ - -revision_id [$pform_id revision_id] \ + -revision_id [::$pform_id revision_id] \ -publish_status production set ia { @@ -34,7 +34,7 @@ } set parameter_page_name en:xowf-default-parameter - set p [$pform_id create_form_page_instance \ + set p [::$pform_id create_form_page_instance \ -name $parameter_page_name \ -nls_language en_US \ -default_variables [list title "XoWf Default Parameter" parent_id $folder_id \ Index: openacs-4/packages/xowf/tcl/xowf-includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-includelet-procs.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/xowf/tcl/xowf-includelet-procs.tcl 21 Mar 2018 20:01:42 -0000 1.4 +++ openacs-4/packages/xowf/tcl/xowf-includelet-procs.tcl 8 May 2019 14:38:41 -0000 1.4.2.1 @@ -71,7 +71,7 @@ set path $workflow } set parent_id [${:__including_page} parent_id] - set wf_page [$package_id get_page_from_item_ref -parent_id $parent_id $path] + set wf_page [::$package_id get_page_from_item_ref -parent_id $parent_id $path] if {$wf_page eq ""} { :msg "cannot resolve page $workflow" set package_id -1; set page_template -1 Index: openacs-4/packages/xowf/tcl/xowf-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-procs.tcl,v diff -u -r1.28.2.4 -r1.28.2.5 --- openacs-4/packages/xowf/tcl/xowf-procs.tcl 12 Apr 2019 21:29:46 -0000 1.28.2.4 +++ openacs-4/packages/xowf/tcl/xowf-procs.tcl 8 May 2019 14:38:41 -0000 1.28.2.5 @@ -291,7 +291,7 @@ Context instproc resolve_form_name {-object:required name} { set package_id [$object package_id] set parent_id [$object parent_id] - array set "" [$package_id item_ref -normalize_name false \ + array set "" [::$package_id item_ref -normalize_name false \ -use_package_path 1 \ -default_lang [$object lang] \ -parent_id $parent_id \ @@ -334,7 +334,7 @@ set package_id [$object package_id] return [::xowiki::Form new -destroy_on_cleanup \ -package_id $package_id \ - -parent_id [$package_id folder_id] \ + -parent_id [::$package_id folder_id] \ -name "Auto-Form" \ -anon_instances [:autoname] \ -form {} \ @@ -427,10 +427,10 @@ # set form_object [::xowiki::Form new -destroy_on_cleanup \ -package_id $package_id \ - -parent_id [$package_id folder_id] \ + -parent_id [::$package_id folder_id] \ -name "Auto-Form" \ -anon_instances [:autoname] \ - -form "
    [$form_object get_html_from_content [$form_id text]]
    " \ + -form "
    [$form_object get_html_from_content [::$form_id text]]
    " \ -text "" \ -form_constraints ""] } @@ -748,15 +748,15 @@ append result "\}\n" set package_id [${:object} package_id] - set path [acs_package_root_dir [$package_id package_key]]/www/ + set path [acs_package_root_dir [::$package_id package_key]]/www/ set fn $path/g.dot set ofn dot-$obj_id.png set f [open $fn w]; fconfigure $f -encoding utf-8; puts $f $result; close $f if {[catch {exec $dot -Tpng $fn -o $path/$ofn} errorMsg]} { :msg "Error during execution of $dot: $errorMsg" } file delete -- $fn - return "\n" + return "\n" } Context instproc check {} { @@ -977,8 +977,8 @@ set package_id [$object package_id] :log "--xowf invoke action [self]" # We fake a work request with the given instance attributes - set last_context [expr {[$package_id exists context] ? [$package_id context] : "::xo::cc"}] - set last_object [$package_id set object] + set last_context [expr {[::$package_id exists context] ? [::$package_id context] : "::xo::cc"}] + set last_object [::$package_id set object] set cc [::xo::ConnectionContext new -user_id [$last_context user_id]] $package_id context $cc $cc array set form_parameter \ @@ -991,9 +991,9 @@ $cc load_form_parameter_from_values $attributes - $package_id set object "[$package_id folder_path -parent_id [$object parent_id]][$object name]" + $package_id set object "[::$package_id folder_path -parent_id [$object parent_id]][$object name]" - #:log "call_action calls: ::$package_id invoke -method edit -batch_mode 1 // obj=[$package_id set object]" + #:log "call_action calls: ::$package_id invoke -method edit -batch_mode 1 // obj=[::$package_id set object]" if {[catch {::$package_id invoke -method edit -batch_mode 1} errorMsg]} { :msg "---call_action returns error $errorMsg" ns_log error "$errorMsg\n$::errorInfo" @@ -1004,8 +1004,8 @@ $package_id context $last_context $cc destroy - #:log "CHECK batch mode: [$package_id exists __batch_mode]" - if {[$package_id exists __batch_mode]} { + #:log "CHECK batch mode: [::$package_id exists __batch_mode]" + if {[::$package_id exists __batch_mode]} { :msg "RESETTING BATCH MODE" :log "RESETTING BATCH MODE" $package_id unset __batch_mode @@ -1319,17 +1319,17 @@ view_user_input { #:msg "calling edit with disable_input_fields=1" return [:www-edit -disable_input_fields 1] - #return [$package_id call [self] edit [list -disable_input_fields 1]] + #return [::$package_id call [self] edit [list -disable_input_fields 1]] } view_user_input_with_feedback { set :__feedback_mode 1 #:msg "calling edit with disable_input_fields=1" return [:www-edit -disable_input_fields 1] - #return [$package_id call [self] edit [list -disable_input_fields 1]] + #return [::$package_id call [self] edit [list -disable_input_fields 1]] } default { #:msg "calling $method" - return [$package_id invoke -method $method] + return [::$package_id invoke -method $method] } } } @@ -1602,7 +1602,7 @@ WorkflowPage instproc create-or-use_view {-package_id:required -parent_id:required name } { # the link should be able to view return_url and template_file - return [$package_id returnredirect [$package_id pretty_link -parent_id $parent_id $lang:$stripped_name]] + return [::$package_id returnredirect [::$package_id pretty_link -parent_id $parent_id $lang:$stripped_name]] } WorkflowPage instproc www-create-or-use { @@ -1863,10 +1863,10 @@ set button_objs [list] # create new workflow instance button with start form - #if {[:parent_id] != [$package_id folder_id]} { + #if {[:parent_id] != [::$package_id folder_id]} { # set parent_id [:parent_id] #} - set link [$package_id make_link -link $wf_base $wf create-new parent_id return_url] + set link [::$package_id make_link -link $wf_base $wf create-new parent_id return_url] lappend button_objs [::xowiki::includelet::form-menu-button-new new -volatile \ -parent_id $parent_id \ -form $wf -link $link] @@ -2052,7 +2052,7 @@ ad_proc update_hstore {package_id} { update all instance attributes in hstore } { - if {![::xo::dc has_hstore] && [$package_id get_parameter use_hstore 0] } { + if {![::xo::dc has_hstore] && [::$package_id get_parameter use_hstore 0] } { return 0 } # @@ -2079,7 +2079,7 @@ $i save_in_hstore incr count } - $items msg "fetched $count objects from parent_id [$package_id folder_id]" + $items msg "fetched $count objects from parent_id [::$package_id folder_id]" return 1 } @@ -2140,10 +2140,10 @@ ::xowf::dav instproc call_action {-uri -action -attributes} { ${:package} initialize -url $uri - set object_name [$package_id set object] - set page [$package_id resolve_request -path $object_name method] + set object_name [::$package_id set object] + set page [::$package_id resolve_request -path $object_name method] if {$page eq ""} { - set errorMsg cannot resolve '$object_name' in package [$package_id package_url] + set errorMsg cannot resolve '$object_name' in package [::$package_id package_url] ad_log error $errorMsg ns_return 406 text/plain "Error: $errorMsg" } elseif {[catch {set msg [$page call_action \