Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs-oracle.xql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs-oracle.xql 22 Jun 2002 17:28:32 -0000 1.9 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs-oracle.xql 22 Jun 2002 20:09:31 -0000 1.10 @@ -48,11 +48,11 @@ - + select site_node.url(node_id) from site_nodes - where object_id = :subsite_pkg_id + where object_id = :object_id Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql 22 Jun 2002 17:28:32 -0000 1.13 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql 22 Jun 2002 20:09:31 -0000 1.14 @@ -44,11 +44,11 @@ - + select site_node__url(node_id) from site_nodes - where object_id = :subsite_pkg_id + where object_id = :object_id Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 22 Jun 2002 17:28:32 -0000 1.9 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 22 Jun 2002 20:09:31 -0000 1.10 @@ -214,6 +214,14 @@ error "site node not found at url $url" } + ad_proc -public get_from_object_id { + {-object_id:required} + } { + return the site node associated with the given object_id + } { + return [get -url [get_url_from_object_id -object_id $object_id]] + } + ad_proc -public get_url { {-node_id:required} } { @@ -227,6 +235,14 @@ return $url } + ad_proc -public get_url_from_object_id { + {-object_id:required} + } { + return the url of the site node associated with the given object + } { + return [db_string select_url_from_object_id {} -default ""] + } + ad_proc -public get_node_id { {-url:required} } { @@ -236,15 +252,41 @@ return $node(node_id) } + ad_proc -public get_node_id_from_object_id { + {-object_id:required} + } { + return the site node id associated with the given object_id + } { + return [get_node_id -url [get_url_from_object_id -object_id $object_id]] + } + ad_proc -public get_parent_id { {-node_id:required} } { - return the parent_id for this node + return the parent_id of this node } { array set node [get -node_id $node_id] return $node(parent_id) } + ad_proc -public get_parent { + {-node_id:required} + } { + return the parent node of this node + } { + array set node [get -node_id $node_id] + return [get -node_id $node(parent_id)] + } + + ad_proc -public get_object_id { + {-node_id:required} + } { + return the object_id for this node + } { + array set node [get -node_id $node_id] + return $node(object_id) + } + } ad_proc -deprecated site_node_create { @@ -305,7 +347,7 @@ @creation-date 2002-05-02 } { db_transaction { - set package_id [site_nodes::get_package_id_from_node_id -node_id $node_id] + set package_id [site_node::get_object_id -node_id $node_id] site_node::unmount -node_id $node_id apm_package_instance_delete $package_id } @@ -495,5 +537,5 @@ return $default } - return [db_string select_url {} -default ""] + return [site_node::get_url_from_object_id -object_id $subsite_pkg_id] } Index: openacs-4/packages/bm-portlet/www/bm-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bm-portlet/www/bm-portlet.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bm-portlet/www/bm-portlet.tcl 16 May 2002 00:41:45 -0000 1.2 +++ openacs-4/packages/bm-portlet/www/bm-portlet.tcl 22 Jun 2002 20:11:03 -0000 1.3 @@ -35,9 +35,9 @@ set user_id [ad_conn user_id] set package_id $config(package_id) set scoped_p [ad_decode $config(scoped_p) t 1 0] -set admin_p [permission::permission_p -object_id $package_id -privilege "admin"] +set admin_p [permission::permission_p -object_id $package_id -privilege admin] set spam_name [bulk_mail::parameter -parameter PrettyName -default Spam] -set spam_url [site_nodes::get_url_from_package_id -package_id $package_id] +set spam_url [site_node::get_url_from_object_id -object_id $package_id] ad_return_template Index: openacs-4/packages/bulk-mail/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/www/index.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bulk-mail/www/index.tcl 16 May 2002 00:41:44 -0000 1.2 +++ openacs-4/packages/bulk-mail/www/index.tcl 22 Jun 2002 20:09:31 -0000 1.3 @@ -22,7 +22,7 @@ set table_def { {send_date {Send Date} {bulk_mail_messages.send_date $order} {[util_AnsiDatetoPrettyDate $send_date]}} {from_addr From {bulk_mail_messages.from_addr $order} {$from_addr}} - {subject Subject {bulk_mail_messages.subject $order} {$subject}} + {subject Subject {bulk_mail_messages.subject $order} {$subject}} {sent_p {Sent?} {bulk_mail_messages.sent_p $order} {[ad_decode $sent_p t Yes No]}} } Index: openacs-4/packages/dotlrn/tcl/applets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/tcl/applets-procs.tcl 29 May 2002 17:27:57 -0000 1.10 +++ openacs-4/packages/dotlrn/tcl/applets-procs.tcl 22 Jun 2002 20:11:03 -0000 1.11 @@ -35,7 +35,7 @@ } ad_proc -public is_initalized {} { - if {[site_nodes::get_node_id_from_url -url [get_url]] != [dotlrn::get_node_id] } { + if {[site_node::get_node_id -url [get_url]] != [dotlrn::get_node_id] } { return 1 } else { return 0 @@ -44,7 +44,7 @@ ad_proc -public init {} { # Create the applets node - site_nodes::site_node_create -parent_node_id [dotlrn::get_node_id] -name applets + site_node::new -name applets -parent_id [dotlrn::get_node_id] } ad_proc -public register { @@ -157,7 +157,7 @@ ad_proc -public is_applet_mounted { {-url:required} } { - if {[site_nodes::get_node_id_from_url -url "[get_url]/$url"] == [site_nodes::get_node_id_from_url -url [get_url]]} { + if {[site_node::get_node_id -url "[get_url]/$url"] == [site_node::get_node_id -url [get_url]]} { return 0 } else { return 1 Index: openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql,v diff -u -r1.18 -r1.19 --- openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql 31 May 2002 06:23:49 -0000 1.18 +++ openacs-4/packages/dotlrn/tcl/community-procs-oracle.xql 22 Jun 2002 20:11:03 -0000 1.19 @@ -73,14 +73,6 @@ - - - select site_node.url(node_id) - from site_nodes - where object_id = :package_id - - - select community_type Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.147 -r1.148 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 13 Jun 2002 20:30:44 -0000 1.147 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 22 Jun 2002 20:11:03 -0000 1.148 @@ -82,29 +82,20 @@ } { # Figure out parent_node_id set parent_node_id [get_type_node_id $parent_type] - array set parent_node [site_node \ - [site_nodes::get_url_from_node_id \ - -node_id $parent_node_id] - ] + array set parent_node [get -node_id $parent_node_id] db_transaction { # Create the class directly using PL/SQL API set community_type_key [db_exec_plsql create_community_type {}] - # Create the node - set new_node_id [site_node_create \ - $parent_node_id \ - [ad_decode $url_part "" $community_type_key $url_part] \ + set package_id [site_node::new_with_package \ + -name [ad_decode $url_part "" $community_type_key $url_part] \ + -parent_id $parent_node_id \ + -package_key [one_community_type_package_key] \ + -instance_name $pretty_name \ + -context_id $parent_node(object_id) \ ] - # Instantiate the package - set package_id [site_node_create_package_instance \ - $new_node_id \ - $pretty_name \ - $parent_node(object_id) \ - [one_community_type_package_key] \ - ] - # Set some parameters parameter::set_value -package_id $package_id -parameter dotlrn_level_p -value 0 parameter::set_value -package_id $package_id -parameter community_type_level_p -value 1 @@ -231,15 +222,12 @@ set parent_node_id [get_community_node_id $parent_community_id] } - # Create the node - set new_node_id [site_node_create $parent_node_id $community_key] - - # Instantiate the package - set package_id [site_node_create_package_instance \ - $new_node_id \ - $pretty_name \ - $community_id \ - [one_community_package_key] \ + set package_id [site_node::new_with_package \ + -name $community_key \ + -parent_id $parent_node_id \ + -package_key [one_community_package_key] \ + -instance_name $pretty_name \ + -context_id $community_id \ ] # Set the right parameters @@ -329,28 +317,12 @@ This gets the relative URL for a package_id under a particular node_id } { if {[empty_string_p $current_node_id]} { - set current_node_id [site_node_id [ad_conn url]] + set current_node_id [site_node::get_node_id [ad_conn url]] } return [db_string select_node_url {} -default ""] } - ad_proc -public get_url_from_package_id { - {-package_id ""} - } { - This gets the relative URL for a package_id. - } { - return [util_memoize "dotlrn_community::get_url_from_package_id_not_cached -package_id $package_id"] - } - - ad_proc -private get_url_from_package_id_not_cached { - {-package_id ""} - } { - Memoizing helper - } { - return [db_string select_node_url {} -default ""] - } - ad_proc -public get_default_roles { {-community_id ""} } { @@ -999,9 +971,9 @@ under a dotlrn community, such as workflow panels, that cannot be passed their community_id. } { - set parent_pkg_id [site_nodes::get_parent_object_id -package_id $package_id] + array set parent_node [site_node::get_from_object_id -object_id $package_id] - return [get_community_id -package_id $parent_pkg_id] + return [get_community_id -package_id $parent_node(object_id)] } ad_proc -public get_parent_id { @@ -1192,15 +1164,15 @@ } { Get the URL for a community type } { - return [get_url_from_package_id -package_id [get_community_type_package_id $community_type]] + return [site_node::get_url_from_object_id -object_id [get_community_type_package_id $community_type]] } ad_proc -public get_community_url { community_id } { Get the URL for a community } { - return [get_url_from_package_id -package_id [get_package_id $community_id]] + return [site_node::get_url_from_object_id -object_id [get_package_id $community_id]] } ad_proc -public get_community_type_package_id { @@ -1243,14 +1215,15 @@ update the name for a community } { db_dml update_community_name {} + util_memoize_flush "dotlrn_community::get_community_name_not_cached $community_id" } ad_proc -public get_community_name { community_id } { get the name for a community } { - return [util_memoize "dotlrn_community::get_community_name_not_cached $community_id" 10] + return [util_memoize "dotlrn_community::get_community_name_not_cached $community_id"] } ad_proc -private get_community_name_not_cached { @@ -1391,8 +1364,7 @@ Helper proc for add_applet_to_community and clone, since they both need to set up the community <-> applet map } { - set applet_id [dotlrn_applet::get_applet_id_from_key \ - -applet_key $applet_key] + set applet_id [dotlrn_applet::get_applet_id_from_key -applet_key $applet_key] # auto activate for now set active_p t @@ -1586,15 +1558,12 @@ set parent_node_id [get_type_node_id $community_type] } - # Create the node - set new_node_id [site_node_create $parent_node_id $key] - - # Instantiate the package - set package_id [site_node_create_package_instance \ - $new_node_id \ - $pretty_name \ - $clone_id \ - [one_community_package_key] \ + set package_id [site_node::new_with_package \ + -name $key \ + -parent_id $parent_node_id \ + -package_key [one_community_package_key] \ + -instance_name $pretty_name \ + -context_id $clone_id \ ] # Set the right parameters Index: openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl,v diff -u -r1.59 -r1.60 --- openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 4 Jun 2002 00:02:30 -0000 1.59 +++ openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 22 Jun 2002 20:11:03 -0000 1.60 @@ -140,29 +140,22 @@ set parent_node_id [ad_decode $parent_node_id "" [get_node_id] $parent_node_id] db_transaction { - set node_id [db_string get_next_seq_val { - select acs_object_id_seq.nextval from dual - }] - array set parent_node [site_node \ - [site_nodes::get_url_from_node_id -node_id $parent_node_id] - ] + array set parent_node [site_node::get -node_id $parent_node_id] set parent_package_id $parent_node(object_id) ns_log notice "dotlrn::mount_package: [array get parent_node]" - set node_id [site_nodes::site_node_create \ - -parent_node_id $parent_node_id \ - -node_id $node_id \ - -name $url \ - -directory_p $directory_p] + if {[empty_string_p $pretty_name]} { + set pretty_name $package_key + } - if {[empty_string_p $pretty_name]} { - set pretty_name $package_key - } - - ns_log notice "dotlrn::mount_package: $node_id / $pretty_name / $parent_package_id / $package_key" - - set package_id [site_node_create_package_instance $node_id $pretty_name $parent_package_id $package_key] + set package_id [site_node::new_with_package \ + -name $url \ + -parent_id $parent_node_id \ + -package_key $package_key \ + -instance_name $pretty_name \ + -context_id $parent_package_id \ + ] } return $package_id @@ -178,10 +171,8 @@ db_transaction { # site node del package instance site_node_delete_package_instance \ - -package_id $package_id \ - -node_id [site_nodes::get_node_id_from_package_id \ - -package_id $package_id - ] + -package_id $package_id \ + -node_id [site_node::get_node_id_from_object_id -object_id $package_id] } } @@ -193,14 +184,14 @@ this should probably be done by querying the dotlrn_community_applets table directly, but we can do it through site_map:: too } { - set parent_node_id [site_nodes::get_node_id_from_package_id \ - -package_id [dotlrn_community::get_package_id $community_id] + set parent_node_id [site_node::get_node_id_from_object_id \ + -object_id [dotlrn_community::get_package_id $community_id] ] return [site_nodes::get_node_id_from_child_name \ - -parent_node_id $parent_node_id \ - -name $package_key] - + -parent_node_id $parent_node_id \ + -name $package_key \ + ] } ad_proc -public get_community_applet_package_id { @@ -210,10 +201,11 @@ like above but returns the package_id } { set node_id [get_community_applet_node_id \ - -community_id $community_id \ - -package_key $package_key + -community_id $community_id \ + -package_key $package_key ] - return [site_nodes::get_package_id_from_node_id -node_id $node_id] + + return [site_node::get_object_id -node_id $node_id] } ad_proc -public unmount_community_applet_package { @@ -237,14 +229,13 @@ ad_proc -public get_node_id {} { return the root node id for dotLRN } { - return [site_node_id [get_url]] + return [site_node::get_node_id -url [get_url]] } ad_proc -public get_package_id {} { return the package ID for dotLRN } { - array set node [site_node [get_url]] - return $node(object_id) + return [site_node::get_object_id -node_id [get_node_id]] } ad_proc -public get_users_rel_segment_id {} { @@ -330,13 +321,16 @@ # We only take the first node right now # FIXME: in case of multi-mounting, which is doubtful, but possible - # we have a proble here. + # we have a problem here. set parent_node_id [db_string select_node_id {}] - # Mount - # The context is the community_id - set new_node_id [site_node_create $parent_node_id $mount_point] - set new_package_id [site_node_create_package_instance $new_node_id $package_key $package_id $package_key] + set new_package_id [site_node::new_with_package \ + -name $mount_point \ + -parent_id $parent_node_id \ + -package_key $package_key \ + -instance_name $package_key \ + -context_id $package_id \ + ] # Return the newly created package_id return $new_package_id Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 24 May 2002 01:58:45 -0000 1.18 +++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 22 Jun 2002 20:11:03 -0000 1.19 @@ -24,52 +24,6 @@ namespace eval site_nodes { - ad_proc -public get_node_id_from_package_id { - {-package_id:required} - } { - get node_id of a package instance - } { - return [db_string get_node_id_from_package_id { - select node_id - from site_nodes - where object_id = :package_id - }] - } - - ad_proc -public get_package_id_from_node_id { - {-node_id:required} - } { - get package_id from a node id - } { - return [db_string get_package_id_from_node_id { - select object_id - from site_nodes - where node_id = :node_id - }] - } - - ad_proc -public get_url_from_package_id { - {-package_id:required} - } { - get node_id of a package instance - } { - return [db_string get_node_id_from_package_id { - select site_node.url(node_id) - from site_nodes - where object_id = :package_id - }] - } - - ad_proc -public get_url_from_node_id { - {-node_id:required} - } { - get url from node_id - } { - return [db_string get_url_from_node_id { - select site_node.url(:node_id) from dual - }] - } - ad_proc -public get_node_id_from_child_name { {-parent_node_id:required} {-name:required} @@ -79,43 +33,6 @@ and name = :name} -default ""] } - ad_proc -public get_node_id_from_url { - {-url:required} - {-parent_node_id ""} - } { - get node_id from url - } { - return [db_exec_plsql get_node_id_from_url { - begin - :1 := site_node.node_id(url => :url, parent_id => :parent_node_id); - end; - }] - } - - ad_proc -public get_parent_id { - {-node_id ""} - {-package_id ""} - } { - get the parent_id (a node_id) of this node_id - } { - if {![empty_string_p $node_id]} { - return [db_string select_parent_by_node_id {}] - } elseif {![empty_string_p $package_id]} { - return [db_string select_parent_by_package_id {}] - } else { - ns_log error "site_nodes::get_parent_id Bad params!" - ad_return_complaint 1 "site_nodes::get_parent_id Bad params! Tell your admin." - } - } - - ad_proc -public get_parent_object_id { - {-package_id ""} - } { - get the object_id (not node_id!) of the parent of this instance - } { - return [db_string select_parent_oid_by_package_id {} -default ""] - } - ad_proc -public get_parent_name { {-package_id ""} } { @@ -155,7 +72,6 @@ return [lindex $site_nodes_list [expr $index + 1]] } - ad_proc -public get_site_nodes_list_value_param { {-site_nodes_list:required} {-index:required} @@ -294,48 +210,6 @@ } } - ad_proc -public mount_count { - {-package_key:required} - } { - returns the number of times this package_key is mounted - } { - return [get_info -return count -package_key $package_key] - } - - ad_proc -public singleton_p { - {-package_key:required} - } { - is this package a singleton? - } { - if {[package_mount_count -package_key $package_key] == 1} { - return 1 - } - return 0 - } - - ad_proc -public site_node_create { - {-node_id ""} - {-parent_node_id:required} - {-name:required} - {-directory_p "t"} - } { - create a site node the real way (the site-node stuff needs a user_id) - } { - set node_id [db_exec_plsql create_node { - begin - :1 := site_node.new( - node_id => :node_id, - parent_id => :parent_node_id, - name => :name, - directory_p => :directory_p, - pattern_p => 't' - ); - end; - }] - - return $node_id - } - ad_proc -public get_child_package_id { {-parent_package_id ""} {-package_key:required} Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.xql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql 15 May 2002 22:13:57 -0000 1.11 +++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql 22 Jun 2002 20:11:03 -0000 1.12 @@ -14,32 +14,6 @@ - - - select parent_id - from site_nodes - where node_id = :node_id - - - - - - select parent_id - from site_nodes - where object_id = :package_id - - - - - - select object_id - from site_nodes - where node_id = (select parent_id - from site_nodes - where object_id = :package_id) - - - select sn1.object_id Index: openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl 24 May 2002 01:58:45 -0000 1.3 +++ openacs-4/packages/dotlrn-bm/tcl/dotlrn-bm-procs.tcl 22 Jun 2002 20:11:03 -0000 1.4 @@ -186,7 +186,7 @@ } { returns the URL for the dotlrn-bm package } { - return [site_nodes::get_url_from_package_id -package_id [get_package_id]] + return [site_node::get_url_from_object_id -object_id [get_package_id]] } } Index: openacs-4/packages/dotlrn-bm/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/www/Attic/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-bm/www/index.tcl 16 May 2002 04:34:51 -0000 1.1 +++ openacs-4/packages/dotlrn-bm/www/index.tcl 22 Jun 2002 20:11:03 -0000 1.2 @@ -22,7 +22,7 @@ set table_def { {send_date {Send Date} {bulk_mail_messages.send_date $order} {[util_AnsiDatetoPrettyDate $send_date]}} {from_addr From {bulk_mail_messages.from_addr $order} {$from_addr}} - {subject Subject {bulk_mail_messages.subject $order} {$subject}} + {subject Subject {bulk_mail_messages.subject $order} {$subject}} {sent_p {Sent?} {bulk_mail_messages.sent_p $order} {[ad_decode $sent_p t Yes No]}} } Index: openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl,v diff -u -r1.59 -r1.60 --- openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 21 Jun 2002 21:06:19 -0000 1.59 +++ openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 22 Jun 2002 20:11:03 -0000 1.60 @@ -123,9 +123,9 @@ # ** setup stuff ** # # automount calendar in this community - set node_id [site_nodes::get_node_id_from_url \ - -url [dotlrn_community::get_url_from_package_id \ - -package_id [dotlrn_community::get_package_id $community_id]]] + set node_id [site_node::get_node_id \ + -url [site_node::get_url_from_object_id -object_id [dotlrn_community::get_package_id $community_id]] \ + ] set package_id [dotlrn::mount_package \ -parent_node_id $node_id \ Index: openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl,v diff -u -r1.68 -r1.69 --- openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 21 Jun 2002 21:06:19 -0000 1.68 +++ openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 22 Jun 2002 20:11:03 -0000 1.69 @@ -59,10 +59,13 @@ Used for one-time init - must be repeatable! } { if {![dotlrn::is_package_mounted -package_key [package_key]]} { + set package_id [dotlrn::mount_package \ - -package_key [package_key] \ -url [package_key] \ - -directory_p t] + -package_key [package_key] \ + -pretty_name "User Folders" \ + -directory_p t \ + ] # create the root folder for this instance set folder_id [fs::new_root_folder \ @@ -71,9 +74,8 @@ -description "User Folders" \ ] - site_node_object_map::new \ - -object_id $folder_id \ - -node_id [site_nodes::get_node_id_from_package_id -package_id $package_id] + set node_id [site_node::get_node_id_from_object_id -object_id $package_id] + site_node_object_map::new -object_id $folder_id -node_id $node_id set party_id [acs_magic_object registered_users] permission::grant -party_id $party_id -object_id $folder_id -privilege read @@ -115,7 +117,7 @@ -description "${community_name}'s Files" \ ] - set node_id [site_nodes::get_node_id_from_package_id -package_id $package_id] + set node_id [site_node::get_node_id_from_object_id -object_id $package_id] site_node_object_map::new -object_id $folder_id -node_id $node_id set party_id [acs_magic_object registered_users] @@ -252,7 +254,7 @@ -parent_id $root_folder_id \ ] - set node_id [site_nodes::get_node_id_from_package_id -package_id $package_id] + set node_id [site_node::get_node_id_from_object_id -object_id $package_id] if {[empty_string_p $user_root_folder_id]} { @@ -469,7 +471,7 @@ -description "${community_name}'s Files" \ ] - set node_id [site_nodes::get_node_id_from_package_id -package_id $package_id] + set node_id [site_node::get_node_id_from_object_id -object_id $package_id] site_node_object_map::new -object_id $folder_id -node_id $node_id set party_id [acs_magic_object registered_users] @@ -681,7 +683,7 @@ } { returns the URL for the dotlrn-fs package } { - return [site_nodes::get_url_from_package_id -package_id [get_package_id]] + return [site_node::get_url_from_object_id -object_id [get_package_id]] } ad_proc -private get_public_folder_id { Index: openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl 29 Mar 2002 19:25:19 -0000 1.2 +++ openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl 22 Jun 2002 20:11:03 -0000 1.3 @@ -36,11 +36,15 @@ set package_id [lindex $list_of_package_ids 0] -db_multirow faqs select_faqs "select f.faq_id, -f.faq_name from -faqs f, acs_objects o -where faq_id= object_id and context_id = :package_id" +db_multirow faqs select_faqs { + select f.faq_id, + f.faq_name + from faqs f, + acs_objects o + where f.faq_id = o.object_id + and o.context_id = :package_id +} -set url [dotlrn_community::get_url_from_package_id -package_id $package_id] +set url [site_node::get_url_from_object_id -object_id $package_id] ad_return_template Index: openacs-4/packages/forums-portlet/www/forums-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/www/forums-admin-portlet.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums-portlet/www/forums-admin-portlet.tcl 5 Jun 2002 19:14:19 -0000 1.2 +++ openacs-4/packages/forums-portlet/www/forums-admin-portlet.tcl 22 Jun 2002 20:11:03 -0000 1.3 @@ -40,7 +40,7 @@ where package_id = :package_id } -set url [dotlrn_community::get_url_from_package_id -package_id $package_id] +set url [site_node::get_url_from_object_id -object_id $package_id] set package_id [ad_conn package_id] set default_name [db_string select_package_name { Index: openacs-4/packages/news-portlet/www/news-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-admin-portlet.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/news-portlet/www/news-admin-portlet.tcl 12 May 2002 18:15:04 -0000 1.4 +++ openacs-4/packages/news-portlet/www/news-admin-portlet.tcl 22 Jun 2002 20:11:03 -0000 1.5 @@ -36,6 +36,6 @@ set package_id [lindex $list_of_package_ids 0] -set url [dotlrn_community::get_url_from_package_id -package_id $package_id] +set url [site_node::get_url_from_object_id -object_id $package_id] ad_return_template