Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v
diff -u -r1.42 -r1.43
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	13 Jan 2005 13:55:12 -0000	1.42
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	20 Mar 2005 15:58:45 -0000	1.43
@@ -372,25 +372,37 @@
   end if;
 
   -- create the basic object
-  insert into acs_objects 
-       select 
-         v_copy_id as object_id, 
-         object_type, 
-         v_target_item_id, 
-         security_inherit_p, 
-         copy__creation_user as creation_user, 
-         now() as creation_date, 
+  insert into acs_objects (
+                 object_id,
+                 object_type,
+                 context_id,
+                 security_inherit_p,
+                 creation_user,
+                 creation_date,
+                 creation_ip,
+                 last_modified,
+                 modifying_user,
+                 modifying_ip,
+                 title,
+                 package_id)
+       select
+         v_copy_id as object_id,
+         object_type,
+         v_target_item_id,
+         security_inherit_p,
+         copy__creation_user as creation_user,
+         now() as creation_date,
          copy__creation_ip as creation_ip,
-         now() as last_modified, 
-         copy__creation_user as modifying_user, 
+         now() as last_modified,
+         copy__creation_user as modifying_user,
          copy__creation_ip as modifying_ip,
          title,
          package_id
        from
-         acs_objects 
-       where 
+         acs_objects
+       where
          object_id = copy__revision_id;
-  
+
   -- create the basic revision (using v_target_item_id)
   insert into cr_revisions 
       select 
@@ -409,23 +421,6 @@
       where
         revision_id = copy__revision_id;
 
---                  select 
---                    object_type
---                  from                                                
---                    acs_object_types                                  
---                  where                                               
---                    object_type <> ''acs_object''                       
---                  and                                                 
---                    object_type <> ''content_revision''                 
---                  connect by                                          
---                    prior supertype = object_type                     
---                  start with                                          
-----                    object_type = (select object_type 
---                                     from acs_objects 
---                                    where object_id = copy__revision_id)
---                  order by
---                    level desc 
-
   -- iterate over the ancestor types and copy attributes
   for type_rec in select ot2.object_type, tree_level(ot2.tree_sortkey) as level
                   from acs_object_types ot1, acs_object_types ot2, acs_objects o
