Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/directory/tcl/directory-procs-oracle.xql'.
Fisheye: No comparison available.  Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/directory/tcl/directory-procs-postgresql.xql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/directory/tcl/directory-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/directory/tcl/directory-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/directory/tcl/directory-procs.tcl	5 Nov 2016 17:15:58 -0000	1.6
+++ openacs-4/packages/directory/tcl/directory-procs.tcl	22 Oct 2018 08:32:17 -0000	1.7
@@ -94,31 +94,17 @@
 
 ad_proc dir_app_group_info {} {
 
-    Return a list containing the group_id (lindex 0) and group_name (lindex 1) of the application group associated with the subsite that the current directory package is mounted under.  
-    The directory package does not need to be mounted directly under the subsite; it will find the closest instance of subsite than is an ancestor of the package.
+    Return a list containing the group_id (lindex 0) and group_name
+    (lindex 1) of the application group associated with the subsite
+    that the current directory package is mounted under.  The
+    directory package does not need to be mounted directly under the
+    subsite; it will find the closest instance of subsite than is an
+    ancestor of the package.
 
 } {
     
-    set package_id [ad_conn package_id]
-    db_1row n_id {
-        select node_id from site_nodes
-        where object_id = :package_id
-    }
+    set subsite_id [ad_conn subsite_id]
     
-    # find the closest subsite to the current package on the site_nodes tree
-    # the inner query is guaranteed to always return at least 1 row, 
-    # because the Main Site subsite is mounted at /
-    db_1row subsite_p_1 {
-        select * from (
-          select object_id as subsite_id
-            from site_nodes n
-           where (select package_key from apm_packages p where p.package_id = n.object_id) = 'acs-subsite' 
-         connect by node_id = prior parent_id 
-           start with node_id = :node_id 
-           order by level
-        ) where rownum = 1
-    }
-    
     db_1row g_i {
       select g.group_id, g.group_name
         from groups g, application_groups a
@@ -131,31 +117,16 @@
 
 ad_proc dir_subsite_info {} {
 
-    Return a list containing the subsite_id (lindex 0) and subsite_name (lindex 1) of the subsite that the current directory package is mounted under.  
-    The directory package does not need to be mounted directly under the subsite; it will find the closest instance of subsite than is an ancestor of the package.
+    Return a list containing the subsite_id (lindex 0) and
+    subsite_name (lindex 1) of the subsite that the current directory
+    package is mounted under.  The directory package does not need to
+    be mounted directly under the subsite; it will find the closest
+    instance of subsite than is an ancestor of the package.
 
 } {
+    set subsite_id [ad_conn subsite_id]
+    set subsite_name [subsite::get_element -subsite_id $subsite_id -element $instance_name]
     
-    set package_id [ad_conn package_id]
-    db_1row n_id {
-        select node_id from site_nodes
-        where object_id = :package_id
-    }
-    
-    # find the closest subsite to the current package on the site_nodes tree
-    # the inner query is guaranteed to always return at least 1 row, 
-    # because the Main Site subsite is mounted at /
-    db_1row subsite_p_2 {
-        select * from (
-          select object_id as subsite_id, acs_object.name(object_id) as subsite_name
-            from site_nodes n
-           where (select package_key from apm_packages p where p.package_id = n.object_id) = 'acs-subsite' 
-         connect by node_id = prior parent_id 
-           start with node_id = :node_id 
-           order by level
-        ) where rownum = 1
-    }
-    
     return [list $subsite_id $subsite_name]
 }