Index: openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql	24 Sep 2006 11:37:04 -0000	1.8
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-type.sql	5 Oct 2006 17:04:18 -0000	1.9
@@ -103,106 +103,6 @@
 procedure drop_type (
   content_type		in acs_object_types.object_type%TYPE,
   drop_children_p	in char default 'f',
-  drop_table_p		in char default 'f'
-) is
-
-
-  cursor attribute_cur is
-    select
-      attribute_name
-    from
-      acs_attributes
-    where
-      object_type = drop_type.content_type;
-
-  cursor child_type_cur is 
-    select 
-      object_type
-    from 
-      acs_object_types
-    where
-      supertype = drop_type.content_type;
-     
-  table_exists integer;
-  v_table_name varchar2(50);
-  is_subclassed_p char;
-
-begin
-
-
-  -- first we'll rid ourselves of any dependent child types, if any , along with their
-  -- own dependent grandchild types
-  select 
-    decode(count(*),0,'f','t') into is_subclassed_p 
-  from 
-    acs_object_types 
-  where supertype = drop_type.content_type;
-
-  -- this is weak and will probably break;
-  -- to remove grand child types, the process will probably
-  -- require some sort of querying for drop_type 
-  -- methods within the children's packages to make
-  -- certain there are no additional unanticipated
-  -- restraints preventing a clean drop
-
-  if drop_children_p = 't' and is_subclassed_p = 't' then
-
-    for child_rec in child_type_cur loop
-      drop_type( 
-        content_type => child_rec.object_type,
-	drop_children_p => 't' );
-    end loop;
-
-  end if;
-
-  -- now drop all the attributes related to this type
-  for attr_row in attribute_cur loop
-    drop_attribute(
-     content_type => drop_type.content_type,
-      attribute_name => attr_row.attribute_name
-    );
-  end loop;
-
-  -- we'll remove the associated table if it exists
-  select 
-    decode(count(*),0,0,1) into table_exists 
-  from 
-    user_tables u, acs_object_types objet
-  where 
-    objet.object_type = drop_type.content_type and
-    u.table_name = upper(objet.table_name);
-
-  if table_exists = 1 and drop_table_p = 't' then
-    select 
-      table_name into v_table_name 
-    from 
-      acs_object_types 
-    where
-      object_type = drop_type.content_type;
-
-    -- drop the input/output views for the type
-    -- being dropped.
-    -- FIXME: does the trigger get dropped when the 
-    -- view is dropped?  This did not exist in the 4.2 release,
-    -- and it needs to be tested.
-
-       
-    execute immediate 'drop view ' || v_table_name || 'x';
-    execute immediate 'drop view ' || v_table_name || 'i';
-
-    execute immediate 'drop table ' || v_table_name;
-
-  end if;
-
-  acs_object_type.drop_type(
-    object_type   => drop_type.content_type
-  );
-
-end drop_type;
-
-procedure drop_type (
-  content_type		in acs_object_types.object_type%TYPE,
-  drop_children_p	in char default 'f',
   drop_table_p		in char default 'f',
   drop_objects_p		in char default 'f'
 ) is
@@ -311,12 +211,12 @@
 
   if drop_objects_p = 't' then
     for revision_row in revision_cur loop
-      content_revision.delete( 
+      content_revision.del( 
         revision_id => revision_row.revision_id
       );
     end loop;
     for item_row in item_cur loop
-      content_item.delete( 
+      content_item.del( 
         item_id => item_row.item_id
       );
     end loop;
@@ -325,7 +225,6 @@
   acs_object_type.drop_type(
     object_type   => drop_type.content_type
   );
-
 end drop_type;
 
 function create_attribute (
