Index: openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql,v
diff -u -r1.22 -r1.23
--- openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql	2 Apr 2018 17:59:04 -0000	1.22
+++ openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql	26 Apr 2018 17:31:00 -0000	1.23
@@ -469,12 +469,10 @@
 
 
 
--- added
-select define_function_args('acs_event__new','event_id;null,name;null,description;null,html_p;null,status_summary;null,timespan_id;null,activity_id;null,recurrence_id;null,object_type;acs_event,creation_date;now(),creation_user;null,creation_ip;null,context_id;null,package_id;null,location;null');
 
 --
--- procedure acs_event__new/14-15
-
+-- procedure acs_event__new/14-18
+--
      -- Creates a new event (20.10.10)
      --
      -- @author W. Scott Meeks
@@ -494,9 +492,14 @@
      -- @param context_id        acs_object param
      -- @param package_id        acs_object param
      -- @param location          location
+     -- @param related_link_url  URL
+     -- @param related_link_text anchor for URL
+     -- @param redirect_to_rel_link_p activation flag
      --
      -- @return The id of the new event.
 
+select define_function_args('acs_event__new','event_id;null,name;null,description;null,html_p;null,status_summary;null,timespan_id;null,activity_id;null,recurrence_id;null,object_type;acs_event,creation_date;now(),creation_user;null,creation_ip;null,context_id;null,package_id;null,location;null,related_link_url;null,related_link_text;null,redirect_to_rel_link_p;false');
+
 CREATE OR REPLACE FUNCTION acs_event__new(
    new__event_id  integer,         -- default null,
    new__name varchar,              -- default null,
@@ -512,10 +515,12 @@
    new__creation_ip varchar,       -- default null,
    new__context_id integer,        -- default null
    new__package_id integer,        -- default null
-   new__location varchar default NULL
+   new__location varchar default NULL,
+   new__related_link_url varchar default NULL,
+   new__related_link_text varchar default NULL,
+   new__redirect_to_rel_link_p boolean default NULL
 
 ) RETURNS integer AS $$
-	-- acs_events.event_id%TYPE
 DECLARE
        v_event_id	    acs_events.event_id%TYPE;
 BEGIN
@@ -533,10 +538,12 @@
 
        insert into acs_events
             (event_id, name, description, html_p, status_summary,
-	    activity_id, timespan_id, recurrence_id, location)
+	    activity_id, timespan_id, recurrence_id, location,
+	    related_link_url, related_link_text, redirect_to_rel_link_p)
        values
             (v_event_id, new__name, new__description, new__html_p, new__status_summary,
-	    new__activity_id, new__timespan_id, new__recurrence_id, new__location);
+	    new__activity_id, new__timespan_id, new__recurrence_id, new__location,
+	    new__related_link_url, new__related_link_text, new__redirect_to_rel_link_p);
 
        return v_event_id;
 
@@ -1181,20 +1188,17 @@
             object_row.creation_ip,   -- creation_ip
             object_row.context_id,    -- context_id
             object_row.package_id,    -- package_id
-	    event_row.location        -- location
+	    event_row.location,        -- location
+	    event_row.related_link_url,      -- related_link_url
+	    event_row.related_link_text,     -- related_link_text
+	    event_row.redirect_to_rel_link_p -- redirect_to_rel_link_p
 	    );
 
       return v_event_id;
 END;
 $$ LANGUAGE plpgsql;
 
 
-
-
-
--- added
-select define_function_args('acs_event__insert_instances','event_id,cutoff_date;null');
-
 --
 -- procedure acs_event__insert_instances/2
 --
@@ -1234,6 +1238,7 @@
      --                              EventFutureLimit site parameter.
      --
      -- @return 0 (procedure dummy)
+select define_function_args('acs_event__insert_instances','event_id,cutoff_date;null');
 
 CREATE OR REPLACE FUNCTION acs_event__insert_instances(
    insert_instances__event_id integer,
