Index: openacs-4/packages/acs-content-repository/sql/oracle/content-extlink.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-extlink.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-content-repository/sql/oracle/content-extlink.sql	4 Mar 2004 14:52:35 -0000	1.8
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-extlink.sql	12 Mar 2004 18:48:46 -0000	1.9
@@ -24,10 +24,12 @@
 			   default sysdate,
   creation_user	in acs_objects.creation_user%TYPE
 			   default null,
-  creation_ip	in acs_objects.creation_ip%TYPE default null
+  creation_ip	in acs_objects.creation_ip%TYPE default null,
+  package_id    in acs_objects.package_id%TYPE
 ) return cr_extlinks.extlink_id%TYPE is
 
   v_extlink_id		cr_extlinks.extlink_id%TYPE;
+  v_package_id		acs_objects.package_id%TYPE;
   v_label		cr_extlinks.label%TYPE;
   v_name                cr_items.name%TYPE;
 
@@ -46,9 +48,16 @@
     v_name := name;
   end if;
 
+  if package_id is null then
+    v_package_id := acs_object.package_id(new.parent_id);
+  else
+    v_package_id := package_id;
+  end if;
+
   v_extlink_id := content_item.new(
       item_id       => content_extlink.new.extlink_id,
-      name          => v_name, 
+      name          => v_name,
+      package_id    => v_package_id,
       content_type  => 'content_extlink', 
       creation_date => content_extlink.new.creation_date, 
       creation_user => content_extlink.new.creation_user, 
@@ -62,6 +71,10 @@
     (v_extlink_id, content_extlink.new.url, v_label, 
      content_extlink.new.description);
 
+  update acs_objects
+  set title = v_label
+  where object_id = v_extlink_id;
+
   return v_extlink_id;
 
 end new;
