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.3 -r1.4
--- openacs-4/packages/download/sql/postgresql/download-packages.sql	14 May 2001 20:31:08 -0000	1.3
+++ openacs-4/packages/download/sql/postgresql/download-packages.sql	23 Feb 2002 05:15:35 -0000	1.4
@@ -1,3 +1,12 @@
+--
+-- packages/sdm/sql/download/download-packages.sql
+--
+-- 
+-- @author Vinod Kurup (vinod@kurup.com)
+-- 
+-- @cvs-id $Id$
+--
+
 --Defines the following packages:
 --
 -- Download Repository
@@ -137,126 +146,3 @@
 	return 0;
 end;' language 'plpgsql';
 
---create or replace package download_rep as
---
---  function new (
---    repository_id	in acs_objects.object_id%TYPE,
---    title               in cr_revisions.title%TYPE,
---    description         in cr_revisions.description%TYPE,
---    help_text           in varchar2 default null,
---    creation_date	in acs_objects.creation_date%TYPE default sysdate,
---    creation_user	in acs_objects.creation_user%TYPE default null,
---    parent_id           in cr_items.parent_id%TYPE default null,
---    context_id          in acs_objects.context_id%TYPE default null,
---    creation_ip	        in acs_objects.creation_ip%TYPE default null
---  ) return download_repository.repository_id%TYPE;
---
---  procedure edit (
---    repository_id	in acs_objects.object_id%TYPE,
---    title               in cr_revisions.title%TYPE,
---    description         in cr_revisions.description%TYPE,
---    help_text           in varchar2 default null,
---    last_modified    in acs_objects.last_modified%TYPE default sysdate,
---    modifying_user   in acs_objects.modifying_user%TYPE default null,
---    modifying_ip     in acs_objects.modifying_ip%TYPE default null
---  );
---
---  procedure delete (
---    repository_id      in acs_objects.object_id%TYPE
---  ); 
---
---end download_rep;
---/
---show errors
---
---
---create or replace package body download_rep as
---
---  function new (
---    repository_id	in acs_objects.object_id%TYPE,
---    title               in cr_revisions.title%TYPE,
---    description         in cr_revisions.description%TYPE,
---    help_text           in varchar2 default null,
---    creation_date	in acs_objects.creation_date%TYPE default sysdate,
---    creation_user	in acs_objects.creation_user%TYPE default null,
---    parent_id           in cr_items.parent_id%TYPE default null,
---    context_id          in acs_objects.context_id%TYPE default null,
---    creation_ip	        in acs_objects.creation_ip%TYPE default null
---  ) return download_repository.repository_id%TYPE
---  is
---    v_name       cr_items.name%TYPE;
---    v_repository_id integer;
---  begin
---    v_name := 'download_repository' || repository_id;
---    v_repository_id := content_item.new (
---      content_type => 'cr_download_rep',
---      item_id => new.repository_id,
---      name => v_name,
---      parent_id => new.parent_id,
---      context_id => new.context_id,
---      title => new.title,
---      description => new.description,
---      text => new.help_text,
---      creation_date => new.creation_date,
---      creation_user => new.creation_user,
---      creation_ip => new.creation_ip,
---      is_live => 't'
---    );
---
---    insert into download_repository
---     (repository_id)
---    values
---     (new.repository_id);
---
---    return v_repository_id;
---  end new;           
---
---  procedure edit (
---    repository_id	in acs_objects.object_id%TYPE,
---    title               in cr_revisions.title%TYPE,
---    description         in cr_revisions.description%TYPE,
---    help_text           in varchar2 default null,
---    last_modified    in acs_objects.last_modified%TYPE default sysdate,
---    modifying_user   in acs_objects.modifying_user%TYPE default null,
---    modifying_ip     in acs_objects.modifying_ip%TYPE default null
---  )
---  is
---    v_revision_id integer;
---  begin
---      v_revision_id := content_revision.new (
---          item_id => edit.repository_id,
---          title => edit.title,
---          description => edit.description,
---          text => edit.help_text,
---          creation_date => edit.last_modified,
---          creation_user => edit.modifying_user,
---          creation_ip => edit.modifying_ip
---    );
---    content_item.set_live_revision(v_revision_id);
---
---
---      update acs_objects set 
---        last_modified = edit.last_modified,
---        modifying_user = edit.modifying_user,
---	modifying_ip = edit.modifying_ip
---        where object_id = edit.repository_id;
---
---  end edit;
---
---
---  procedure delete (
---    repository_id      in acs_objects.object_id%TYPE
---  ) 
---  is
---  begin
---    update acs_objects set context_id = null where context_id = download_rep.delete.repository_id;
---
---    delete from download_repository
---    where repository_id = download_rep.delete.repository_id;
---
---    acs_object.delete(repository_id);
---  end;
---
---end download_rep;
---/
---show errors
