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.2.1 -r1.1.2.2 --- openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl 8 May 2019 14:33:40 -0000 1.1.2.1 +++ openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl 8 May 2019 19:59:56 -0000 1.1.2.2 @@ -198,14 +198,14 @@ } dotlrn-info instproc render {} { set key [dotlrn_community::get_community_key -community_id ${:community_id}] - set page [${:package_id} resolve_page $key method] + set page [::${:package_id} resolve_page $key method] if {$page ne ""} { return [$page render] } else { # # If the content page does not exist, offer the user to create it. # - set edit_snippet [${:package_id} create_new_snippet $key] + set edit_snippet [::${:package_id} create_new_snippet $key] return $edit_snippet } } 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.5 -r1.55.2.6 --- openacs-4/packages/xowiki/tcl/folder-procs.tcl 8 May 2019 14:33:40 -0000 1.55.2.5 +++ openacs-4/packages/xowiki/tcl/folder-procs.tcl 8 May 2019 19:59:56 -0000 1.55.2.6 @@ -35,7 +35,7 @@ } folders instproc include_head_entries {} { - switch [${:package_id} get_parameter PreferredCSSToolkit bootstrap] { + switch [::${:package_id} get_parameter PreferredCSSToolkit bootstrap] { yui {::xowiki::Tree include_head_entries -renderer yuitree -style folders} bootstrap - default { ::xowiki::Tree include_head_entries -renderer bootstrap3 } @@ -46,7 +46,7 @@ :get_parameters set tree [:build_tree] - switch [${:package_id} get_parameter PreferredCSSToolkit bootstrap] { + switch [::${:package_id} get_parameter PreferredCSSToolkit bootstrap] { yui { set js " var [:js_name]; @@ -549,7 +549,7 @@ set :current_folder_id [$current_folder set physical_item_id] } - $package_id instvar package_key + ::$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}}] 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.7 -r1.284.2.8 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 8 May 2019 14:33:40 -0000 1.284.2.7 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 8 May 2019 19:59:56 -0000 1.284.2.8 @@ -1118,7 +1118,7 @@ # if {[:cleanup]} { 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]] + ::$package_id returnredirect [${:object} pretty_link -query [export_vars {m delete} return_url]] } } } @@ -2809,7 +2809,7 @@ } abstract_page instproc get_entry_label {value} { - set item_id [${:package_id} lookup -parent_id [${:object} parent_id] -name $value] + set item_id [::${:package_id} lookup -parent_id [${:object} parent_id] -name $value] if {$item_id} { return [::xo::cc cache [list :fetch_entry_label [:entry_label] $item_id]] } @@ -2818,11 +2818,12 @@ abstract_page instproc pretty_value {v} { set parent_id [${:object} parent_id] + set package ::${:package_id} set :options [:get_labels $v] if {[:multiple]} { foreach o ${:options} { lassign $o label value - set href [${:package_id} pretty_link -parent_id $parent_id $value] + set href [$package pretty_link -parent_id $parent_id $value] set labels($value) "$label" } set hrefs [list] @@ -2831,7 +2832,7 @@ #:msg "can't determine label for value '$i' (values=$v, l=[array names labels])" set labels($i) $i } - set href [${:package_id} pretty_link -parent_id $parent_id $i] + set href [$package pretty_link -parent_id $parent_id $i] lappend hrefs "$labels($i)" } if {[:multiple_style] eq "list"} { @@ -2847,7 +2848,7 @@ if {[:as_box]} { return [${:object} include [list $value -decoration rightbox]] } - set href [${:package_id} pretty_link -parent_id $parent_id $value] + set href [$package pretty_link -parent_id $parent_id $value] return "$label" } } 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.2.1 -r1.42.2.2 --- openacs-4/packages/xowiki/tcl/import-procs.tcl 8 May 2019 14:33:40 -0000 1.42.2.1 +++ openacs-4/packages/xowiki/tcl/import-procs.tcl 8 May 2019 19:59:56 -0000 1.42.2.2 @@ -58,11 +58,12 @@ } else { #: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] \ + set item ::$item_id + $item copy_content_vars -from_object $object + $item save -use_given_publish_date [$item 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 item_id] #:msg "$item_id updated: [$object name]" :report_line $item_id updated incr :updated @@ -72,7 +73,7 @@ set n [$object save_new -use_given_publish_date [$object exists publish_date] \ -creation_user [$object set modifying_user] ] $object set item_id $n - set item_id $object + set item $object #:msg "$object added: [$object name]" :report_line $object added incr :added @@ -82,8 +83,8 @@ # 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]" - $item_id map_categories [$object set __category_ids] + #:msg "$item_id map_categories [object set __category_ids] // [$item item_id]" + $item map_categories [$object set __category_ids] } ${:package_id} flush_references -item_id [$object item_id] -name [$object name] @@ -183,7 +184,7 @@ && [$o exists __export_reason] && [$o set __export_reason] eq "implicit_page_template"} { $o unset __export_reason - set page [${:package_id} get_page_from_item_ref \ + set page [::${:package_id} get_page_from_item_ref \ -allow_cross_package_item_refs false \ -use_package_path true \ -use_site_wide_pages true \ @@ -305,7 +306,7 @@ set items($template_id) 1 ::xo::db::CrClass get_instance_from_db -item_id $template_id set new 1 - $template_id set __export_reason implicit_page_template + ::$template_id set __export_reason implicit_page_template continue } } @@ -319,7 +320,7 @@ 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 + ::$item_id set __export_reason implicit_child_page } } } 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.8 -r1.239.2.9 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 8 May 2019 14:33:40 -0000 1.239.2.8 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 8 May 2019 19:59:56 -0000 1.239.2.9 @@ -1524,7 +1524,7 @@ if {[::xo::cc user_id] != 0} { set gc_link [general_comments_create_link \ -object_name [${:__including_page} title] \ - $item_id $gc_return_url] + ::$item_id $gc_return_url] set gc_link
$gc_link
} else { set gc_link "" @@ -1867,8 +1867,8 @@ Class create PageReorderSupport PageReorderSupport instproc page_reorder_check_allow {{-with_head_entries true} allow_reorder} { if {$allow_reorder ne ""} { - set granted [${:package_id} check_permissions \ - -user_id [[${:package_id} context] user_id] \ + set granted [::${:package_id} check_permissions \ + -user_id [[::${:package_id} context] user_id] \ -package_id ${:package_id} \ ${:package_id} change-page-order] #:msg "granted=$granted" @@ -1889,7 +1889,7 @@ PageReorderSupport instproc page_reorder_init_vars {-allow_reorder js_ last_level_ ID_ min_level_} { :upvar $js_ js $last_level_ last_level $ID_ ID $min_level_ min_level - set js "YAHOO.xo_page_order_region.DDApp.package_url = '[${:package_id} package_url]';\n" + set js "YAHOO.xo_page_order_region.DDApp.package_url = '[::${:package_id} package_url]';\n" set last_level 0 set ID [:js_name] if {[string is integer -strict $allow_reorder]} { @@ -2026,9 +2026,9 @@ toc instproc href {book_mode name} { if {$book_mode} { - set href [${:package_id} url]#[toc anchor $name] + set href [::${:package_id} url]#[toc anchor $name] } else { - set href [${:package_id} pretty_link -parent_id [${:__including_page} parent_id] $name] + set href [::${:package_id} pretty_link -parent_id [${:__including_page} parent_id] $name] } return $href } @@ -3034,7 +3034,9 @@ } item-button instproc initialize {} { - if {[:return_url] eq "" } { :return_url [${:package_id} url]} + if {[:return_url] eq "" } { + :return_url [::${:package_id} url] + } } item-button instproc render_button { @@ -3565,11 +3567,11 @@ form-menu-button instproc render {} { if {![info exists :link]} { - if {${:parent_id} != [${:package_id} folder_id]} { + if {${:parent_id} != [::${:package_id} folder_id]} { set parent_id ${:parent_id} } if {[info exists :return_url]} {set return_url ${:return_url}} - set :link [${:package_id} make_link -link ${:base} ${:form} ${:method} return_url parent_id] + set :link [::${:package_id} make_link -link ${:base} ${:form} ${:method} return_url parent_id] } if {${:link} eq ""} { return "" @@ -4302,18 +4304,18 @@ # instantiate a form page from it. set form_form_id 0 if {$form_form ne ""} { - set form_form_id [::xo::db::CrClass lookup -name $form_form -parent_id [${:package_id} folder_id]] + set form_form_id [::xo::db::CrClass lookup -name $form_form -parent_id [::${:package_id} folder_id]] } # The normal form requires for rich-text the 2 element list as content if {$form_form_id == 0} { set form [list $form text/html] } - set item_id [::xo::db::CrClass lookup -name $form_name -parent_id [${:package_id} folder_id]] + set item_id [::xo::db::CrClass lookup -name $form_name -parent_id [::${:package_id} folder_id]] if {$item_id == 0} { if {$form_form_id == 0} { set f [::xowiki::Form new \ -package_id ${:package_id} \ - -parent_id [${:package_id} folder_id] \ + -parent_id [::${:package_id} folder_id] \ -name $form_name \ -anon_instances $voting_form_anon_instances \ -form $form \ @@ -4324,7 +4326,7 @@ set f [::xowiki::FormPage new \ -page_template $form_form_id \ -package_id ${:package_id} \ - -parent_id [${:package_id} folder_id] \ + -parent_id [::${:package_id} folder_id] \ -name $form_name] $f set_property anon_instances $voting_form_anon_instances $f set_property form $form @@ -4338,11 +4340,11 @@ } else { ::xo::db::CrClass get_instance_from_db -item_id $item_id if {$form_form_id == 0} { - $item_id form $form + ::$item_id form $form } else { - $item_id set_property form $form + ::$item_id set_property form $form } - $item_id save + ::$item_id save set form_href [::$item_id pretty_link] set action updated } @@ -4730,7 +4732,7 @@ if {$book_mode} { set href [::xo::cc url]#[toc anchor $name] } else { - set href [${:package_id} pretty_link -parent_id [${:__including_page} parent_id] $name] + set href [::${:package_id} pretty_link -parent_id [${:__including_page} parent_id] $name] } return $href } Index: openacs-4/packages/xowiki/tcl/link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v diff -u -r1.106 -r1.106.2.1 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 27 Jun 2018 12:07:09 -0000 1.106 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 8 May 2019 19:59:57 -0000 1.106.2.1 @@ -153,7 +153,7 @@ set page [:page] set nls_language [$page get_nls_language_from_lang [:lang]] if {${:form} ne ""} { - return [${:package_id} make_form_link -form ${:form} \ + return [::${:package_id} make_form_link -form ${:form} \ -parent_id ${:parent_id} \ -name [:name] \ -nls_language $nls_language] @@ -358,13 +358,13 @@ set item_id [:resolve] if {$item_id} { set image_css_class "found" - set link [${:package_id} pretty_link -lang ${:lang} -parent_id ${:parent_id} [:stripped_name]] + set link [::${:package_id} pretty_link -lang ${:lang} -parent_id ${:parent_id} [:stripped_name]] } else { set image_css_class "undefined" set last_page_id [$page set item_id] set object_type [[$page info class] set object_type] set name ${:name} - set link [${:package_id} make_link ${:package_id} \ + set link [::${:package_id} make_link ${:package_id} \ edit-new object_type name last_page_id] } # :log "--lang_link=$link" @@ -405,7 +405,7 @@ set item_id [:resolve] #:log "-- image resolve for $page returned $item_id (name=${:name}, label=${:label})" if {$item_id} { - set link [${:package_id} pretty_link -download true -query [:query] \ + set link [::${:package_id} pretty_link -download true -query [:query] \ -absolute [$page absolute_links] -parent_id ${:parent_id} ${:name}] #:log "--l fully quali [$page absolute_links], link=$link" $page references resolved [list $item_id [:type]] @@ -414,7 +414,7 @@ set last_page_id [$page set item_id] set object_type ::xowiki::File set name ${:name} - set link [${:package_id} make_link ${:package_id} edit-new object_type \ + set link [::${:package_id} make_link ${:package_id} edit-new object_type \ [list parent_id ${:parent_id}] \ [list title [ad_html_to_text -no_format -- ${:label}]] \ [list return_url [::xo::cc url]] \ @@ -535,7 +535,7 @@ ::xowiki::Link::swf instproc render_found {href label} { ::xo::Page requireJS /resources/xowiki/swfobject.js - #set link [${:package_id} pretty_link -absolute true -siteurl http://localhost:8003 ${:name}]/download.swf + #set link [::${:package_id} pretty_link -absolute true -siteurl http://localhost:8003 ${:name}]/download.swf lassign {320 240 7} width height version foreach a {width height version} {if {[info exists :$a]} {set $a [set :$a]}} set id [::xowiki::Includelet html_id ${:item_id}] 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.8 -r1.332.2.9 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 8 May 2019 14:33:40 -0000 1.332.2.8 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 8 May 2019 19:59:57 -0000 1.332.2.9 @@ -747,7 +747,7 @@ set page [$package resolve_page -simple true $object_name __m] $package context $last_context } - $last_package_id set_url -url $last_url + ::$last_package_id set_url -url $last_url } else { # @@ -1087,9 +1087,9 @@ set m [:query_parameter m] if {$m in {list show-object file-upload}} { array set "" [list \ - name [${:folder_id} name] \ - stripped_name [${:folder_id} name] \ - parent_id [${:folder_id} parent_id] \ + name [::${:folder_id} name] \ + stripped_name [::${:folder_id} name] \ + parent_id [::${:folder_id} parent_id] \ item_id ${:folder_id} \ method [:query_parameter m]] } else { @@ -1363,7 +1363,7 @@ if {$target_item_id != 0} { #:msg "SYMLINK FIX $target_item_id set_resolve_context -package_id ${:id} -parent_id $parent_id" ::xo::db::CrClass get_instance_from_db -item_id $target_item_id - $target_item_id set_resolve_context -package_id ${:id} -parent_id $parent_id + ::$target_item_id set_resolve_context -package_id ${:id} -parent_id $parent_id } return $target_item_id } Index: openacs-4/packages/xowiki/tcl/syndicate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/syndicate-procs.tcl,v diff -u -r1.51.2.3 -r1.51.2.4 --- openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 31 Mar 2019 11:18:00 -0000 1.51.2.3 +++ openacs-4/packages/xowiki/tcl/syndicate-procs.tcl 8 May 2019 19:59:57 -0000 1.51.2.4 @@ -352,7 +352,7 @@ append result [:tag -atts [list \ start $stamp \ title $title \ - link [${:package_id} pretty_link \ + link [::${:package_id} pretty_link \ -parent_id [$i set parent_id] \ [$i set name]]] \ event $event] \n 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.8 -r1.75.2.9 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 8 May 2019 14:33:40 -0000 1.75.2.8 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 8 May 2019 19:59:57 -0000 1.75.2.9 @@ -284,7 +284,8 @@ set range [expr {$nr > 1 ? "$from - $to" : $from}] if {${:filter_msg} ne ""} { - set all_href [${:package_id} package_url][${:package_id} get_parameter weblog_page weblog-portlet] + set package ::${:package_id} + set all_href [$package package_url][$package get_parameter weblog_page weblog-portlet] append :filter_msg ", $range of ${:nr_items} ${:entry_label} (all, $flink)" } else { append :filter_msg "Showing $range of ${:nr_items} ${:entry_label} ($flink)" 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.14 -r1.542.2.15 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 8 May 2019 14:33:40 -0000 1.542.2.14 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 8 May 2019 19:59:57 -0000 1.542.2.15 @@ -1489,7 +1489,7 @@ } elseif { $colName eq "instance_attributes" && [::xo::dc has_hstore] - && [${:package_id} get_parameter use_hstore 0] + && [::${:package_id} get_parameter use_hstore 0] } { ::xowiki::update_item_index -item_id ${:item_id} -hstore_attributes $value } @@ -1914,7 +1914,7 @@ the language prefix of the including page is used. } { if {$page_name ne ""} { - set page [${:package_id} resolve_page_name_and_init_context -lang [:lang] $page_name] + set page [::${:package_id} resolve_page_name_and_init_context -lang [:lang] $page_name] if {$page eq ""} { error "Cannot find page '$page_name' to be included in page '[:name]'" } @@ -2083,7 +2083,7 @@ # return [list allowed 0 msg "Invalid name for adp_include" fn ""] } - return [list allowed 1 msg "" fn /packages/[${:package_id} package_key]/www/$adp_fn] + return [list allowed 1 msg "" fn /packages/[::${:package_id} package_key]/www/$adp_fn] } Page instproc include_content {arg ch2} { @@ -2201,7 +2201,7 @@ regexp {:([^:]+)$} $name _ stripped_name } - set normalized_name [${:package_id} normalize_name $stripped_name] + set normalized_name [::${:package_id} normalize_name $stripped_name] #:msg "input: [self args] - lang=[:lang], [:nls_language]" if {$lang eq ""} {set lang [:lang]} if {$name eq ""} {set name $lang:$normalized_name} @@ -2247,7 +2247,7 @@ # Get the package_id from the provided path, and - if found - # return the shortened link relative to it. - set package_id [${:package_id} resolve_package_path $link link] + set package_id [::${:package_id} resolve_package_path $link link] if {$package_id == 0} { # we treat all such links like external links if {[regsub {^//} $link / link]} { @@ -3157,7 +3157,7 @@ set source [FormPage get_instance_from_db -item_id $source_item_id] $f copy_content_vars -from_object $source set name "[::xowiki::autoname new -parent_id $source_item_id -name [:name]]" - $package_id get_lang_and_name -name $name lang name + ::$package_id get_lang_and_name -name $name lang name $f set name $name #:msg nls=[$f nls_language],source-nls=[$source nls_language] } @@ -3243,7 +3243,7 @@ # filename. Just use the last part in such cases as name. regexp {[/\\]([^/\\]+)$} $stripped_name _ stripped_name } - return file:[${:package_id} normalize_name $stripped_name] + return file:[::${:package_id} normalize_name $stripped_name] } File instproc full_file_name {} { if {![info exists :full_file_name]} { @@ -3385,7 +3385,7 @@ }] regsub {[.][0-9]+([^0-9])} ${:last_modified} {\1} last_modified - $package_id get_lang_and_name -name ${:name} lang stripped_name + ::$package_id get_lang_and_name -name ${:name} lang stripped_name set label $stripped_name $t add \ @@ -3555,7 +3555,7 @@ PageInstance instproc widget_spec_from_folder_object {name given_template_name} { # get the widget field specifications from the payload of the folder object # for a field with a specified name in a specified page template - foreach {s widget_spec} [${:package_id} get_parameter WidgetSpecs] { + foreach {s widget_spec} [::${:package_id} get_parameter WidgetSpecs] { lassign [split $s ,] template_name var_name #ns_log notice "--w template_name $template_name, given '$given_template_name' varname=$var_name name=$name" if {([string match $template_name $given_template_name] || $given_template_name eq "") && 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.2.1 -r1.57.2.2 --- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 8 May 2019 14:33:40 -0000 1.57.2.1 +++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 8 May 2019 19:59:57 -0000 1.57.2.2 @@ -324,7 +324,7 @@ ::xotcl::Object log "...will delete $name doit=$doit $last_modified" if {$doit} { ::xowiki::Package require $package_id - $package_id delete -item_id $item_id -name $name + ::$package_id delete -item_id $item_id -name $name } } } @@ -360,7 +360,7 @@ ::xotcl::Object log "...will delete $name revision=$last_revision, doit=$doit $last_modified" if {$doit} { ::xowiki::Package require $package_id - $package_id delete_revision -revision_id $last_revision -item_id $item_id + ::$package_id delete_revision -revision_id $last_revision -item_id $item_id } } } @@ -802,7 +802,7 @@ # # Flush the page fragment caches (page fragments based on # page_order might be sufficient). - $package_id flush_page_fragment_cache -scope agg + ::$package_id flush_page_fragment_cache -scope agg } # 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.13 -r1.368.2.14 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 8 May 2019 14:33:40 -0000 1.368.2.13 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 8 May 2019 19:59:57 -0000 1.368.2.14 @@ -36,14 +36,14 @@ # object... # set parent_id ${:item_id} - set root_folder_id [${:package_id} folder_id] + set root_folder_id [::${:package_id} folder_id] if {${:parent_id} == $root_folder_id} { # # ...unless we realize this is the package index page. In this # case we resolve based on the root folder (this happens e.g. in # the table of contents for xowf). # - set index_name [${:package_id} get_parameter index_page index] + set index_name [::${:package_id} get_parameter index_page index] ${:package_id} get_lang_and_name -name $index_name lang stripped_name set index_item_id [::xo::db::CrClass lookup \ -name ${lang}:${stripped_name} \ @@ -269,7 +269,7 @@ # parent_id has priority over the other measures to obtain it. # if {$parent_id == 0} { - if {![info exists :parent_id]} {:parent_id [${:package_id} folder_id]} + if {![info exists :parent_id]} {:parent_id [::${:package_id} folder_id]} set fp_parent_id [:form_parameter "parent_id" [:query_parameter "parent_id" ${:parent_id}]] } else { set fp_parent_id $parent_id @@ -290,7 +290,7 @@ set publish_status [:query_parameter "publish_status" ""] } if {$publish_status eq "" && [:exists_query_parameter name]} { - if {[${:package_id} get_parameter production_mode 0]} { + if {[::${:package_id} get_parameter production_mode 0]} { set publish_status "production" } else { set publish_status "ready" @@ -413,7 +413,7 @@ if {$formName eq ""} { error "no form specified" } - $package_id get_lang_and_name -default_lang [::xo::cc lang] -path $formName lang stripped_url + ::$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 item_id [dict get $d item_id] if {$item_id == 0} { @@ -432,7 +432,7 @@ :save #:msg "ok $msg" } - $package_id returnredirect [::xo::cc url] + ::$package_id returnredirect [::xo::cc url] } @@ -670,8 +670,8 @@ # with the proper delivery information. # set package_id [::xo::cc package_id] - $package_id set mime_type ${:mime_type} - $package_id set delivery \ + ::$package_id set mime_type ${:mime_type} + ::$package_id set delivery \ [expr {$use_bg_delivery ? "ad_returnfile_background" : "ns_returnfile"}] if {[:exists_query_parameter filename]} { @@ -709,7 +709,7 @@ # way, ... but keep things compatible for now. # ::xo::cc set status_code 304 - $package_id set delivery ns_return + ::$package_id set delivery ns_return return "" } } @@ -1031,7 +1031,7 @@ set evaluation_errors "" if {[::$package_id exists __evaluation_error]} { set evaluation_errors "\nEvaluation error: [::$package_id set __evaluation_error]" - $package_id unset __evaluation_error + ::$package_id unset __evaluation_error } error "[llength $errors] validation error(s): $errors $evaluation_errors" } @@ -1068,7 +1068,7 @@ # set return_url [::$package_id query_parameter return_url $url] #:log "${:name}: url=$url, return_url=$return_url" - $package_id returnredirect $return_url + ::$package_id returnredirect $return_url return } @@ -1426,7 +1426,7 @@ #:log "--M set_live_revision $revision_id" :set_live_revision -revision_id $revision_id ${:package_id} returnredirect [:query_parameter "return_url" \ - [export_vars -base [${:package_id} url] {{m revisions}}]] + [export_vars -base [::${:package_id} url] {{m revisions}}]] } # @@ -1456,9 +1456,10 @@ tags. } { + set package ::${:package_id} set limit [:query_parameter "limit" 20] - set weblog_page [${:package_id} get_parameter weblog_page weblog] - set href [${:package_id} pretty_link -parent_id [${:package_id} folder_id] $weblog_page]?summary=1 + set weblog_page [$package get_parameter weblog_page weblog] + set href [$package pretty_link -parent_id [$package folder_id] $weblog_page]?summary=1 set entries [list] xo::dc foreach get_popular_tags \ @@ -1504,7 +1505,7 @@ # # We have no validation errors, so we can save the content. # - set update_without_revision [${:package_id} query_parameter replace 0] + set update_without_revision [::${:package_id} query_parameter replace 0] foreach form_field $form_fields { # @@ -1564,7 +1565,7 @@ package. } { - #set context [list [list [${:package_id} url] ${:name} ] [_ xotcl-core.revisions]] + #set context [list [list [::${:package_id} url] ${:name} ] [_ xotcl-core.revisions]] #set title "[_ xotcl-core.revision_title] '${:name}'" return [:www-view [next]] } @@ -1586,7 +1587,7 @@ [:form_parameter new_tags] ::${:package_id} returnredirect \ - [:query_parameter "return_url" [${:package_id} url]] + [:query_parameter "return_url" [::${:package_id} url]] } # @@ -1865,7 +1866,7 @@ # standard location. # if {![regexp {^[./]} $template_file]} { - set template_file [${:package_id} get_adp_template $template_file] + set template_file [::${:package_id} get_adp_template $template_file] } # @@ -1976,7 +1977,7 @@ set title ${:title} set name ${:name} set item_id ${:item_id} - $context_package_id return_page -adp $template_file -variables { + ::$context_package_id return_page -adp $template_file -variables { name title item_id context return_url content footer package_id page_package_id page_context rev_link edit_link delete_link new_link admin_link index_link view_link @@ -2378,7 +2379,7 @@ set validation_errors 0 set category_ids [list] array set containers [list] - set cc [${:package_id} context] + set cc [::${:package_id} context] if {![info exists field_names]} { set field_names [$cc array names form_parameter] @@ -2681,7 +2682,7 @@ #:msg fields_from_form=[array names :__field_in_form] set field_names [list _name] - if {[${:package_id} show_page_order]} { lappend field_names _page_order } + if {[::${:package_id} show_page_order]} { lappend field_names _page_order } lappend field_names _title _creator _assignee foreach fn $reduced_attributes { lappend field_names $fn } foreach fn [list _text _description _nls_language] { lappend field_names $fn } 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.2.1 -r1.15.2.2 --- openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 8 May 2019 14:33:40 -0000 1.15.2.1 +++ openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 8 May 2019 19:59:57 -0000 1.15.2.2 @@ -281,7 +281,7 @@ # foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page weblog-portlet + ::$package_id import-prototype-page weblog-portlet } } @@ -305,8 +305,8 @@ "update cr_items set name = 'file' || substr(name,6) \ 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 + ::$package_id import-prototype-page book + ::$package_id import-prototype-page weblog # TODO check: jon.griffin } } @@ -320,7 +320,7 @@ # foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page categories-portlet + ::$package_id import-prototype-page categories-portlet } # # ... Perform the upgrade of 0.62 for the s5 package as well. @@ -360,9 +360,9 @@ # foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page announcements - $package_id import-prototype-page news - $package_id import-prototype-page weblog-portlet + ::$package_id import-prototype-page announcements + ::$package_id import-prototype-page news + ::$package_id import-prototype-page weblog-portlet } } @@ -376,8 +376,8 @@ # foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page news - $package_id import-prototype-page weblog-portlet + ::$package_id import-prototype-page news + ::$package_id import-prototype-page weblog-portlet } # To iterate over all kind of xowiki packages, we could do # foreach package [concat ::xowiki::Package [::xowiki::Package info subclass]] { @@ -396,7 +396,7 @@ # foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page news-item + ::$package_id import-prototype-page news-item } copy_parameter top_portlet top_includelet } @@ -414,8 +414,8 @@ ns_log notice "-- upgrading to $v" foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page weblog - $package_id import-prototype-page weblog-portlet + ::$package_id import-prototype-page weblog + ::$package_id import-prototype-page weblog-portlet } } @@ -463,7 +463,7 @@ ns_log notice "-- upgrading to $v" foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page ical + ::$package_id import-prototype-page ical } } @@ -473,7 +473,7 @@ ns_log notice "-- upgrading to $v" foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page weblog + ::$package_id import-prototype-page weblog } db_dml strip_colons_from_tags \ "update xowiki_tags set tag = trim(both ',' from tag) where tag like '%,%'" @@ -523,8 +523,8 @@ # foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page weblog-portlet - $package_id import-prototype-page news + ::$package_id import-prototype-page weblog-portlet + ::$package_id import-prototype-page news } } @@ -558,7 +558,7 @@ ::xowiki::Package require_site_wide_pages -refetch true foreach package_id [::xowiki::Package instances] { ::xowiki::Package initialize -package_id $package_id -init_url false - $package_id import-prototype-page weblog + ::$package_id import-prototype-page weblog } } @@ -617,7 +617,7 @@ foreach package_id [::xowiki::Package instances -closure true] { ::xowiki::Package initialize -package_id $package_id -init_url false # reload updated prototype pages - $package_id import-prototype-page categories-portlet + ::$package_id import-prototype-page categories-portlet } } @@ -686,9 +686,9 @@ } ns_log notice "update prototype pages" # reload updated prototype pages - $package_id import-prototype-page bib - $package_id import-prototype-page news - $package_id import-prototype-page weblog-portlet + ::$package_id import-prototype-page bib + ::$package_id import-prototype-page news + ::$package_id import-prototype-page weblog-portlet } } @@ -711,7 +711,7 @@ # work yet, try old format. # if {[catch {$package_id www-import-prototype-page sitemapindex.xml}]} { - $package_id import-prototype-page sitemapindex.xml + ::$package_id import-prototype-page sitemapindex.xml } } } @@ -736,7 +736,7 @@ foreach package_id [::xowiki::Package instances -closure true] { ::xowiki::Package initialize -package_id $package_id -init_url false # reload updated prototype pages - $package_id www-import-prototype-page categories-portlet + ::$package_id www-import-prototype-page categories-portlet } # # This "ON DELETE CASCADE" was missed in the old good days and @@ -778,7 +778,7 @@ # try old format. # if {[catch {$package_id www-import-prototype-page categories-portlet}]} { - $package_id import-prototype-page categories-portlet + ::$package_id import-prototype-page categories-portlet } } } Index: openacs-4/packages/xowiki/www/admin/bulk-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/bulk-delete.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/xowiki/www/admin/bulk-delete.tcl 19 Jan 2018 13:48:24 -0000 1.5 +++ openacs-4/packages/xowiki/www/admin/bulk-delete.tcl 8 May 2019 19:59:57 -0000 1.5.2.1 @@ -12,7 +12,7 @@ foreach o $objects { ns_log notice "DELETE $o" - $package_id www-delete -name $o + ::$package_id www-delete -name $o } ad_returnredirect "./list" Index: openacs-4/packages/xowiki/www/admin/delete-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/delete-type.tcl,v diff -u -r1.15 -r1.15.2.1 --- openacs-4/packages/xowiki/www/admin/delete-type.tcl 19 Jan 2018 13:48:24 -0000 1.15 +++ openacs-4/packages/xowiki/www/admin/delete-type.tcl 8 May 2019 19:59:57 -0000 1.15.2.1 @@ -15,7 +15,7 @@ set sql [$object_type instance_select_query -with_subtypes 0 -folder_id [::$package_id folder_id]] xo::dc foreach retrieve_instances $sql { permission::require_write_permission -object_id $item_id - $package_id www-delete -item_id $item_id -name $name + ::$package_id www-delete -item_id $item_id -name $name } # drop type requires that all pages of all xowiki instances are deleted 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.2.1 -r1.24.2.2 --- openacs-4/packages/xowiki/www/admin/export.tcl 8 May 2019 14:33:40 -0000 1.24.2.1 +++ openacs-4/packages/xowiki/www/admin/export.tcl 8 May 2019 19:59:57 -0000 1.24.2.2 @@ -21,7 +21,7 @@ xo::dc foreach instance_select $sql { set items($item_id) 1 } } else { foreach o $objects { - $package_id get_lang_and_name -default_lang [::xo::cc lang] -path $o lang stripped_name + ::$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 \ -path $stripped_name -parent_id $folder_id \ parent local_name]