Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info	16 Jan 2003 13:50:45 -0000	1.2
+++ openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info	17 May 2003 10:48:16 -0000	1.3
@@ -19,7 +19,7 @@
         <description format="text/html">An MP3 Jukebox for Locally stored MP3 files. It doesn't stream. 
 </description>
 
-        <requires url="acs-kernel" version="4.1"/>
+        <requires url="acs-kernel" version="4.6.2"/>
 
         <files>
             <file type="shell" path="bin/mp3_file_scan"/>
Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql	17 Oct 2001 19:44:08 -0000	1.1
+++ openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql	17 May 2003 10:48:47 -0000	1.2
@@ -117,7 +117,7 @@
 	user_id		integer
 				constraint mp3_mp3_stats_user_id_fk
 				references users(user_id),
-	access_date	timestamp
+	access_date	timestamptz
 				constraint mp3_mp3_stats_access_date_nn
 				not null
 );
@@ -129,7 +129,7 @@
 	user_id		integer
 				constraint mp3_playlists_stats_user_id_fk
 				references users(user_id),
-	access_date	timestamp
+	access_date	timestamptz
 				constraint mp3_playlist_stats_date_nn
 				not null
 );
@@ -147,7 +147,7 @@
 	vote		integer
 				constraint mp3_votes_vote_nn
 				not null,
-	vote_date	timestamp
+	vote_date	timestamptz
 );
 
 create view mp3_mp3_playlist_map_view as
@@ -187,7 +187,7 @@
 		p_title			alias for $3;       -- default null
 		p_deleted_p		boolean default ''f'';
 		p_object_type		varchar default ''mp3'';
-		p_creation_date		timestamp default now();
+		p_creation_date		timestamptz default current_timestamp;
 		p_creation_user		integer default null;
 		p_creation_ip		varchar default null;
 		p_context_id		integer default null;
@@ -238,7 +238,7 @@
 end;' language 'plpgsql';
 
 
-create function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamp,integer,varchar,integer)
+create function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamptz,integer,varchar,integer)
 returns integer as '
 declare
 		p_playlist_id		alias for $1;       -- default null
@@ -353,7 +353,7 @@
 end;' language 'plpgsql';
 
 
-create function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamp)
+create function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamptz)
 returns integer as '
 declare
 		p_user_id		alias for $1;
Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql	17 Oct 2001 19:44:08 -0000	1.1
+++ openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql	17 May 2003 10:48:47 -0000	1.2
@@ -56,11 +56,11 @@
 
 -- drop package mp3_playlist;
 -- drop package mp3;
-drop function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamp,integer,varchar,integer);
+drop function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamptz,integer,varchar,integer);
 drop function mp3_playlist__delete (integer);
 drop function mp3_playlist__item_add (integer,integer,integer);
 drop function mp3_playlist__item_remove (integer,integer);
-drop function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamp);
+drop function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamptz);
 drop function mp3_playlist__item_order_swap (integer,integer);
 drop function mp3__new (integer,varchar,varchar);
 drop function mp3__delete (integer);
Index: openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql	19 Aug 2002 23:10:28 -0000	1.1
+++ openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql	17 May 2003 10:47:13 -0000	1.2
@@ -29,7 +29,7 @@
 create table ad_monitoring_top (
     top_id                      integer
                                 constraint ad_mntr_top_id_pk primary key,
-    timestamp                   timestamp default current_timestamp,
+    timestamp                   timestamptz default current_timestamp,
     -- denormalization: an indexable column for fast time comparisons.
     timehour                    numeric(2),
     -- the three load averages taken from uptime/top
@@ -105,7 +105,7 @@
     last_percent_estimated      integer,
     --Do we actually want to run this?
     enabled_p                   boolean,
-    last_estimated              timestamp
+    last_estimated              timestamptz
 ); 
 
 --Sequence for above table
Index: openacs-4/packages/news/news.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/news.info,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/news/news.info	30 Nov 2002 17:38:21 -0000	1.7
+++ openacs-4/packages/news/news.info	17 May 2003 10:49:21 -0000	1.8
@@ -23,92 +23,9 @@
         <requires url="acs-content" version="4.0"/>
         <requires url="acs-content-repository" version="4.0.1"/>
         <requires url="acs-datetime" version="4.0"/>
-        <requires url="acs-kernel" version="4.0"/>
+        <requires url="acs-kernel" version="4.6.2"/>
         <requires url="general-comments" version="4.0"/>
 
-        <files>
-            <file type="package_spec" path="news.info"/>
-            <file type="data_model_create" db_type="oracle" path="sql/oracle/news-create.sql"/>
-            <file type="data_model_drop" db_type="oracle" path="sql/oracle/news-drop.sql"/>
-            <file type="data_model" db_type="oracle" path="sql/oracle/news-sws-drop.sql"/>
-            <file type="data_model" db_type="oracle" path="sql/oracle/news-sws.sql"/>
-            <file type="data_model_upgrade" db_type="oracle" path="sql/oracle/upgrade/upgrade-4.1.0b-4.6.sql"/>
-            <file type="data_model_create" db_type="postgresql" path="sql/postgresql/news-create.sql"/>
-            <file type="data_model_drop" db_type="postgresql" path="sql/postgresql/news-drop.sql"/>
-            <file type="data_model" db_type="postgresql" path="sql/postgresql/news-sc-create.sql"/>
-            <file type="data_model" db_type="postgresql" path="sql/postgresql/news-sc-drop.sql"/>
-            <file type="data_model_upgrade" db_type="postgresql" path="sql/postgresql/upgrade/upgrade-4.1.0b-4.6.sql"/>
-            <file type="query_file" db_type="oracle" path="tcl/news-procs-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="tcl/news-procs-postgresql.xql"/>
-            <file type="tcl_procs" path="tcl/news-procs.tcl"/>
-            <file type="query_file" path="tcl/news-procs.xql"/>
-            <file type="query_file" db_type="oracle" path="www/admin/approve-2-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/approve-2-postgresql.xql"/>
-            <file type="content_page" path="www/admin/approve-2.tcl"/>
-            <file type="query_file" db_type="oracle" path="www/admin/approve-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/approve-postgresql.xql"/>
-            <file type="content_page" path="www/admin/approve.adp"/>
-            <file type="content_page" path="www/admin/approve.tcl"/>
-            <file type="query_file" path="www/admin/approve.xql"/>
-            <file type="query_file" db_type="oracle" path="www/admin/index-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/index-postgresql.xql"/>
-            <file type="content_page" path="www/admin/index.adp"/>
-            <file type="content_page" path="www/admin/index.tcl"/>
-            <file type="content_page" path="www/admin/item.adp"/>
-            <file type="content_page" path="www/admin/item.tcl"/>
-            <file type="query_file" path="www/admin/item.xql"/>
-            <file type="content_page" path="www/admin/news.adp"/>
-            <file type="query_file" db_type="oracle" path="www/admin/process-2-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/process-2-postgresql.xql"/>
-            <file type="content_page" path="www/admin/process-2.tcl"/>
-            <file type="query_file" db_type="oracle" path="www/admin/process-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/process-postgresql.xql"/>
-            <file type="content_page" path="www/admin/process.adp"/>
-            <file type="content_page" path="www/admin/process.tcl"/>
-            <file type="query_file" path="www/admin/process.xql"/>
-            <file type="query_file" db_type="oracle" path="www/admin/revision-add-3-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/revision-add-3-postgresql.xql"/>
-            <file type="content_page" path="www/admin/revision-add-3.tcl"/>
-            <file type="query_file" db_type="oracle" path="www/admin/revision-add-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/revision-add-postgresql.xql"/>
-            <file type="content_page" path="www/admin/revision-add.adp"/>
-            <file type="content_page" path="www/admin/revision-add.tcl"/>
-            <file type="query_file" path="www/admin/revision-add.xql"/>
-            <file type="query_file" db_type="oracle" path="www/admin/revision-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/revision-postgresql.xql"/>
-            <file type="query_file" db_type="oracle" path="www/admin/revision-set-active-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/revision-set-active-postgresql.xql"/>
-            <file type="content_page" path="www/admin/revision-set-active.tcl"/>
-            <file type="content_page" path="www/admin/revision.adp"/>
-            <file type="content_page" path="www/admin/revision.tcl"/>
-            <file type="query_file" db_type="oracle" path="www/admin/revoke-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/admin/revoke-postgresql.xql"/>
-            <file type="content_page" path="www/admin/revoke.tcl"/>
-            <file type="documentation" path="www/doc/design.html"/>
-            <file type="documentation" path="www/doc/index.html"/>
-            <file type="documentation" path="www/doc/requirements.html"/>
-            <file type="query_file" db_type="oracle" path="www/index-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/index-postgresql.xql"/>
-            <file type="content_page" path="www/index.adp"/>
-            <file type="content_page" path="www/index.tcl"/>
-            <file type="query_file" path="www/index.xql"/>
-            <file type="query_file" db_type="oracle" path="www/item-create-3-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/item-create-3-postgresql.xql"/>
-            <file type="content_page" path="www/item-create-3.tcl"/>
-            <file type="query_file" db_type="oracle" path="www/item-create-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/item-create-postgresql.xql"/>
-            <file type="content_page" path="www/item-create-thankyou.adp"/>
-            <file type="content_page" path="www/item-create.adp"/>
-            <file type="content_page" path="www/item-create.tcl"/>
-            <file type="query_file" db_type="oracle" path="www/item-oracle.xql"/>
-            <file type="query_file" db_type="postgresql" path="www/item-postgresql.xql"/>
-            <file type="content_page" path="www/item.adp"/>
-            <file type="content_page" path="www/item.tcl"/>
-            <file type="content_page" path="www/news.adp"/>
-            <file type="content_page" path="www/preview.adp"/>
-            <file type="content_page" path="www/preview.tcl"/>
-            <file type="query_file" path="www/preview.xql"/>
-        </files>
         <parameters>
             <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="SolicitCommentsP"  default="1" description="Whether we allow comments on news items."/>
             <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="MaxFileSizekB"  default="1024" description="maximum filesize in kB"/>
Index: openacs-4/packages/news/sql/postgresql/news-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-create.sql,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/news/sql/postgresql/news-create.sql	12 Mar 2003 15:43:39 -0000	1.11
+++ openacs-4/packages/news/sql/postgresql/news-create.sql	17 May 2003 10:49:52 -0000	1.12
@@ -92,12 +92,12 @@
     -- regarding news item
     -- *** support for dates when items are displayed or archived ***
     -- unarchived news items have archive_date null
-    archive_date                timestamp,
+    archive_date                timestamptz,
     -- support for approval
     approval_user               integer
                                 constraint cr_news_approval_user_fk
                                 references users,
-    approval_date               timestamp,
+    approval_date               timestamptz,
     approval_ip                 varchar(50)
 );
 
@@ -205,8 +205,8 @@
 
 
 -- *** PACKAGE NEWS, plsql to create content_item ***
-create function news__new (integer,varchar,timestamp,text,varchar,varchar,
-       varchar,integer,timestamp,integer,timestamp,varchar,varchar,
+create function news__new (integer,varchar,timestamptz,text,varchar,varchar,
+       varchar,integer,timestamptz,integer,timestamptz,varchar,varchar,
        varchar,integer,boolean)
 returns integer as '
 declare
@@ -380,7 +380,7 @@
 
 -- archive a news item
 -- this only applies to the currently active revision
-create function news__archive (integer,timestamp)
+create function news__archive (integer,timestamptz)
 returns integer as '
 declare
     p_item_id alias for $1;
@@ -408,8 +408,8 @@
 
 -- approve/unapprove a specific revision
 -- approving a revision makes it also the active revision
-create function news__set_approve(integer,varchar,timestamp,
-       timestamp,integer,timestamp,varchar,boolean)
+create function news__set_approve(integer,varchar,timestamptz,
+       timestamptz,integer,timestamptz,varchar,boolean)
 returns integer as '
 declare
     p_revision_id     alias for $1;
@@ -471,8 +471,8 @@
 returns varchar as '
 declare
     p_news_id alias for $1;
-    v_archive_date timestamp;
-    v_publish_date timestamp;
+    v_archive_date timestamptz;
+    v_publish_date timestamptz;
 begin
     -- populate variables
     select archive_date into v_archive_date 
@@ -545,8 +545,8 @@
 -- 
 -- API for Revision management
 -- 
-create function news__revision_new (integer,timestamp,text,varchar,text,
-       varchar,integer,timestamp,integer,timestamp,varchar,timestamp,varchar,
+create function news__revision_new (integer,timestamptz,text,varchar,text,
+       varchar,integer,timestamptz,integer,timestamptz,varchar,timestamptz,varchar,
        integer,boolean)
 returns integer as '
 declare
Index: openacs-4/packages/news/sql/postgresql/news-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-drop.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/news/sql/postgresql/news-drop.sql	17 Jul 2002 20:21:20 -0000	1.3
+++ openacs-4/packages/news/sql/postgresql/news-drop.sql	17 May 2003 10:49:52 -0000	1.4
@@ -57,19 +57,19 @@
 
 
 -- drop package news
-drop function news__new (integer,varchar,timestamp,text,varchar,varchar,
-       varchar,integer,timestamp,integer,timestamp,varchar,varchar,
+drop function news__new (integer,varchar,timestamptz,text,varchar,varchar,
+       varchar,integer,timestamptz,integer,timestamptz,varchar,varchar,
        varchar,integer,boolean);
 drop function news__delete (integer);
 drop function news__make_permanent (integer);
-drop function news__archive (integer,timestamp);
+drop function news__archive (integer,timestamptz);
 drop function news__archive (integer);
-drop function news__set_approve(integer,varchar,timestamp,
-       timestamp,integer,timestamp,varchar,boolean);
+drop function news__set_approve(integer,varchar,timestamptz,
+       timestamptz,integer,timestamptz,varchar,boolean);
 drop function news__status (integer);
 drop function news__name (integer);
-drop function news__revision_new (integer,timestamp,text,varchar,text,
-       varchar,integer,timestamp,integer,timestamp,varchar,timestamp,varchar,
+drop function news__revision_new (integer,timestamptz,text,varchar,text,
+       varchar,integer,timestamptz,integer,timestamptz,varchar,timestamptz,varchar,
        integer,boolean);
 drop function news__revision_set_active (integer);
 drop function news__revision_delete (integer);
Index: openacs-4/packages/notes/notes.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notes/notes.info,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/notes/notes.info	3 Sep 2001 17:54:02 -0000	1.4
+++ openacs-4/packages/notes/notes.info	17 May 2003 10:50:56 -0000	1.5
@@ -19,7 +19,7 @@
         <vendor url="http://www.openacs.org/">OpenACS</vendor>
         <description format="text/plain">This is a sample application for ACS 4.x.</description>
 
-        <requires url="acs-kernel" version="4.0"/>
+        <requires url="acs-kernel" version="4.6.2"/>
         <requires url="acs-templating" version="4.1.2"/>
 
         <files>
Index: openacs-4/packages/notes/sql/postgresql/notes-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notes/sql/postgresql/notes-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/notes/sql/postgresql/notes-create.sql	10 Oct 2001 05:16:23 -0000	1.4
+++ openacs-4/packages/notes/sql/postgresql/notes-create.sql	17 May 2003 10:51:28 -0000	1.5
@@ -88,7 +88,7 @@
     body       varchar(1024)
 );
 
-create function note__new (integer,integer,varchar,varchar,varchar,timestamp,integer,varchar,integer)
+create function note__new (integer,integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer)
 returns integer as '
 declare
   p_note_id					alias for $1;       -- default null
Index: openacs-4/packages/notes/sql/postgresql/notes-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notes/sql/postgresql/notes-drop.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/notes/sql/postgresql/notes-drop.sql	10 Oct 2001 05:16:23 -0000	1.5
+++ openacs-4/packages/notes/sql/postgresql/notes-drop.sql	17 May 2003 10:51:28 -0000	1.6
@@ -7,7 +7,7 @@
 \i notes-sc-drop.sql 
 
 --drop functions
-drop function note__new (integer,integer,varchar,varchar,varchar,timestamp,integer,varchar,integer);
+drop function note__new (integer,integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer);
 drop function note__delete (integer);
 drop function note__name (integer);
 
Index: openacs-4/packages/notifications/notifications.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/notifications.info,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/notifications/notifications.info	3 Apr 2003 17:04:38 -0000	1.17
+++ openacs-4/packages/notifications/notifications.info	17 May 2003 10:51:53 -0000	1.18
@@ -8,7 +8,7 @@
     <singleton-p>t</singleton-p>
     <auto-mount>notifications</auto-mount>
 
-    <version name="0.5d" url="http://openacs.org/repository/download/apm/notifications-0.5d.apm">
+    <version name="4.6.2" url="http://openacs.org/repository/download/apm/notifications-4.6.2.apm">
     <database-support>
         <database>oracle</database>
         <database>postgresql</database>
@@ -17,17 +17,17 @@
         <summary>Notification Management</summary>
         <release-date>2003-02-17</release-date>
 
-        <provides url="notifications" version="0.5d"/>
+        <provides url="notifications" version="4.6.2"/>
         <requires url="acs-mail-lite" version="0.1d"/>
 
         <callbacks>
         </callbacks>
-
         <parameters>
             <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailDomain"  description="The domain for the notification email address" section_name="email"/>
             <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueue"  description="The location of the qmail queue for incoming email" section_name="email"/>
             <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueueScanP"  default="0" description="Should the package scan the qmail queue for incoming mail? (1 is true, 0 is false)" section_name="email"/>
             <parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="EmailReplyAddressPrefix"  default="notification" description="The prefix for email replies" section_name="email"/>
+            <parameter datatype="number"  min_n_values="1"  max_n_values="1"  name="EmailQmailQueueScanP"  default="0" description="Should the package scan the qmail queue for incoming mail? (1 is true, 0 is false)" section_name="email"/>
         </parameters>
 
     </version>
Index: openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql	25 Feb 2003 10:07:41 -0000	1.10
+++ openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql	17 May 2003 10:52:25 -0000	1.11
@@ -160,6 +160,12 @@
     notif_html                      clob
 );
 
+-- RI indexes 
+create index notifications_type_id_idx ON notifications(type_id);
+create index notifications_response_id_idx ON notifications(response_id);
+create index notifications_object_id_idx ON notifications(object_id);
+
+
 -- who has received this notification?
 create table notification_user_map (
     notification_id                 constraint notif_user_map_notif_id_fk
@@ -173,6 +179,9 @@
     sent_date                       date
 );
 
+-- RI Indexes 
+create index notification_user_map_user_idx ON notification_user_map(user_id);
+
 --
 -- Object Types
 --
Index: openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql	25 Feb 2003 10:07:41 -0000	1.7
+++ openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql	17 May 2003 10:52:25 -0000	1.8
@@ -289,7 +289,14 @@
    )
    is
    begin
-      acs_object.delete(request_id);
+     for v_notifications in (select notification_id
+                             from notifications n, notification_requests nr
+                             where n.response_id = nr.object_id
+                               and nr.request_id = request_id)
+     loop
+      acs_object.delete(v_notifications.notification_id);
+     end loop;
+     acs_object.delete(request_id);
    end delete;
 
    procedure delete_all (
Index: openacs-4/packages/notifications/sql/oracle/notifications-replies-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-replies-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/notifications/sql/oracle/notifications-replies-create.sql	9 Aug 2002 20:51:49 -0000	1.2
+++ openacs-4/packages/notifications/sql/oracle/notifications-replies-create.sql	17 May 2003 10:52:25 -0000	1.3
@@ -27,6 +27,10 @@
        reply_date                 date
 );
 
+-- RI indexes
+create index notif_repl_from_user_idx ON notification_replies(from_user);
+create index notif_repl_type_id_idx ON notification_replies(type_id);
+create index notif_repl_object_id_idx ON notification_replies(object_id);
 
 declare
 begin
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-0.2d-0.3d.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-0.4d-4.6.1.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.1-4.6.2.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql	25 Feb 2003 10:09:12 -0000	1.9
+++ openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql	17 May 2003 10:53:27 -0000	1.10
@@ -160,7 +160,7 @@
                                     constraint notif_object_id_fk
                                     references acs_objects(object_id)
                                     on delete cascade,
-    notif_date                      timestamp
+    notif_date                      timestamptz
                                     constraint notif_notif_date_nn
                                     not null,
     -- this is to allow responses to notifications
@@ -172,6 +172,11 @@
     notif_html                      text
 );
 
+-- RI indexes 
+create index notifications_type_id_idx ON notifications(type_id);
+create index notifications_response_id_idx ON notifications(response_id);
+create index notifications_object_id_idx ON notifications(object_id);
+
 -- who has received this notification?
 create table notification_user_map (
     notification_id                 integer
@@ -184,9 +189,13 @@
                                     on delete cascade,
     constraint notif_user_map_pk
     primary key (notification_id, user_id),
-    sent_date                       timestamp
+    sent_date                       timestamptz
 );
 
+-- RI Indexes 
+create index notification_user_map_user_idx ON notification_user_map(user_id);
+
+
 --
 -- Object Types
 --
Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql	25 Feb 2003 10:09:13 -0000	1.10
+++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql	17 May 2003 10:53:27 -0000	1.11
@@ -9,7 +9,7 @@
 
 select define_function_args ('notification_interval__new','interval_id,name,n_seconds,creation_date,creation_user,creation_ip,context_id');
 
-create function notification_interval__new (integer, varchar, integer, timestamp with time zone, integer, varchar, integer)
+create function notification_interval__new (integer, varchar, integer, timestamptz, integer, varchar, integer)
 returns integer as '
 declare
     p_interval_id                   alias for $1;
@@ -54,7 +54,7 @@
 
 select define_function_args ('notification_delivery_method__new','delivery_method_id,sc_impl_id,short_name,pretty_name,creation_date,creation_user,creation_ip,context_id');
 
-create function notification_delivery_method__new (integer, integer, varchar, varchar, timestamp with time zone, integer, varchar, integer)
+create function notification_delivery_method__new (integer, integer, varchar, varchar, timestamptz, integer, varchar, integer)
 returns integer as '
 declare
     p_delivery_method_id            alias for $1;
@@ -103,7 +103,7 @@
 
 -- implementation
 
-create function notification_type__new (integer,integer,varchar,varchar,varchar,timestamp with time zone,integer,varchar,integer)
+create function notification_type__new (integer,integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer)
 returns integer as '
 DECLARE
         p_type_id                       alias for $1;
@@ -157,11 +157,12 @@
        integer,                       -- delivery_method_id
        varchar,                       -- format
        bool,                          -- dynamic_p
-       timestamp with time zone,      -- creation_date
+       timestamptz,                   -- creation_date
        integer,                       -- creation_user
        varchar,                       -- creation_ip
        integer                        -- context_id
 ) returns integer as '
+
 DECLARE
         p_request_id                            alias for $1;
         p_object_type                           alias for $2;
@@ -197,11 +198,20 @@
 
 select define_function_args ('notification_request__delete','request_id');
 
-create function notification_request__delete(integer)
+create or replace function notification_request__delete(integer)
 returns integer as '
 declare
     p_request_id                    alias for $1;
+    v_notifications record;
 begin
+    for v_notifications in select notification_id
+                           from notifications n, notification_requests nr
+                           where n.response_id = nr.object_id
+                             and nr.request_id = p_request_id
+    loop
+      perform acs_object__delete(v_notifications.notification_id);
+    end loop;
+
     perform acs_object__delete(p_request_id);
     return 0;
 end;
@@ -228,7 +238,7 @@
 
 select define_function_args ('notification__new','notification_id,type_id,object_id,notif_date,response_id,notif_subject,notif_text,notif_html,creation_date,creation_user,creation_ip,context_id');
 
-create function notification__new(integer,integer,integer,timestamp with time zone,integer,varchar,text,text,timestamp with time zone,integer,varchar,integer)
+create function notification__new(integer,integer,integer,timestamptz,integer,varchar,text,text,timestamptz,integer,varchar,integer)
 returns integer as '
 declare
     p_notification_id               alias for $1;
Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql	9 Aug 2002 20:51:50 -0000	1.2
+++ openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql	17 May 2003 10:53:27 -0000	1.3
@@ -11,28 +11,28 @@
 
 -- The Notification Interval Package
 
-drop function notification_interval__new (integer, varchar, integer, timestamp, integer, varchar, integer);
+drop function notification_interval__new (integer, varchar, integer, timestamptz, integer, varchar, integer);
 
 drop function notification_interval__delete(integer);
 
 
 -- The notification delivery methods package
 
-drop function notification_delivery_method__new (integer, varchar, varchar, timestamp, integer, varchar, integer);
+drop function notification_delivery_method__new (integer, varchar, varchar, timestamptz, integer, varchar, integer);
 
 drop function notification_delivery_method__delete(integer);
 
 
 -- Notification Types Package
 
-drop function notification_type__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer);
+drop function notification_type__new (integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer);
 
 drop function notification_type__delete(integer);
 
 
 -- the notification request package
 
-drop function notification_request__new (integer,varchar,integer,integer,integer,integer,varchar,timestamp,integer,varchar,integer);
+drop function notification_request__new (integer,varchar,integer,integer,integer,integer,varchar,timestamptz,integer,varchar,integer);
 
 drop function notification_request__delete(integer);
 
@@ -41,7 +41,7 @@
 
 -- the notifications package
 
-drop function notification__new(integer,integer,integer,timestamp,integer,varchar,text,text,timestamp,integer,varchar,integer);
+drop function notification__new(integer,integer,integer,timestamptz,integer,varchar,text,text,timestamptz,integer,varchar,integer);
 
 drop function notification__delete(integer);
 
Index: openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql	9 Aug 2002 20:51:50 -0000	1.2
+++ openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql	17 May 2003 10:53:27 -0000	1.3
@@ -24,10 +24,15 @@
                                   constraint notif_repl_from_fk references users(user_id),
        subject                    varchar(100),
        content                    text,
-       reply_date                 timestamp
+       reply_date                 timestamptz
 );
 
+-- RI indexes
+create index notif_repl_from_user_idx ON notification_replies(from_user);
+create index notif_repl_type_id_idx ON notification_replies(type_id);
+create index notif_repl_object_id_idx ON notification_replies(object_id);
 
+
 select acs_object_type__create_type (
             'notification_reply',
             'Notification Reply',
Index: openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql	21 Dec 2002 22:27:47 -0000	1.4
+++ openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql	17 May 2003 10:53:27 -0000	1.5
@@ -16,7 +16,7 @@
 select define_function_args ('notification_reply__delete','reply_id');
 
 
-create function notification_reply__new (integer,integer,integer,integer,varchar,text,timestamp with time zone,timestamp with time zone,integer,varchar,integer)
+create function notification_reply__new (integer,integer,integer,integer,varchar,text,timestamptz,timestamptz,integer,varchar,integer)
 returns integer as '
 DECLARE
         p_reply_id                      alias for $1;
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-0.2d-0.3d.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-0.4d-4.6.1.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.1-4.6.2.sql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/notifications/tcl/notification-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/notifications/tcl/notification-procs.tcl	25 Feb 2003 10:07:13 -0000	1.6
+++ openacs-4/packages/notifications/tcl/notification-procs.tcl	17 May 2003 10:54:25 -0000	1.7
@@ -286,7 +286,9 @@
                 }
 
                 # The notification below should be for the action_id object, not for the default object_id
-                set object_id $action_id
+                if { $subset_arg_p || $already_notified_arg_p } {
+                  set object_id $action_id
+                }
 
                 # Set up the vars
                 set extra_vars [ns_set create]
Index: openacs-4/packages/notifications/www/manage-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/manage-oracle.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/notifications/www/manage-oracle.xql	25 Feb 2003 10:05:57 -0000	1.3
+++ openacs-4/packages/notifications/www/manage-oracle.xql	17 May 2003 10:54:55 -0000	1.4
@@ -5,7 +5,8 @@
 
 <fullquery name="select_notifications">      
       <querytext>
-	select request_id, 
+	select request_id,
+	       type_id,
 	  (select pretty_name
 	   from notification_types
 	   where notification_types.type_id =
Index: openacs-4/packages/notifications/www/manage-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/manage-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/notifications/www/manage-postgresql.xql	25 Feb 2003 10:05:57 -0000	1.4
+++ openacs-4/packages/notifications/www/manage-postgresql.xql	17 May 2003 10:54:55 -0000	1.5
@@ -5,7 +5,8 @@
 
 <fullquery name="select_notifications">      
       <querytext>
-	select request_id, 
+	select request_id,
+	       type_id,
 	  (select pretty_name
 	   from notification_types
 	   where notification_types.type_id =
Index: openacs-4/packages/notifications/www/manage.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/notifications/www/manage.adp	25 Feb 2003 10:05:57 -0000	1.4
+++ openacs-4/packages/notifications/www/manage.adp	17 May 2003 10:54:55 -0000	1.5
@@ -10,6 +10,7 @@
       <th>#notifications.Action#</th>
     </tr>
 <multiple name="notifications">
+
   <if @notifications.rownum@ odd>
     <tr class="odd" bgcolor="white">
   </if>
Index: openacs-4/packages/notifications/www/manage.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/notifications/www/manage.tcl	16 Jan 2003 13:53:40 -0000	1.2
+++ openacs-4/packages/notifications/www/manage.tcl	17 May 2003 10:54:55 -0000	1.3
@@ -7,6 +7,7 @@
     @cvs-id $Id$
 } {}
 
+ad_maybe_redirect_for_registration
 set user_id [ad_conn user_id]
 set return_url [ad_conn url]
 set context [list "Manage Notifications"]
Index: openacs-4/packages/notifications/www/object-goto.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/object-goto.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/notifications/www/object-goto.tcl	20 Sep 2002 21:19:01 -0000	1.1
+++ openacs-4/packages/notifications/www/object-goto.tcl	17 May 2003 10:54:55 -0000	1.2
@@ -6,18 +6,19 @@
     @cvs-id $Id$
 } {
     object_id:notnull
+    type_id:notnull
 } 
 
 
-# At the time of writing, the only supported
-# notification types were on the object types
-# forum_forums and forum_messages.  get_url
-# will handle both these types.  If there are
-# more type of notifications added, this file
-# has to be changed to handle them.  Perhaps
-# it could be handles in a generic way, using 
-# meta-data about the object_type to auto-generate
-# the url.
+# added type_id parameter to redirect to the correct page for an object
+# we need the implementation name which is not the same as the object_type
 
-ad_returnredirect [forum::notification::get_url $object_id]
+# look in tcl/delivery-procs.tcl, there is a get_impl_key proc that 
+# queries the acs_sc_impls table for the implementation name
+# but the query is delivery_type specific, so we can't use it here
 
+set sc_impl_name [db_string get_notif_type {}]
+
+set url [acs_sc_call NotificationType GetURL [list $object_id] $sc_impl_name]
+
+ad_returnredirect $url
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/www/object-goto.xql'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: openacs-4/packages/page/page.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/page/page.info,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/page/page.info	3 Aug 2002 17:55:27 -0000	1.6
+++ openacs-4/packages/page/page.info	17 May 2003 10:55:24 -0000	1.7
@@ -17,18 +17,8 @@
         <release-date>2002-05-15</release-date>
         <vendor url="http://www.openacs.org/">OpenACS</vendor>
 
-        <requires url="acs-kernel" version="4.0b2"/>
+        <requires url="acs-kernel" version="4.6.2"/>
 
-        <files>
-            <file type="package_spec" path="page.info"/>
-            <file type="data_model_create" db_type="oracle" path="sql/oracle/page-create.sql"/>
-            <file type="data_model_drop" db_type="oracle" path="sql/oracle/page-drop.sql"/>
-            <file type="data_model_create" db_type="postgresql" path="sql/postgresql/page-create.sql"/>
-            <file type="data_model_drop" db_type="postgresql" path="sql/postgresql/page-drop.sql"/>
-            <file type="content_page" path="www/admin/content-update.tcl"/>
-            <file type="content_page" path="www/admin/index.tcl"/>
-            <file type="content_page" path="www/index.tcl"/>
-        </files>
         <parameters>
         <!-- No version parameters -->
         </parameters>
Index: openacs-4/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/payflowpro/sql/postgresql/Attic/payflowpro-sc-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql	5 Jun 2002 02:32:58 -0000	1.1
+++ openacs-4/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql	17 May 2003 10:55:53 -0000	1.2
@@ -68,7 +68,7 @@
 create table payflowpro_result_log (
   transaction_id            varchar(20),
   txn_attempted_type        varchar(25),
-  txn_attempted_time        timestamp,
+  txn_attempted_time        timestamptz,
   txn_returned_type         varchar(25),
   errmsg                    varchar(200),
   auth_code                 varchar(25),