Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/upgrade/upgrade-4.6-4.6.1.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml	10 Aug 2002 19:34:42 -0000	1.4
+++ openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml	26 Feb 2003 02:21:40 -0000	1.4.2.1
@@ -318,12 +318,6 @@
 </row>
 
 <row>
-<entry valign="top"><computeroutput>[ad_conn xml_loaded_p]</computeroutput> </entry>
-<entry valign="top">Checks whether the XML parser is loaded so that it only gets loaded once.
-Set in apm_load_xml_packages</entry>
-</row>
-
-<row>
 <entry spanname="hspan"> </entry>
 </row>
 
Index: openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql,v
diff -u -r1.1.4.2 -r1.1.4.3
--- openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql	15 Feb 2003 20:56:27 -0000	1.1.4.2
+++ openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql	26 Feb 2003 02:22:14 -0000	1.1.4.3
@@ -352,22 +352,23 @@
     p_rel_type in acs_rels.rel_type%TYPE
   )
   is
-    v_segment_id rel_segments.segment_id%TYPE;
   begin
 
     add_one(p_party_id, p_member_id);
 
     -- if the relation type is mapped to a relational segment map that too
 
-    select segment_id into v_segment_id
-    from rel_segments s
-    where s.rel_type = p_rel_type
-      and s.group_id = p_party_id;
+    for v_segments in (select segment_id
+                       from rel_segments
+                       where group_id = p_party_id
+                         and rel_type in (select object_type
+                                          from acs_object_types
+                                          start with object_type = p_rel_type
+                                          connect by prior supertype = object_type))
+    loop
+      add_one(v_segments.segment_id, p_member_id);
+    end loop;
 
-    exception when no_data_found then return;
-
-    add_one(v_segment_id, p_member_id);
-
   end add;
 
   procedure remove_one (
@@ -395,22 +396,23 @@
     p_rel_type in acs_rels.rel_type%TYPE
   )
   is
-    v_segment_id rel_segments.segment_id%TYPE;
   begin
 
     remove_one(p_party_id, p_member_id);
 
     -- if the relation type is mapped to a relational segment unmap that too
 
-    select segment_id into v_segment_id
-    from rel_segments s
-    where s.rel_type = p_rel_type
-      and s.group_id = p_party_id;
+    for v_segments in (select segment_id
+                       from rel_segments
+                       where group_id = p_party_id
+                         and rel_type in (select object_type
+                                          from acs_object_types
+                                          start with object_type = p_rel_type
+                                          connect by prior supertype = object_type))
+    loop
+      remove_one(v_segments.segment_id, p_member_id);
+    end loop;
 
-    exception when no_data_found then return;
-
-    remove_one(v_segment_id, p_member_id);
-
   end remove;
 
 end party_approved_member;
Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-4.6-4.6.1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/Attic/upgrade-4.6-4.6.1.sql,v
diff -u -r1.1.2.8 -r1.1.2.9
--- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-4.6-4.6.1.sql	19 Feb 2003 21:54:38 -0000	1.1.2.8
+++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-4.6-4.6.1.sql	26 Feb 2003 02:22:49 -0000	1.1.2.9
@@ -667,6 +667,10 @@
 set object_id = -4
 where object_id = 0;
 
+update acs_objects
+set context_id = -4
+where context_id = 0;
+
 -- Content Repository sets parent_id to security_context_root
 -- for content modules
 
@@ -1030,22 +1034,23 @@
     p_rel_type in acs_rels.rel_type%TYPE
   )
   is
-    v_segment_id rel_segments.segment_id%TYPE;
   begin
 
     add_one(p_party_id, p_member_id);
 
     -- if the relation type is mapped to a relational segment map that too
 
-    select segment_id into v_segment_id
-    from rel_segments s
-    where s.rel_type = p_rel_type
-      and s.group_id = p_party_id;
+    for v_segments in (select segment_id
+                       from rel_segments
+                       where group_id = p_party_id
+                         and rel_type in (select object_type
+                                          from acs_object_types
+                                          start with object_type = p_rel_type
+                                          connect by prior supertype = object_type))
+    loop
+      add_one(v_segments.segment_id, p_member_id);
+    end loop;
 
-    exception when no_data_found then return;
-
-    add_one(v_segment_id, p_member_id);
-
   end add;
 
   procedure remove_one (
@@ -1073,22 +1078,23 @@
     p_rel_type in acs_rels.rel_type%TYPE
   )
   is
-    v_segment_id rel_segments.segment_id%TYPE;
   begin
 
     remove_one(p_party_id, p_member_id);
 
     -- if the relation type is mapped to a relational segment unmap that too
 
-    select segment_id into v_segment_id
-    from rel_segments s
-    where s.rel_type = p_rel_type
-      and s.group_id = p_party_id;
+    for v_segments in (select segment_id
+                       from rel_segments
+                       where group_id = p_party_id
+                         and rel_type in (select object_type
+                                          from acs_object_types
+                                          start with object_type = p_rel_type
+                                          connect by prior supertype = object_type))
+    loop
+      remove_one(v_segments.segment_id, p_member_id);
+    end loop;
 
-    exception when no_data_found then return;
-
-    remove_one(v_segment_id, p_member_id);
-
   end remove;
 
 end party_approved_member;
Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql,v
diff -u -r1.3.4.3 -r1.3.4.4
--- openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql	16 Feb 2003 02:17:06 -0000	1.3.4.3
+++ openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql	26 Feb 2003 02:23:24 -0000	1.3.4.4
@@ -200,19 +200,23 @@
   p_member_id alias for $2;
   p_rel_id alias for $3;
   p_rel_type alias for $4;
-  v_segment_id rel_segments.segment_id%TYPE;
+  v_segments record;
 begin
 
   perform party_approved_member__add_one(p_party_id, p_member_id, p_rel_id);
 
-  select into v_segment_id segment_id
-  from rel_segments s
-  where s.rel_type = p_rel_type
-    and s.group_id = p_party_id;
+  -- if the relation type is mapped to relational segments unmap them too
 
-  if found then
-    perform party_approved_member__add_one(v_segment_id, p_member_id, p_rel_id);
-  end if;
+  for v_segments in select segment_id
+                  from rel_segments s, acs_object_types o1, acs_object_types o2
+                  where 
+                    o1.object_type = p_rel_type
+                    and o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey)
+                    and s.rel_type = o2.object_type
+                    and s.group_id = p_party_id
+  loop
+    perform party_approved_member__add_one(v_segments.segment_id, p_member_id, p_rel_id);
+  end loop;
 
   return 1;
 
@@ -241,22 +245,24 @@
   p_member_id alias for $2;
   p_rel_id alias for $3;
   p_rel_type alias for $4;
-  v_segment_id rel_segments.segment_id%TYPE;
+  v_segments record;
 begin
 
   perform party_approved_member__remove_one(p_party_id, p_member_id, p_rel_id);
 
-  -- if the relation type is mapped to a relational segment unmap that too
+  -- if the relation type is mapped to relational segments unmap them too
 
-  select into v_segment_id segment_id
-  from rel_segments s
-  where s.rel_type = p_rel_type
-    and s.group_id = p_party_id;
+  for v_segments in select segment_id
+                  from rel_segments s, acs_object_types o1, acs_object_types o2
+                  where 
+                    o1.object_type = p_rel_type
+                    and o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey)
+                    and s.rel_type = o2.object_type
+                    and s.group_id = p_party_id
+  loop
+    perform party_approved_member__remove_one(v_segments.segment_id, p_member_id, p_rel_id);
+  end loop;
 
-  if found then
-    perform party_approved_member__remove_one(v_segment_id, p_member_id, p_rel_id);
-  end if;
-
   return 1;
 
 end;' language 'plpgsql';
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6-4.6.1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/Attic/upgrade-4.6-4.6.1.sql,v
diff -u -r1.1.2.5 -r1.1.2.6
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6-4.6.1.sql	16 Feb 2003 02:17:34 -0000	1.1.2.5
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6-4.6.1.sql	26 Feb 2003 02:24:03 -0000	1.1.2.6
@@ -215,6 +215,10 @@
 set object_id = -4
 where object_id = 0;
 
+update acs_objects
+set context_id = -4
+where context_id = 0;
+
 -- Content Repository sets parent_id to security_context_root
 -- for content modules
 
@@ -386,19 +390,23 @@
   p_member_id alias for $2;
   p_rel_id alias for $3;
   p_rel_type alias for $4;
-  v_segment_id rel_segments.segment_id%TYPE;
+  v_segments record;
 begin
 
   perform party_approved_member__add_one(p_party_id, p_member_id, p_rel_id);
 
-  select into v_segment_id segment_id
-  from rel_segments s
-  where s.rel_type = p_rel_type
-    and s.group_id = p_party_id;
+  -- if the relation type is mapped to relational segments unmap them too
 
-  if found then
-    perform party_approved_member__add_one(v_segment_id, p_member_id, p_rel_id);
-  end if;
+  for v_segments in select segment_id
+                  from rel_segments s, acs_object_types o1, acs_object_types o2
+                  where 
+                    o1.object_type = p_rel_type
+                    and o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey)
+                    and s.rel_type = o2.object_type
+                    and s.group_id = p_party_id
+  loop
+    perform party_approved_member__add_one(v_segments.segment_id, p_member_id, p_rel_id);
+  end loop;
 
   return 1;
 
@@ -420,34 +428,34 @@
 
 end;' language 'plpgsql';
 
-
 create or replace function party_approved_member__remove(integer, integer, integer, varchar) returns integer as '
 declare
   p_party_id alias for $1;
   p_member_id alias for $2;
   p_rel_id alias for $3;
   p_rel_type alias for $4;
-  v_segment_id rel_segments.segment_id%TYPE;
+  v_segments record;
 begin
 
   perform party_approved_member__remove_one(p_party_id, p_member_id, p_rel_id);
 
-  -- if the relation type is mapped to a relational segment unmap that too
+  -- if the relation type is mapped to relational segments unmap them too
 
-  select into v_segment_id segment_id
-  from rel_segments s
-  where s.rel_type = p_rel_type
-    and s.group_id = p_party_id;
+  for v_segments in select segment_id
+                  from rel_segments s, acs_object_types o1, acs_object_types o2
+                  where 
+                    o1.object_type = p_rel_type
+                    and o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey)
+                    and s.rel_type = o2.object_type
+                    and s.group_id = p_party_id
+  loop
+    perform party_approved_member__remove_one(v_segments.segment_id, p_member_id, p_rel_id);
+  end loop;
 
-  if found then
-    perform party_approved_member__remove_one(v_segment_id, p_member_id, p_rel_id);
-  end if;
-
   return 1;
 
 end;' language 'plpgsql';
 
-
 -- Triggers to maintain party_approved_member_map when parties are created or
 -- destroyed.
 
Index: openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-drop.sql,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-drop.sql	1 Sep 2001 20:22:57 -0000	1.1
+++ openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-drop.sql	26 Feb 2003 02:24:33 -0000	1.1.4.1
@@ -3,7 +3,7 @@
 drop function acs_sc_binding__delete(integer,integer);
 drop function acs_sc_binding__new(integer,integer);
 drop function acs_sc_binding__new(varchar,varchar);
-drop function acs_sc_impl_alias__delete(varchar,varchar);
+drop function acs_sc_impl_alias__delete(varchar,varchar,varchar);
 drop function acs_sc_impl_alias__new(varchar,varchar,varchar,varchar,varchar);
 drop function acs_sc_impl__delete(varchar,varchar);
 drop  function acs_sc_impl__get_name(integer);
Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-oracle.tcl,v
diff -u -r1.17.2.1 -r1.17.2.2
--- openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl	5 Feb 2003 23:24:43 -0000	1.17.2.1
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl	26 Feb 2003 02:25:00 -0000	1.17.2.2
@@ -56,18 +56,13 @@
 } {
     set start_time [clock clicks]
 
-    db_qd_log QDDebug "PRE-QD: the SQL is $pre_sql for $statement_name"
-
-    # Query Dispatcher (OpenACS - ben)
     set sql [db_qd_replace_sql $statement_name $pre_sql]
 
     # insert tcl variable values (Openacs - Dan)
     if {![string equal $sql $pre_sql]} {
         set sql [uplevel $ulevel [list subst -nobackslashes $sql]]
     }
 
-    db_qd_log QDDebug "POST-QD: the SQL is $sql"
-
     set errno [catch {
 	upvar bind bind
 	if { [info exists bind] && [llength $bind] != 0 } {
@@ -188,8 +183,6 @@
 } {
     set start_time [clock clicks]
 
-    db_qd_log QDDebug "PRE-QD: the SQL is $pre_sql for $statement_name"
-
     # Query Dispatcher (OpenACS - ben)
     set sql [db_qd_replace_sql $statement_name $pre_sql]
 
@@ -205,14 +198,12 @@
         set file_storage_p 1
         set original_type $type
         set qtype 1row
-        ns_log Notice "db_exec_lob: file storage in use"
+        ns_log Debug "db_exec_lob: file storage in use"
     } else {
         set qtype $type
-        ns_log Notice "db_exec_lob: blob storage in use"
+        ns_log Debug "db_exec_lob: blob storage in use"
     }
 
-    db_qd_log QDDebug "POST-QD: the SQL is $sql"
-
     set errno [catch {
 	upvar bind bind
 	if { [info exists bind] && [llength $bind] != 0 } {
Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-postgresql.tcl,v
diff -u -r1.35.2.4 -r1.35.2.5
--- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl	8 Feb 2003 16:45:10 -0000	1.35.2.4
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl	26 Feb 2003 02:25:00 -0000	1.35.2.5
@@ -55,14 +55,14 @@
 	# if a table is being created, we need to bypass things, too (OpenACS - Ben).
         set test_sql [db_qd_replace_sql $full_statement_name $sql]
         if {[regexp -nocase -- {^\s*select} $test_sql match]} {
-            db_qd_log QDDebug "PLPGSQL: bypassed anon function"
+            ns_log Debug "PLPGSQL: bypassed anon function"
             set selection [db_exec 0or1row $db $full_statement_name $sql]
         } elseif {[regexp -nocase -- {^\s*create table} $test_sql match] || [regexp -nocase -- {^\s*drop table} $test_sql match]} {
-            db_qd_log QDDebug "PLPGSQL: bypassed anon function -- create/drop table"
+            ns_log Debug "PLPGSQL: bypassed anon function -- create/drop table"
             set selection [db_exec dml $db $full_statement_name $sql]
 	    return ""
 	} else {
-            db_qd_log QDDebug "PLPGSQL: using anonymous function"
+            ns_log Debug "PLPGSQL: using anonymous function"
             set selection [db_exec_plpgsql $db $full_statement_name $sql \
                            $statement_name]
         }
@@ -89,13 +89,8 @@
 } {
     set start_time [clock clicks]
 
-    db_qd_log QDDebug "PRE-QD: the SQL is $pre_sql"
-
-    # Query Dispatcher (OpenACS - ben)
     set sql [db_qd_replace_sql $statement_name $pre_sql]
 
-    db_qd_log QDDebug "POST-QD: the SQL is $sql"
-
     set unique_id [db_nextval "anon_func_seq"]
 
     set function_name "__exec_${unique_id}_${fname}"
@@ -104,7 +99,7 @@
     if {![string equal $sql $pre_sql]} {
         set sql [uplevel 2 [list subst -nobackslashes $sql]]
     }
-    db_qd_log QDDebug "PLPGSQL: converted: $sql to: select $function_name ()"
+    ns_log Debug "PLPGSQL: converted: $sql to: select $function_name ()"
 
     # create a function definition statement for the inline code 
     # binding is emulated in tcl. (OpenACS - Dan)
@@ -221,8 +216,6 @@
 } {
     set start_time [clock clicks]
 
-    db_qd_log QDDebug "PRE-QD: the SQL is $pre_sql for $statement_name"
-
     # Query Dispatcher (OpenACS - ben)
     set sql [db_qd_replace_sql $statement_name $pre_sql]
 
@@ -231,8 +224,6 @@
         set sql [uplevel $ulevel [list subst -nobackslashes $sql]]
     }
 
-    db_qd_log QDDebug "POST-QD: the SQL is $sql"
-
     set errno [catch {
 	upvar bind bind
 	if { [info exists bind] && [llength $bind] != 0 } {
Index: openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl,v
diff -u -r1.4 -r1.4.4.1
--- openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl	10 Feb 2002 22:11:31 -0000	1.4
+++ openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl	26 Feb 2003 02:25:00 -0000	1.4.4.1
@@ -145,12 +145,12 @@
 
 # Get Node Attribute
 proc xml_node_get_attribute {node_id attribute_name} {
-    return [ns_xml node getattr $node_id $attribute_name]
+    return [ns_xml node get attr $node_id $attribute_name]
 }
 
 # Get Content
 proc xml_node_get_content {node_id} {
-    return [ns_xml node getcontent $node_id]
+    return [ns_xml node get content $node_id]
 }
 
 ##
Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl,v
diff -u -r1.11 -r1.11.2.1
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl	14 Sep 2002 13:23:05 -0000	1.11
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl	26 Feb 2003 02:25:00 -0000	1.11.2.1
@@ -9,26 +9,6 @@
     @cvs-id $Id$
 } 
 
-ad_proc -private apm_load_xml_packages {} {
-
-    Loads XML packages into the running interpreter, if they're not
-    already there. We need to load these packages once per connection,
-    since AOLserver doesn't seem to deal with packages very well.
-
-} {
-    global ad_conn
-    if { ![info exists ad_conn(xml_loaded_p)] } {
-	# ns_xml needs to be loaded
-
-#  	foreach file [glob "[acs_package_root_dir acs-tcl]/tcl/xml-*-procs.tcl"] {
-#  	    apm_source $file
-#  	}
-	set ad_conn(xml_loaded_p) 1
-    }
-
-#    package require xml 1.9
-}
-
 ad_proc -private apm_required_attribute_value { element attribute } {
 
     Returns an attribute of an XML element, throwing an error if the attribute
@@ -37,7 +17,7 @@
 } {
     set value [apm_attribute_value $element $attribute]
     if { [empty_string_p $value] } {
-	error "Required attribute \"$attribute\" missing from <[dom::node cget $element -nodeName]>"
+	error "Required attribute \"$attribute\" missing from <[ns_xml node get name $element]>"
     }
     return $value
 }
@@ -51,8 +31,7 @@
     Parses the XML element to return the value for the specified attribute.
 
 } {
-    # set value [dom::element getAttribute $element $attribute]
-    set value [ns_xml node getattr $element $attribute]
+    set value [ns_xml node get attr $element $attribute]
 
     if { [empty_string_p $value] } {
 	return $default
@@ -69,18 +48,16 @@
 } {
     Parses the XML element and returns the associated property name if it exists.
 } {
-    # set node [lindex [dom::element getElementsByTagName $root $property_name] 0]
     set node [lindex [xml_node_get_children_by_name $root $property_name] 0]
 
     if { ![empty_string_p $node] } {
-	# return [dom::node cget [dom::node cget $node -firstChild] -nodeValue]
         set child [lindex [ns_xml node children $node] 0]
 
         # JCD 20020914 ns_xml when given something like <pretty-name></pretty-name> (i.e. empty content)
         # will have the node but the node will not have a child node and the 
         # getcontent will then fail.
         if { ![empty_string_p $child] } {
-            return [ns_xml node getcontent $child]
+            return [ns_xml node get content $child]
         }
     }    
     return $default
@@ -286,8 +263,6 @@
     set properties(path) $path
     set properties(mtime) $mtime
 
-    apm_load_xml_packages
-
     apm_log APMDebug "Reading specification file at $path"
 
     set file [open $path]
@@ -296,14 +271,11 @@
 
     set xml_data [xml_prepare_data $xml_data]
 
-    # set tree [dom::DOMImplementation parse $xml_data]
     set tree [xml_parse $xml_data]
-    # set package [dom::node cget $tree -firstChild]
     set root_node [xml_doc_get_first_node_by_name $tree package]
     apm_log APMDebug "XML: root node is [ns_xml node name $root_node]"
     set package $root_node
 
-    # set root_name [dom::node cget $package -nodeName]
     set root_name [xml_node_get_name $package]
 
     # Debugging Children
@@ -327,7 +299,6 @@
     set properties(pretty-plural) [apm_tag_value -default "$properties(package-name)s" $package pretty-plural]
 
 
-    # set versions [dom::element getElementsByTagName $package version]
     set versions [xml_node_get_children_by_name $package version]
 
     if { [llength $versions] != 1 } {
@@ -354,10 +325,8 @@
 	vendor url
 	description format
     } {
-	# set node [lindex [dom::element getElementsByTagName $version $property_name] 0]
 	set node [lindex [xml_node_get_children_by_name $version $property_name] 0]
 	if { ![empty_string_p $node] } {
-	    # set properties($property_name.$attribute_name) [dom::element getAttribute $node $attribute_name]
 	    set properties($property_name.$attribute_name) [apm_attribute_value $node $attribute_name]
 	} else {
 	    set properties($property_name.$attribute_name) ""
@@ -375,7 +344,6 @@
     set properties(requires) [list]
 
     foreach dependency_type { provides requires } {
-	# set dependency_types [dom::element getElementsByTagName $version $dependency_type]
 	set dependency_types [xml_node_get_children_by_name $version $dependency_type]
 
 	foreach node $dependency_types {
@@ -403,18 +371,14 @@
 
     set properties(files) [list]
 
-    # set nodes [dom::element getElementsByTagName $version "files"]
     set files [xml_node_get_children_by_name $version files]
 
     foreach node $files {
-	# set file_nodes [dom::element getElementsByTagName $node "file"]
 	set file_nodes [xml_node_get_children_by_name $node file]
 	
 	foreach file_node $file_nodes {
 	    set file_path [apm_required_attribute_value $file_node path]
-	    # set type [dom::element getAttribute $file_node type]
 	    set type [apm_attribute_value $file_node type]
-	    # set db_type [dom::element getAttribute $file_node db_type]
 	    set db_type [apm_attribute_value $file_node db_type]
 	    # Validate the file type: it must be null (unknown type) or
 	    # some value in [apm_file_type_keys].
@@ -434,13 +398,10 @@
 
     set properties(owners) [list]
 
-    # set owners [dom::element getElementsByTagName $version "owner"]
     set owners [xml_node_get_children_by_name $version owner]
 
     foreach node $owners {
-	# set url [dom::element getAttribute $node url]
 	set url [apm_attribute_value $node url]
-	# set name [dom::node cget [dom::node cget $node -firstChild] -nodeValue]
 	set name [xml_node_get_content [lindex [xml_node_get_children $node] 0]]
 	lappend properties(owners) [list $name $url]
     }
@@ -450,27 +411,18 @@
     set properties(parameters) [list]
     apm_log APMDebug "APM: Reading Parameters"
 
-    # set parameters [dom::element getElementsByTagName $version "parameters"]
     set parameters [xml_node_get_children_by_name $version parameters]
 
     foreach node $parameters {
-	# set parameter_nodes [dom::element getElementsByTagName $node "parameter"]
 	set parameter_nodes [xml_node_get_children_by_name $node parameter]
 
 	foreach parameter_node $parameter_nodes {	  
-	    # set default_value [dom::element getAttribute $parameter_node default]
 	    set default_value [apm_attribute_value $parameter_node default]
-	    # set min_n_values [dom::element getAttribute $parameter_node min_n_values]
 	    set min_n_values [apm_attribute_value $parameter_node min_n_values]
-	    # set max_n_values [dom::element getAttribute $parameter_node max_n_values]
 	    set max_n_values [apm_attribute_value $parameter_node max_n_values]
-	    # set description [dom::element getAttribute $parameter_node description]
 	    set description [apm_attribute_value $parameter_node description]
-	    # set section_name [dom::element getAttribute $parameter_node section_name]
 	    set section_name [apm_attribute_value $parameter_node section_name]
-	    # set datatype [dom::element getAttribute $parameter_node datatype]
 	    set datatype [apm_attribute_value $parameter_node datatype]
-	    # set name [dom::element getAttribute $parameter_node name]
 	    set name [apm_attribute_value $parameter_node name]
 
 	    apm_log APMDebug "APM: Reading parameter $name with default $default_value"
Index: openacs-4/packages/notifications/notifications.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/notifications.info,v
diff -u -r1.11.2.7 -r1.11.2.8
--- openacs-4/packages/notifications/notifications.info	1 Feb 2003 00:14:04 -0000	1.11.2.7
+++ openacs-4/packages/notifications/notifications.info	26 Feb 2003 02:26:02 -0000	1.11.2.8
@@ -7,7 +7,7 @@
     <initial-install-p>f</initial-install-p>
     <singleton-p>t</singleton-p>
 
-    <version name="0.4d" url="http://openacs.org/repository/download/apm/notifications-0.4d.apm">
+    <version name="4.6.1" url="http://openacs.org/repository/download/apm/notifications-4.6.1.apm">
     <database-support>
         <database>oracle</database>
         <database>postgresql</database>
@@ -35,6 +35,7 @@
             <file type="data_model_upgrade" db_type="oracle" path="sql/oracle/upgrade/upgrade-0.1d-0.2d.sql"/>
             <file type="data_model_upgrade" db_type="oracle" path="sql/oracle/upgrade/upgrade-0.2d-0.3d.sql"/>
             <file type="data_model_upgrade" db_type="oracle" path="sql/oracle/upgrade/upgrade-0.3d-0.4d.sql"/>
+            <file type="data_model_upgrade" db_type="oracle" path="sql/oracle/upgrade/upgrade-0.4d-4.6.1.sql"/>
             <file type="data_model" db_type="postgresql" path="sql/postgresql/delivery-method-sc-create.sql"/>
             <file type="data_model" db_type="postgresql" path="sql/postgresql/email-sc-impl-create.sql"/>
             <file type="data_model" db_type="postgresql" path="sql/postgresql/notification-type-sc-create.sql"/>
@@ -50,6 +51,7 @@
             <file type="data_model_upgrade" db_type="postgresql" path="sql/postgresql/upgrade/upgrade-0.1d-0.2d.sql"/>
             <file type="data_model_upgrade" db_type="postgresql" path="sql/postgresql/upgrade/upgrade-0.2d-0.3d.sql"/>
             <file type="data_model_upgrade" db_type="postgresql" path="sql/postgresql/upgrade/upgrade-0.3d-0.4d.sql"/>
+            <file type="data_model_upgrade" db_type="postgresql" path="sql/postgresql/upgrade/upgrade-0.4d-4.6.1.sql"/>
             <file type="tcl_procs" path="tcl/delivery-method-procs.tcl"/>
             <file type="query_file" path="tcl/delivery-method-procs.xql"/>
             <file type="tcl_procs" path="tcl/interval-procs.tcl"/>
@@ -84,6 +86,7 @@
             <file type="content_page" path="www/manage.adp"/>
             <file type="content_page" path="www/manage.tcl"/>
             <file type="content_page" path="www/object-goto.tcl"/>
+            <file type="query_file" path="www/object-goto.xql"/>
             <file type="query_file" db_type="oracle" path="www/request-change-frequency-oracle.xql"/>
             <file type="query_file" db_type="postgresql" path="www/request-change-frequency-postgresql.xql"/>
             <file type="content_page" path="www/request-change-frequency.adp"/>
@@ -93,13 +96,15 @@
             <file type="content_page" path="www/request-new-2.tcl"/>
             <file type="content_page" path="www/request-new.adp"/>
             <file type="content_page" path="www/request-new.tcl"/>
+            <file type="content_page" path="www/test-cleanup.tcl"/>
+            <file type="content_page" path="www/test.adp"/>
             <file type="content_page" path="www/test.tcl"/>
         </files>
         <parameters>
-            <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueueScanP" default="0" description="Should the package scan the qmail queue for incoming mail? (1 is true, 0 is false)" section_name="email"/>
-            <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueue"  description="The location of the qmail queue for incoming email" section_name="email"/>
-            <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailReplyAddressPrefix"  default="notification" description="The prefix for email replies" section_name="email"/>
             <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailDomain"  description="The domain for the notification email address" section_name="email"/>
+            <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailReplyAddressPrefix"  default="notification" description="The prefix for email replies" section_name="email"/>
+            <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueue"  description="The location of the qmail queue for incoming email" section_name="email"/>
+            <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueueScanP"  default="0" description="Should the package scan the qmail queue for incoming mail? (1 is true, 0 is false)" section_name="email"/>
         </parameters>
 
     </version>
Index: openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql,v
diff -u -r1.6 -r1.6.2.1
--- openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql	19 Aug 2002 20:37:15 -0000	1.6
+++ openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql	26 Feb 2003 02:26:42 -0000	1.6.2.1
@@ -288,7 +288,14 @@
    )
    is
    begin
-      acs_object.delete(request_id);
+     for v_notifications in (select notification_id
+                             from notifications n, notification_requests nr
+                             where n.response_id = nr.object_id
+                               and nr.request_id = request_id)
+     loop
+      acs_object.delete(v_notifications.notification_id);
+     end loop;
+     acs_object.delete(request_id);
    end delete;
 
    procedure delete_all (
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-0.4d-4.6.1.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql,v
diff -u -r1.8.2.1 -r1.8.2.2
--- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql	21 Jan 2003 13:51:40 -0000	1.8.2.1
+++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql	26 Feb 2003 02:27:58 -0000	1.8.2.2
@@ -186,11 +186,20 @@
 
 select define_function_args ('notification_request__delete','request_id');
 
-create function notification_request__delete(integer)
+create or replace function notification_request__delete(integer)
 returns integer as '
 declare
     p_request_id                    alias for $1;
+    v_notifications record;
 begin
+    for v_notifications in select notification_id
+                           from notifications n, notification_requests nr
+                           where n.response_id = nr.object_id
+                             and nr.request_id = p_request_id
+    loop
+      perform acs_object__delete(v_notifications.notification_id);
+    end loop;
+
     perform acs_object__delete(p_request_id);
     return 0;
 end;
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-0.4d-4.6.1.sql'.
Fisheye: No comparison available.  Pass `N' to diff?