Index: openacs-4/packages/download/sql/postgresql/download-packages.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-packages.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/download/sql/postgresql/download-packages.sql	10 May 2001 20:32:55 -0000	1.1
+++ openacs-4/packages/download/sql/postgresql/download-packages.sql	11 May 2001 05:20:01 -0000	1.2
@@ -41,6 +41,7 @@
 	new__creation_ip			alias for $9;  -- default null
     v_name						cr_items.name%TYPE;
     v_repository_id				integer;
+	v_revision_id				integer;
 begin
     v_name := ''download_repository'' || new__repository_id;
     select into v_repository_id content_item__new (
@@ -67,6 +68,13 @@
     values
      (new__repository_id);
 
+	 -- get the latest revision
+	 select content_item__get_latest_revision ( v_repository_id ) 
+			into v_revision_id;
+
+	 -- make it live
+	 select content_item__set_live_revision ( v_revision_id );
+
     return v_repository_id;
 
 end;' language 'plpgsql';
