Index: openacs-4/packages/acs-authentication/tcl/authority-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authority-procs.tcl,v
diff -u -r1.22 -r1.23
--- openacs-4/packages/acs-authentication/tcl/authority-procs.tcl 4 Mar 2004 14:52:35 -0000 1.22
+++ openacs-4/packages/acs-authentication/tcl/authority-procs.tcl 12 Mar 2004 18:48:45 -0000 1.23
@@ -265,6 +265,12 @@
get_flush -authority_id $authority_id
get_id_flush -short_name $old_short_name
+
+ # check if we need to update the object title
+ set new_short_name [get_element -authority_id $authority_id -element short_name]
+ if {![string equal $old_short_name $new_short_name]} {
+ db_dml update_object_title {}
+ }
}
ad_proc -public auth::authority::delete {
Index: openacs-4/packages/acs-authentication/tcl/authority-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authority-procs.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-authentication/tcl/authority-procs.xql 4 Mar 2004 14:52:35 -0000 1.5
+++ openacs-4/packages/acs-authentication/tcl/authority-procs.xql 12 Mar 2004 18:48:45 -0000 1.6
@@ -2,6 +2,14 @@
+
+
+ update acs_objects
+ set title = :new_short_name
+ where object_id = :authority_id
+
+
+
select pretty_name, authority_id
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;
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql 4 Mar 2004 14:52:35 -0000 1.8
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-folder.sql 12 Mar 2004 18:48:46 -0000 1.9
@@ -22,10 +22,12 @@
folder_id in cr_folders.folder_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE 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 default null,
) return cr_folders.folder_id%TYPE is
v_folder_id cr_folders.folder_id%TYPE;
v_context_id acs_objects.context_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- set the context_id
@@ -43,6 +45,12 @@
'This folder does not allow subfolders to be created');
else
+ v_package_id := package_id;
+
+ if parent_id is not null and package_id is null then
+ v_package_id := acs_object.package_id(content_item.get_root_folder(parent_id));
+ end if;
+
v_folder_id := content_item.new(
item_id => folder_id,
name => name,
@@ -52,15 +60,21 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- parent_id => parent_id
+ parent_id => parent_id,
+ package_id => v_package_id
);
insert into cr_folders (
- folder_id, label, description
+ folder_id, label, description, package_id
) values (
- v_folder_id, label, description
+ v_folder_id, label, description, v_package_id
);
+ -- set the correct object title
+ update acs_objects
+ set title = new.label
+ where object_id = v_folder_id;
+
-- inherit the attributes of the parent folder
if content_folder.new.parent_id is not null then
@@ -163,6 +177,12 @@
content_item.rename(folder_id, name);
end if;
+ if label is not null then
+ update acs_objects
+ set title = rename.label
+ where object_id = rename.folder_id;
+ end if;
+
if label is not null and description is not null then
update cr_folders
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql 4 Mar 2004 14:52:35 -0000 1.9
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql 12 Mar 2004 18:48:46 -0000 1.10
@@ -112,7 +112,8 @@
height in images.height%TYPE default null,
width in images.width%TYPE default null,
file_size in cr_revisions.content_length%TYPE default null,
- storage_type in cr_items.storage_type%TYPE default 'file'
+ storage_type in cr_items.storage_type%TYPE default 'file',
+ package_id in acs_objects.package_id%TYPE
) return cr_items.item_id%TYPE;
function new_revision (
@@ -131,7 +132,8 @@
filename in cr_revisions.filename%TYPE default null,
height in images.height%TYPE default null,
width in images.width%TYPE default null,
- file_size in cr_revisions.content_length%TYPE default null
+ file_size in cr_revisions.content_length%TYPE default null,
+ package_id in acs_objects.package_id%TYPE
) return cr_revisions.revision_id%TYPE;
--/**
@@ -182,17 +184,26 @@
height in images.height%TYPE default null,
width in images.width%TYPE default null,
file_size in cr_revisions.content_length%TYPE default null,
- storage_type in cr_items.storage_type%TYPE default 'file'
+ storage_type in cr_items.storage_type%TYPE default 'file',
+ package_id in acs_objects.package_id%TYPE
) return cr_items.item_id%TYPE
is
v_item_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
+ 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_item_id := content_item.new (
name => name,
item_id => item_id,
parent_id => parent_id,
+ package_id => v_package_id,
relation_tag => relation_tag,
content_type => content_type,
creation_date => creation_date,
@@ -208,6 +219,7 @@
description => description,
item_id => v_item_id,
revision_id => revision_id,
+ package_id => v_package_id,
publish_date => publish_date,
mime_type => mime_type,
nls_language => nls_language,
@@ -257,17 +269,26 @@
filename in cr_revisions.filename%TYPE default null,
height in images.height%TYPE default null,
width in images.width%TYPE default null,
- file_size in cr_revisions.content_length%TYPE default null
+ file_size in cr_revisions.content_length%TYPE default null,
+ package_id in acs_objects.package_id%TYPE
) return cr_revisions.revision_id%TYPE
is
v_revision_id cr_revisions.revision_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
+ if package_id is null then
+ v_package_id := acs_object.package_id(new_revision.item_id);
+ else
+ v_package_id := package_id;
+ end if;
+
v_revision_id := content_revision.new (
title => title,
description => description,
item_id => item_id,
revision_id => revision_id,
+ package_id => v_package_id,
publish_date => publish_date,
mime_type => mime_type,
nls_language => nls_language,
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 4 Mar 2004 14:52:35 -0000 1.20
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 12 Mar 2004 18:48:46 -0000 1.21
@@ -74,7 +74,9 @@
data in cr_revisions.content%TYPE default null,
relation_tag in cr_child_rels.relation_tag%TYPE default null,
is_live in char default 'f',
- storage_type in cr_items.storage_type%TYPE default 'lob'
+ storage_type in cr_items.storage_type%TYPE default 'lob',
+ package_id in acs_objects.package_id%TYPE default null
+
) return cr_items.item_id%TYPE
is
v_parent_id cr_items.parent_id%TYPE;
@@ -84,6 +86,7 @@
v_title cr_revisions.title%TYPE;
v_rel_id acs_objects.object_id%TYPE;
v_rel_tag cr_child_rels.relation_tag%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_context_id acs_objects.context_id%TYPE;
v_storage_type cr_items.storage_type%TYPE;
begin
@@ -108,6 +111,12 @@
v_parent_id := parent_id;
end if;
+ if package_id is null then
+ v_package_id := acs_object.package_id(content_item.get_root_folder(v_parent_id));
+ else
+ v_package_id := package_id;
+ end if;
+
-- Determine context_id
if context_id is null then
v_context_id := v_parent_id;
@@ -166,7 +175,9 @@
v_item_id := acs_object.new(
object_id => content_item.new.item_id,
- object_type => content_item.new.item_subtype,
+ object_type => content_item.new.item_subtype,
+ title => content_item.new.name,
+ package_id => v_package_id,
context_id => v_context_id,
creation_date => content_item.new.creation_date,
creation_user => content_item.new.creation_user,
@@ -193,6 +204,8 @@
v_rel_id := acs_object.new(
object_type => 'cr_item_child_rel',
+ title => v_rel_tag || ': ' || v_parent_id || ' - ' || v_item_id,
+ package_id => v_package_id,
context_id => v_parent_id
);
@@ -220,6 +233,7 @@
v_revision_id := content_revision.new(
item_id => v_item_id,
title => v_title,
+ package_id => v_package_id,
description => content_item.new.description,
data => content_item.new.data,
mime_type => content_item.new.mime_type,
@@ -235,6 +249,7 @@
v_revision_id := content_revision.new(
item_id => v_item_id,
title => v_title,
+ package_id => v_package_id,
description => content_item.new.description,
text => content_item.new.text,
mime_type => content_item.new.mime_type,
@@ -634,6 +649,10 @@
update cr_items
set name = rename.name
where item_id = rename.item_id;
+
+ update acs_objects
+ set title = rename.name
+ where object_id = rename.item_id;
else
close exists_cur;
if exists_id <> rename.item_id then
@@ -1233,6 +1252,12 @@
where item_id = move.item_id;
end if;
+ if name is not null then
+ update acs_objects
+ set title = move.name
+ where object_id = move.item_id;
+ end if;
+
end if;
end move;
@@ -1584,6 +1609,7 @@
v_rel_id integer;
v_exists integer;
v_order_n cr_item_rels.order_n%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- check the relationship is valid
@@ -1622,6 +1648,7 @@
v_exists := 0;
end;
+ v_package_id := acs_object.package_id(relate.item_id);
-- if order_n is null, use rel_id (the order the item was related)
if relate.order_n is null then
@@ -1636,6 +1663,8 @@
--dbms_output.put_line( 'creating new relationship...');
v_rel_id := acs_object.new(
object_type => relation_type,
+ title => relation_tag || ': ' || relate.item_id || ' - ' || relate.object_id,
+ package_id => v_package_id,
context_id => item_id
);
insert into cr_item_rels (
@@ -1652,6 +1681,10 @@
order_n = v_order_n
where
rel_id = v_rel_id;
+
+ update acs_objects set
+ title = relate.relation_tag || ': ' || relate.item_id || ' - ' || relate.object_id
+ where object_id = v_rel_id;
end if;
end if;
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-keyword.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-keyword.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-content-repository/sql/oracle/content-keyword.sql 4 Mar 2004 14:52:35 -0000 1.4
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-keyword.sql 12 Mar 2004 18:48:46 -0000 1.5
@@ -49,6 +49,10 @@
where
keyword_id = set_heading.keyword_id;
+ update acs_objects
+ set title = set_heading.heading
+ where object_id = set_heading.keyword_id;
+
end set_heading;
procedure set_description (
@@ -100,15 +104,25 @@
creation_user in acs_objects.creation_user%TYPE
default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- object_type in acs_object_types.object_type%TYPE default 'content_keyword'
+ object_type in acs_object_types.object_type%TYPE default 'content_keyword',
+ package_id in acs_objects.package_id%TYPE
) return cr_keywords.keyword_id%TYPE
is
v_id integer;
+ v_package_id acs_objects.package_id%TYPE;
begin
+ 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_id := acs_object.new (object_id => keyword_id,
context_id => parent_id,
object_type => object_type,
+ title => heading,
+ package_id => v_package_id,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip);
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql 4 Mar 2004 14:52:35 -0000 1.10
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql 12 Mar 2004 18:48:46 -0000 1.11
@@ -25,20 +25,30 @@
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- filename in cr_revisions.filename%TYPE default null
+ filename in cr_revisions.filename%TYPE default null,
+ package_id in acs_objects.package_id%TYPE default null
) return cr_revisions.revision_id%TYPE is
v_revision_id integer;
+ v_package_id acs_objects.package_id%TYPE;
v_content_type acs_object_types.object_type%TYPE;
begin
v_content_type := content_item.get_content_type(item_id);
+ if package_id is null then
+ v_package_id := acs_object.package_id(item_id);
+ else
+ v_package_id := package_id;
+ end if;
+
v_revision_id := acs_object.new(
object_id => revision_id,
- object_type => v_content_type,
+ object_type => v_content_type,
+ title => title,
+ package_id => v_package_id,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
@@ -68,7 +78,8 @@
revision_id in cr_revisions.revision_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE 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 default null
) return cr_revisions.revision_id%TYPE is
v_revision_id integer;
@@ -89,7 +100,8 @@
revision_id => revision_id,
creation_date => creation_date,
creation_user => creation_user,
- creation_ip => creation_ip
+ creation_ip => creation_ip,
+ package_id => package_id
);
select
@@ -193,11 +205,13 @@
insert into acs_objects (
object_id, object_type, context_id, security_inherit_p,
creation_user, creation_date, creation_ip,
- last_modified, modifying_user, modifying_ip
+ last_modified, modifying_user, modifying_ip,
+ title, package_id
) ( select
v_copy_id, object_type, v_target_item_id, security_inherit_p,
copy.creation_user, sysdate, copy.creation_ip,
- sysdate, copy.creation_user, copy.creation_ip from
+ sysdate, copy.creation_user, copy.creation_ip,
+ title, package_id from
acs_objects where object_id = copy.revision_id
);
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-symlink.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-symlink.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-content-repository/sql/oracle/content-symlink.sql 4 Mar 2004 14:52:35 -0000 1.7
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-symlink.sql 12 Mar 2004 18:48:46 -0000 1.8
@@ -21,9 +21,11 @@
symlink_id in cr_symlinks.symlink_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE 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_symlinks.symlink_id%TYPE is
v_symlink_id cr_symlinks.symlink_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_name cr_items.name%TYPE;
v_label cr_symlinks.label%TYPE;
begin
@@ -85,9 +87,16 @@
v_label := content_symlink.new.label;
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_symlink_id := content_item.new(
item_id => content_symlink.new.symlink_id,
- name => v_name,
+ name => v_name,
+ package_id => v_package_id,
content_type => 'content_symlink',
creation_date => content_symlink.new.creation_date,
creation_user => content_symlink.new.creation_user,
@@ -100,6 +109,10 @@
values
(v_symlink_id, content_symlink.new.target_id, v_label);
+ update acs_objects
+ set title = v_label
+ where object_id = v_symlink_id;
+
return v_symlink_id;
end new;
Index: openacs-4/packages/acs-content-repository/sql/oracle/content-template.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-template.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-content-repository/sql/oracle/content-template.sql 4 Mar 2004 14:52:35 -0000 1.5
+++ openacs-4/packages/acs-content-repository/sql/oracle/content-template.sql 12 Mar 2004 18:48:46 -0000 1.6
@@ -30,12 +30,14 @@
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_templates.template_id%TYPE
is
v_template_id cr_templates.template_id%TYPE;
v_parent_id cr_items.parent_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
@@ -53,11 +55,18 @@
'This folder does not allow templates to be created');
else
+ if package_id is null then
+ v_package_id := acs_object.package_id(v_parent_id);
+ else
+ v_package_id := package_id;
+ end if;
+
v_template_id := content_item.new (
item_id => content_template.new.template_id,
name => content_template.new.name,
text => content_template.new.text,
parent_id => v_parent_id,
+ package_id => v_package_id,
content_type => 'content_template',
is_live => content_template.new.is_live,
creation_date => content_template.new.creation_date,
Index: openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 4 Mar 2004 14:52:35 -0000 1.17
+++ openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 12 Mar 2004 18:48:46 -0000 1.18
@@ -375,7 +375,8 @@
data in cr_revisions.content%TYPE default null,
relation_tag in cr_child_rels.relation_tag%TYPE default null,
is_live in char default 'f',
- storage_type in cr_items.storage_type%TYPE default 'lob'
+ storage_type in cr_items.storage_type%TYPE default 'lob',
+ package_id in acs_objects.package_id%TYPE default null
) return cr_items.item_id%TYPE;
@@ -841,7 +842,8 @@
creation_user in acs_objects.creation_user%TYPE
default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- filename in cr_revisions.filename%TYPE default null
+ filename in cr_revisions.filename%TYPE default null,
+ package_id in acs_objects.package_id%TYPE default null
) return cr_revisions.revision_id%TYPE;
function new (
@@ -855,7 +857,8 @@
revision_id in cr_revisions.revision_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE 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 default null
) return cr_revisions.revision_id%TYPE;
function copy (
@@ -1031,7 +1034,8 @@
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_symlinks.symlink_id%TYPE;
@@ -1130,7 +1134,8 @@
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;
@@ -1180,6 +1185,7 @@
-- @param creation_date As in acs_object.new
-- @param creation_ip As in acs_object.new
-- @param creation_user As in acs_object.new
+ -- @param package_id The package id.
-- @return The id of the newly created folder
-- @see {acs_object.new}, {content_item.new}
--*/
@@ -1191,7 +1197,8 @@
folder_id in cr_folders.folder_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE 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 default null
) return cr_folders.folder_id%TYPE;
procedure del (
@@ -1415,7 +1422,8 @@
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_templates.template_id%TYPE;
procedure del (
@@ -1487,7 +1495,8 @@
creation_user in acs_objects.creation_user%TYPE
default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- object_type in acs_object_types.object_type%TYPE default 'content_keyword'
+ object_type in acs_object_types.object_type%TYPE default 'content_keyword',
+ package_id in acs_objects.package_id%TYPE
) return cr_keywords.keyword_id%TYPE;
procedure del (
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.1.0d2-5.1.0d3.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql 4 Mar 2004 14:52:36 -0000 1.15
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql 12 Mar 2004 18:48:47 -0000 1.16
@@ -12,7 +12,7 @@
select define_function_args('content_extlink__new','name,url,label,description,parent_id,extlink_id,creation_date;now,creation_user,creation_ip');
-create or replace function content_extlink__new (varchar,varchar,varchar,varchar,integer,integer,timestamptz,integer,varchar)
+create or replace function content_extlink__new (varchar,varchar,varchar,varchar,integer,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
new__name alias for $1; -- default null
@@ -24,7 +24,9 @@
new__creation_date alias for $7; -- default now()
new__creation_user alias for $8; -- default null
new__creation_ip alias for $9; -- default null
+ new__package_id alias for $10; -- default null
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;
begin
@@ -42,6 +44,12 @@
v_name := new__name;
end if;
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(new__parent_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_extlink_id := content_item__new(
v_name,
new__parent_id,
@@ -58,18 +66,50 @@
''text/plain'',
null,
null,
- ''text''
+ ''text'',
+ v_package_id
);
insert into cr_extlinks
(extlink_id, url, label, description)
values
(v_extlink_id, new__url, v_label, new__description);
+ update acs_objects
+ set title = v_label
+ where object_id = v_extlink_id;
+
return v_extlink_id;
end;' language 'plpgsql';
+create or replace function content_extlink__new (varchar,varchar,varchar,varchar,integer,integer,timestamptz,integer,varchar)
+returns integer as '
+declare
+ new__name alias for $1; -- default null
+ new__url alias for $2;
+ new__label alias for $3; -- default null
+ new__description alias for $4; -- default null
+ new__parent_id alias for $5;
+ new__extlink_id alias for $6; -- default null
+ new__creation_date alias for $7; -- default now()
+ new__creation_user alias for $8; -- default null
+ new__creation_ip alias for $9; -- default null
+begin
+ return content_extlink__new(new__name,
+ new__url,
+ new__label,
+ new__description,
+ new__parent_id,
+ new__extlink_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ null
+ );
+
+end;' language 'plpgsql';
+
create or replace function content_extlink__delete (integer)
returns integer as '
declare
@@ -186,7 +226,8 @@
null,
current_timestamp,
copy__creation_user,
- copy__creation_ip
+ copy__creation_ip,
+ null
);
end if;
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql,v
diff -u -r1.33 -r1.34
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 4 Mar 2004 14:52:36 -0000 1.33
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 12 Mar 2004 18:48:47 -0000 1.34
@@ -12,6 +12,29 @@
-- create or replace package body content_folder
+create or replace function content_folder__new(varchar,varchar,varchar,integer,integer)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__label alias for $2;
+ new__description alias for $3; -- default null
+ new__parent_id alias for $4; -- default null
+ new__package_id alias for $5; -- default null
+begin
+ return content_folder__new(new__name,
+ new__label,
+ new__description,
+ new__parent_id,
+ null,
+ null,
+ now(),
+ null,
+ null,
+ new__package_id
+ );
+
+end;' language 'plpgsql';
+
create or replace function content_folder__new(varchar,varchar,varchar,integer)
returns integer as '
declare
@@ -28,10 +51,12 @@
null,
now(),
null,
+ null,
null
);
end;' language 'plpgsql';
+
-- function new
create or replace function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar)
returns integer as '
@@ -45,8 +70,38 @@
new__creation_date alias for $7; -- default now()
new__creation_user alias for $8; -- default null
new__creation_ip alias for $9; -- default null
+begin
+ return content_folder__new(new__name,
+ new__label,
+ new__description,
+ new__parent_id,
+ new__content_id,
+ new__folder_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ null
+ );
+
+end;' language 'plpgsql';
+
+-- function new
+create or replace function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,integer)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__label alias for $2;
+ new__description alias for $3; -- default null
+ new__parent_id alias for $4; -- default null
+ new__context_id alias for $5; -- default null
+ new__folder_id alias for $6; -- default null
+ new__creation_date alias for $7; -- default now()
+ new__creation_user alias for $8; -- default null
+ new__creation_ip alias for $9; -- default null
+ new__package_id alias for $10; -- default null
v_folder_id cr_folders.folder_id%TYPE;
v_context_id acs_objects.context_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- set the context_id
@@ -65,6 +120,12 @@
else
+ v_package_id := new__package_id;
+
+ if new__parent_id is not null and new__package_id is null then
+ v_package_id := acs_object__package_id(content_item__get_root_folder(new__parent_id));
+ end if;
+
v_folder_id := content_item__new(
new__name,
new__parent_id,
@@ -81,15 +142,21 @@
''text/plain'',
null,
null,
- ''text''
+ ''text'',
+ v_package_id
);
insert into cr_folders (
- folder_id, label, description
+ folder_id, label, description, package_id
) values (
- v_folder_id, new__label, new__description
+ v_folder_id, new__label, new__description, v_package_id
);
+ -- set the correct object title
+ update acs_objects
+ set title = new__label
+ where object_id = v_folder_id;
+
-- inherit the attributes of the parent folder
if new__parent_id is not null then
@@ -117,7 +184,7 @@
select define_function_args('content_folder__new','name,label,description,parent_id,context_id,folder_id,creation_date;now,creation_user,creation_ip,security_inherit_p;t');
-create or replace function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar, boolean)
+create or replace function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,boolean,integer)
returns integer as '
declare
new__name alias for $1;
@@ -130,6 +197,8 @@
new__creation_user alias for $8; -- default null
new__creation_ip alias for $9; -- default null
new__security_inherit_p alias for $10; -- default true
+ new__package_id alias for $11; -- default null
+ v_package_id acs_objects.package_id%TYPE;
v_folder_id cr_folders.folder_id%TYPE;
v_context_id acs_objects.context_id%TYPE;
begin
@@ -150,6 +219,12 @@
else
+ v_package_id := new__package_id;
+
+ if new__parent_id is not null and new__package_id is null then
+ v_package_id := acs_object__package_id(content_item__get_root_folder(new__parent_id));
+ end if;
+
v_folder_id := content_item__new(
new__folder_id,
new__name,
@@ -166,14 +241,21 @@
new__security_inherit_p,
''CR_FILES'',
''content_folder'',
- ''content_folder'');
+ ''content_folder'',
+ v_package_id
+ );
insert into cr_folders (
- folder_id, label, description
+ folder_id, label, description, package_id
) values (
- v_folder_id, new__label, new__description
+ v_folder_id, new__label, new__description, v_package_id
);
+ -- set the correct object title
+ update acs_objects
+ set title = new__label
+ where object_id = v_folder_id;
+
-- inherit the attributes of the parent folder
if new__parent_id is not null then
@@ -198,6 +280,35 @@
return null;
end;' language 'plpgsql';
+create or replace function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,boolean)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__label alias for $2;
+ new__description alias for $3; -- default null
+ new__parent_id alias for $4; -- default null
+ new__context_id alias for $5; -- default null
+ new__folder_id alias for $6; -- default null
+ new__creation_date alias for $7; -- default now()
+ new__creation_user alias for $8; -- default null
+ new__creation_ip alias for $9; -- default null
+ new__security_inherit_p alias for $10; -- default true
+begin
+ return content_folder__new(new__name,
+ new__label,
+ new__description,
+ new__parent_id,
+ new__content_id,
+ new__folder_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ new__security_inherit_p,
+ null
+ );
+
+end;' language 'plpgsql';
+
-- procedure delete
create or replace function content_folder__delete (integer, boolean)
@@ -294,6 +405,12 @@
PERFORM content_item__rename(rename__folder_id, rename__name);
end if;
+ if rename__label is not null and rename_label != '''' then
+ update acs_objects
+ set title = rename__label
+ where object_id = rename__folder_id;
+ end if;
+
if rename__label is not null and rename__label != '''' and
rename__description is not null and rename__description != '''' then
@@ -414,7 +531,7 @@
return v_new_folder_id;
end;' language 'plpgsql';
-create function content_folder__copy (integer,integer,integer,varchar,varchar)
+create or replace function content_folder__copy (integer,integer,integer,varchar,varchar)
returns integer as '
declare
copy__folder_id alias for $1;
@@ -483,7 +600,8 @@
null,
now(),
copy__creation_user,
- copy__creation_ip
+ copy__creation_ip,
+ null
);
-- copy attributes of original folder
@@ -513,7 +631,8 @@
v_folder_contents_val.item_id,
v_new_folder_id,
copy__creation_user,
- copy__creation_ip
+ copy__creation_ip,
+ null
);
end loop;
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql 4 Mar 2004 14:52:36 -0000 1.14
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql 12 Mar 2004 18:48:47 -0000 1.15
@@ -109,7 +109,7 @@
-- than the standard package_instantiate_object. So we don't bother calling define_function_args
-- here.
-create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,boolean,timestamptz,varchar,integer,integer,integer
+create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,boolean,timestamptz,varchar,integer,integer,integer,integer
) returns integer as '
declare
new__name alias for $1;
@@ -128,17 +128,25 @@
new__file_size alias for $14;
new__height alias for $15;
new__width alias for $16;
+ new__package_id alias for $17; -- default null
new__locale varchar default null;
new__nls_language varchar default null;
new__creation_date timestamptz default current_timestamp;
new__context_id integer;
v_item_id cr_items.item_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
begin
new__context_id := new__parent_id;
+ if p_package_id is null then
+ v_package_id := acs_object__package_id(new__parent_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_item_id := content_item__new (
new__name,
new__parent_id,
@@ -155,7 +163,8 @@
new__mime_type,
new__nls_language,
null,
- ''file'' -- storage_type
+ ''file'' -- storage_type,
+ v_package_id
);
-- update cr_child_rels to have the correct relation_tag
@@ -176,7 +185,8 @@
new__revision_id,
new__creation_date,
new__creation_user,
- new__creation_ip
+ new__creation_ip,
+ v_package_id
);
insert into images
@@ -201,10 +211,50 @@
return v_item_id;
end; ' language 'plpgsql';
+create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,boolean,timestamptz,varchar,integer,integer,integer
+ ) returns integer as '
+ declare
+ new__name alias for $1;
+ new__parent_id alias for $2; -- default null
+ new__item_id alias for $3; -- default null
+ new__revision_id alias for $4; -- default null
+ new__mime_type alias for $5; -- default jpeg
+ new__creation_user alias for $6; -- default null
+ new__creation_ip alias for $7; -- default null
+ new__relation_tag alias for $8; -- default null
+ new__title alias for $9; -- default null
+ new__description alias for $10; -- default null
+ new__is_live alias for $11; -- default f
+ new__publish_date alias for $12; -- default now()
+ new__path alias for $13;
+ new__file_size alias for $14;
+ new__height alias for $15;
+ new__width alias for $16;
+ begin
+ return image__new(new__name,
+ new__parent_id,
+ new__item_id,
+ new__revision_id,
+ new__mime_type,
+ new__creation_user,
+ new__creation_ip,
+ new__relation_tag,
+ new__title,
+ new__description,
+ new__is_live,
+ new__publish_date,
+ new__path,
+ new__file_size,
+ new__height,
+ new__width,
+ null
+ );
+end; ' language 'plpgsql';
+
-- DRB's version
create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,varchar,
- varchar,timestamptz,integer, integer) returns integer as '
+ varchar,timestamptz,integer, integer, integer) returns integer as '
declare
p_name alias for $1;
p_parent_id alias for $2; -- default null
@@ -221,15 +271,23 @@
p_publish_date alias for $13;
p_height alias for $14;
p_width alias for $15;
+ p_package_id alias for $16; -- default null
v_item_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
if content_item__is_subclass(p_content_type, ''image'') = ''f'' then
raise EXCEPTION ''-20000: image__new can only be called for an image type'';
end if;
+ if p_package_id is null then
+ v_package_id := acs_object__package_id(p_parent_id);
+ else
+ v_package_id := p_package_id;
+ end if;
+
v_item_id := content_item__new (
p_name,
p_parent_id,
@@ -246,7 +304,8 @@
null,
null,
null,
- p_storage_type
+ p_storage_type,
+ v_package_id
);
-- We will let the caller fill in the LOB data or file path.
@@ -262,7 +321,8 @@
p_revision_id,
current_timestamp,
p_creation_user,
- p_creation_ip
+ p_creation_ip,
+ v_package_id
);
insert into images
@@ -273,9 +333,47 @@
return v_item_id;
end; ' language 'plpgsql';
+create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,varchar,
+ varchar,timestamptz,integer, integer) returns integer as '
+ declare
+ p_name alias for $1;
+ p_parent_id alias for $2; -- default null
+ p_item_id alias for $3; -- default null
+ p_revision_id alias for $4; -- default null
+ p_mime_type alias for $5; -- default jpeg
+ p_creation_user alias for $6; -- default null
+ p_creation_ip alias for $7; -- default null
+ p_title alias for $8; -- default null
+ p_description alias for $9; -- default null
+ p_storage_type alias for $10;
+ p_content_type alias for $11;
+ p_nls_language alias for $12;
+ p_publish_date alias for $13;
+ p_height alias for $14;
+ p_width alias for $15;
+ begin
+ return image__new(p_name,
+ p_parent_id,
+ p_item_id,
+ p_revision_id,
+ p_mime_type,
+ p_creation_user,
+ p_creation_ip,
+ p_title,
+ p_description,
+ p_storage_type,
+ p_content_type,
+ p_nls_language,
+ p_publish_date,
+ p_height,
+ p_width,
+ null
+ );
+end; ' language 'plpgsql';
+
create or replace function image__new_revision(integer, integer, varchar, varchar, timestamptz, varchar, varchar,
- integer, varchar, integer, integer) returns integer as '
+ integer, varchar, integer, integer, integer) returns integer as '
declare
p_item_id alias for $1;
p_revision_id alias for $2;
@@ -288,10 +386,18 @@
p_creation_ip alias for $9;
p_height alias for $10;
p_width alias for $11;
+ p_package_id alias for $12;
v_revision_id integer;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- We will let the caller fill in the LOB data or file path.
+ if p_package_id is null then
+ v_package_id := acs_object__package_id(p_item_id);
+ else
+ v_package_id := p_package_id;
+ end if;
+
v_revision_id := content_revision__new (
p_title,
p_description,
@@ -303,7 +409,8 @@
p_revision_id,
current_timestamp,
p_creation_user,
- p_creation_ip
+ p_creation_ip,
+ p_package_id
);
insert into images
@@ -314,6 +421,39 @@
return v_revision_id;
end;' language 'plpgsql';
+create or replace function image__new_revision(integer,integer,varchar,varchar,timestamptz,varchar,varchar,
+ integer,varchar,integer,integer) returns integer as '
+declare
+ p_item_id alias for $1;
+ p_revision_id alias for $2;
+ p_title alias for $3;
+ p_description alias for $4;
+ p_publish_date alias for $5;
+ p_mime_type alias for $6;
+ p_nls_language alias for $7;
+ p_creation_user alias for $8;
+ p_creation_ip alias for $9;
+ p_height alias for $10;
+ p_width alias for $11;
+ v_revision_id integer;
+begin
+ return image__new_revision(p_item_id,
+ p_revision_id,
+ p_title,
+ p_description,
+ p_publish_date,
+ p_mime_type,
+ p_nls_language,
+ p_creation_user,
+ p_creation_ip,
+ p_height,
+ p_width,
+ p_revision_id,
+ null
+ );
+
+end;' language 'plpgsql';
+
create function image__delete (integer)
returns integer as '
declare
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v
diff -u -r1.50 -r1.51
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 4 Mar 2004 14:52:36 -0000 1.50
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 12 Mar 2004 18:48:47 -0000 1.51
@@ -10,7 +10,7 @@
-- License. Full text of the license is available from the GNU Project:
-- http://www.fsf.org/copyleft/gpl.html
-create view content_item_globals as
+create or replace view content_item_globals as
select -100 as c_root_folder_id;
create or replace function content_item__get_root_folder (integer)
@@ -64,7 +64,8 @@
cr_revisions.content%TYPE,
cr_child_rels.relation_tag%TYPE,
boolean,
- cr_items.storage_type%TYPE
+ cr_items.storage_type%TYPE,
+ acs_objects.package_id%TYPE
) returns integer as '
declare
new__name alias for $1;
@@ -86,6 +87,7 @@
new__relation_tag alias for $17;
new__is_live alias for $18;
new__storage_type alias for $19;
+ new__package_id alias for $20;
v_parent_id cr_items.parent_id%TYPE;
v_parent_type acs_objects.object_type%TYPE;
v_item_id cr_items.item_id%TYPE;
@@ -94,6 +96,7 @@
v_rel_id acs_objects.object_id%TYPE;
v_rel_tag cr_child_rels.relation_tag%TYPE;
v_context_id acs_objects.context_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_storage_type cr_items.storage_type%TYPE;
begin
@@ -113,6 +116,12 @@
v_context_id := new__context_id;
end if;
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(content_item__get_root_folder(v_parent_id));
+ else
+ v_package_id := new__package_id;
+ end if;
+
if v_parent_id = 0 or
content_folder__is_folder(v_parent_id) = ''t'' then
@@ -155,7 +164,10 @@
new__creation_date,
new__creation_user,
new__creation_ip,
- v_context_id
+ v_context_id,
+ ''t'',
+ new__name,
+ v_package_id
);
@@ -175,7 +187,10 @@
now(),
null,
null,
- v_parent_id
+ v_parent_id,
+ ''t'',
+ v_rel_tag || '': '' || v_parent_id || '' - '' || v_item_id,
+ v_package_id
);
insert into cr_child_rels (
@@ -208,7 +223,8 @@
null,
new__creation_date,
new__creation_user,
- new__creation_ip
+ new__creation_ip,
+ v_package_id
);
elsif new__text is not null or new__title is not null then
@@ -224,7 +240,8 @@
null,
new__creation_date,
new__creation_user,
- new__creation_ip
+ new__creation_ip,
+ v_package_id
);
end if;
@@ -238,8 +255,61 @@
end;' language 'plpgsql';
+create or replace function content_item__new (
+ cr_items.name%TYPE,
+ cr_items.parent_id%TYPE,
+ acs_objects.object_id%TYPE,
+ cr_items.locale%TYPE,
+ acs_objects.creation_date%TYPE,
+ acs_objects.creation_user%TYPE,
+ acs_objects.context_id%TYPE,
+ acs_objects.creation_ip%TYPE,
+ acs_object_types.object_type%TYPE,
+ acs_object_types.object_type%TYPE,
+ cr_revisions.title%TYPE,
+ cr_revisions.description%TYPE,
+ cr_revisions.mime_type%TYPE,
+ cr_revisions.nls_language%TYPE,
+ varchar,
+ cr_revisions.content%TYPE,
+ cr_child_rels.relation_tag%TYPE,
+ boolean,
+ cr_items.storage_type%TYPE
+) returns integer as '
+declare
+ new__name alias for $1;
+ new__parent_id alias for $2;
+ new__item_id alias for $3;
+ new__locale alias for $4;
+ new__creation_date alias for $5;
+ new__creation_user alias for $6;
+ new__context_id alias for $7;
+ new__creation_ip alias for $8;
+ new__item_subtype alias for $9;
+ new__content_type alias for $10;
+ new__title alias for $11;
+ new__description alias for $12;
+ new__mime_type alias for $13;
+ new__nls_language alias for $14;
+ new__text alias for $15;
+ new__data alias for $16;
+ new__relation_tag alias for $17;
+ new__is_live alias for $18;
+ new__storage_type alias for $19;
+ v_item_id cr_items.item_id%TYPE;
+begin
+ v_item_id := content_item__new (new__name, new__parent_id, new__item_id, new__locale,
+ new__creation_date, new__creation_user, new__context_id, new__creation_ip,
+ new__item_subtype, new__content_type, new__title, new__description,
+ new__mime_type, new__nls_language, new__text, new__data, new__relation_tag,
+ new__is_live, new__storage_type, null);
+
+ return v_item_id;
+
+end;' language 'plpgsql';
+
--
-create or replace function content_item__new (varchar,integer,integer,varchar,timestamptz,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar)
+create or replace function content_item__new (varchar,integer,integer,varchar,timestamptz,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer)
returns integer as '
declare
new__name alias for $1;
@@ -258,6 +328,7 @@
new__nls_language alias for $14; -- default null
new__text alias for $15; -- default null
new__storage_type alias for $16; -- check in (''text'',''file'')
+ new__package_id alias for $17; -- default null
new__relation_tag varchar default null;
new__is_live boolean default ''f'';
@@ -269,6 +340,7 @@
v_rel_id acs_objects.object_id%TYPE;
v_rel_tag cr_child_rels.relation_tag%TYPE;
v_context_id acs_objects.context_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- place the item in the context of the pages folder if no
@@ -287,6 +359,12 @@
v_context_id := new__context_id;
end if;
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(content_item__get_root_folder(v_parent_id));
+ else
+ v_package_id := new__package_id;
+ end if;
+
if v_parent_id = 0 or
content_folder__is_folder(v_parent_id) = ''t'' then
@@ -322,7 +400,10 @@
new__creation_date,
new__creation_user,
new__creation_ip,
- v_context_id
+ v_context_id,
+ ''t'',
+ new__name,
+ v_package_id
);
insert into cr_items (
@@ -336,22 +417,25 @@
content_folder__is_folder(v_parent_id) = ''f'' and
content_item__is_valid_child(v_parent_id, new__content_type) = ''t'' then
+ if new__relation_tag is null then
+ v_rel_tag := content_item__get_content_type(v_parent_id)
+ || ''-'' || new__content_type;
+ else
+ v_rel_tag := new__relation_tag;
+ end if;
+
v_rel_id := acs_object__new(
null,
''cr_item_child_rel'',
now(),
null,
null,
- v_parent_id
+ v_parent_id,
+ ''t'',
+ v_rel_tag || '': '' || v_parent_id || '' - '' || v_item_id,
+ v_package_id
);
- if new__relation_tag is null then
- v_rel_tag := content_item__get_content_type(v_parent_id)
- || ''-'' || new__content_type;
- else
- v_rel_tag := new__relation_tag;
- end if;
-
insert into cr_child_rels (
rel_id, parent_id, child_id, relation_tag, order_n
) values (
@@ -381,7 +465,8 @@
null,
new__creation_date,
new__creation_user,
- new__creation_ip
+ new__creation_ip,
+ v_package_id
);
end if;
@@ -395,7 +480,7 @@
end;' language 'plpgsql';
-create or replace function content_item__new (varchar,integer,integer,varchar,timestamptz,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer)
+create or replace function content_item__new (varchar,integer,integer,varchar,timestamptz,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar)
returns integer as '
declare
new__name alias for $1;
@@ -412,8 +497,39 @@
new__description alias for $12; -- default null
new__mime_type alias for $13; -- default ''text/plain''
new__nls_language alias for $14; -- default null
+ new__text alias for $15; -- default null
+ new__storage_type alias for $16; -- check in (''text'',''file'')
+ v_item_id cr_items.item_id%TYPE;
+begin
+ v_item_id := content_item__new (new__name, new__parent_id, new__item_id, new__locale,
+ new__creation_date, new__creation_user, new__context_id, new__creation_ip,
+ new__item_subtype, new__content_type, new__title, new__description,
+ new__mime_type, new__nls_language, new__text, new__storage_type, null);
+
+ return v_item_id;
+
+end;' language 'plpgsql';
+
+create or replace function content_item__new (varchar,integer,integer,varchar,timestamptz,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer,integer)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__parent_id alias for $2; -- default null
+ new__item_id alias for $3; -- default null
+ new__locale alias for $4; -- default null
+ new__creation_date alias for $5; -- default now()
+ new__creation_user alias for $6; -- default null
+ new__context_id alias for $7; -- default null
+ new__creation_ip alias for $8; -- default null
+ new__item_subtype alias for $9; -- default ''content_item''
+ new__content_type alias for $10; -- default ''content_revision''
+ new__title alias for $11; -- default null
+ new__description alias for $12; -- default null
+ new__mime_type alias for $13; -- default ''text/plain''
+ new__nls_language alias for $14; -- default null
-- changed to integer for blob_id
new__data alias for $15; -- default null
+ new__package_id alias for $16; -- default null
new__relation_tag varchar default null;
new__is_live boolean default ''f'';
@@ -425,6 +541,7 @@
v_rel_id acs_objects.object_id%TYPE;
v_rel_tag cr_child_rels.relation_tag%TYPE;
v_context_id acs_objects.context_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- place the item in the context of the pages folder if no
@@ -443,6 +560,12 @@
v_context_id := new__context_id;
end if;
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(content_item__get_root_folder(v_parent_id));
+ else
+ v_package_id := new__package_id;
+ end if;
+
if v_parent_id = 0 or
content_folder__is_folder(v_parent_id) = ''t'' then
@@ -478,7 +601,10 @@
new__creation_date,
new__creation_user,
new__creation_ip,
- v_context_id
+ v_context_id,
+ ''t'',
+ new__name,
+ v_package_id
);
insert into cr_items (
@@ -492,22 +618,25 @@
content_folder__is_folder(v_parent_id) = ''f'' and
content_item__is_valid_child(v_parent_id, new__content_type) = ''t'' then
+ if new__relation_tag is null or new__relation_tag = '''' then
+ v_rel_tag := content_item__get_content_type(v_parent_id)
+ || ''-'' || new__content_type;
+ else
+ v_rel_tag := new__relation_tag;
+ end if;
+
v_rel_id := acs_object__new(
null,
''cr_item_child_rel'',
now(),
null,
null,
v_parent_id
+ ''t'',
+ v_rel_tag || '': '' || v_parent_id || '' - '' || v_item_id,
+ v_package_id
);
- if new__relation_tag is null or new__relation_tag = '''' then
- v_rel_tag := content_item__get_content_type(v_parent_id)
- || ''-'' || new__content_type;
- else
- v_rel_tag := new__relation_tag;
- end if;
-
insert into cr_child_rels (
rel_id, parent_id, child_id, relation_tag, order_n
) values (
@@ -540,7 +669,8 @@
null,
new__creation_date,
new__creation_user,
- new__creation_ip
+ new__creation_ip,
+ v_package_id
);
end if;
@@ -554,14 +684,45 @@
end;' language 'plpgsql';
-create or replace function content_item__new(varchar,integer,varchar,text,text)
+create or replace function content_item__new (varchar,integer,integer,varchar,timestamptz,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer)
returns integer as '
declare
+ new__name alias for $1;
+ new__parent_id alias for $2; -- default null
+ new__item_id alias for $3; -- default null
+ new__locale alias for $4; -- default null
+ new__creation_date alias for $5; -- default now()
+ new__creation_user alias for $6; -- default null
+ new__context_id alias for $7; -- default null
+ new__creation_ip alias for $8; -- default null
+ new__item_subtype alias for $9; -- default ''content_item''
+ new__content_type alias for $10; -- default ''content_revision''
+ new__title alias for $11; -- default null
+ new__description alias for $12; -- default null
+ new__mime_type alias for $13; -- default ''text/plain''
+ new__nls_language alias for $14; -- default null
+-- changed to integer for blob_id
+ new__data alias for $15; -- default null
+ v_item_id cr_items.item_id%TYPE;
+begin
+ v_item_id := content_item__new (new__name, new__parent_id, new__item_id, new__locale,
+ new__creation_date, new__creation_user, new__context_id, new__creation_ip,
+ new__item_subtype, new__content_type, new__title, new__description,
+ new__mime_type, new__nls_language, new__data, null);
+
+ return v_item_id;
+
+end;' language 'plpgsql';
+
+create or replace function content_item__new(varchar,integer,varchar,text,text,integer)
+returns integer as '
+declare
new__name alias for $1;
new__parent_id alias for $2; -- default null
new__title alias for $3; -- default null
new__description alias for $4; -- default null
new__text alias for $5; -- default null
+ new__package_id alias for $6; -- default null
begin
return content_item__new(new__name,
new__parent_id,
@@ -578,27 +739,47 @@
''text/plain'',
null,
new__text,
- ''text''
+ ''text'',
+ new__package_id
);
end;' language 'plpgsql';
+create or replace function content_item__new(varchar,integer,varchar,text,text)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__parent_id alias for $2; -- default null
+ new__title alias for $3; -- default null
+ new__description alias for $4; -- default null
+ new__text alias for $5; -- default null
+begin
+ return content_item__new(new__name, new__parent_id, new__title, new__description,
+ new__text, null);
+
+end;' language 'plpgsql';
+
+create or replace function content_item__new(varchar,integer,integer) returns integer as '
+declare
+ new__name alias for $1;
+ new__parent_id alias for $2;
+ new__package_id alias for $3;
+begin
+ return content_item__new(new__name, new__parent_id, null, null, null, new__package_id);
+end;' language 'plpgsql';
+
create or replace function content_item__new(varchar,integer) returns integer as '
declare
new__name alias for $1;
new__parent_id alias for $2;
begin
- return content_item__new(new__name,
- new__parent_id,
- null,
- null,
- null);
+ return content_item__new(new__name, new__parent_id, null, null, null, null);
+
end;' language 'plpgsql';
-- function new -- sets security_inherit_p to FALSE -DaveB
-create or replace function content_item__new ( integer, varchar, integer, varchar, timestamptz, integer, integer, varchar, boolean, varchar, text, varchar, boolean, varchar,varchar,varchar)
-
+create or replace function content_item__new ( integer, varchar, integer, varchar, timestamptz, integer, integer, varchar, boolean, varchar, text, varchar, boolean, varchar,varchar,varchar,integer)
returns integer as '
declare
new__item_id alias for $1; --default null
@@ -617,6 +798,7 @@
new__storage_area_key alias for $14; -- default ''CR_FILES''
new__item_subtype alias for $15;
new__content_type alias for $16;
+ new__package_id alias for $17; -- default null
new__description varchar default null;
new__relation_tag varchar default null;
new__nls_language varchar default null;
@@ -628,6 +810,7 @@
v_rel_id acs_objects.object_id%TYPE;
v_rel_tag cr_child_rels.relation_tag%TYPE;
v_context_id acs_objects.context_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
-- place the item in the context of the pages folder if no
@@ -646,6 +829,12 @@
v_context_id := new__context_id;
end if;
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(content_item__get_root_folder(v_parent_id));
+ else
+ v_package_id := new__package_id;
+ end if;
+
if v_parent_id = 0 or
content_folder__is_folder(v_parent_id) = ''t'' then
@@ -683,7 +872,9 @@
new__creation_user,
new__creation_ip,
v_context_id,
- new__security_inherit_p
+ new__security_inherit_p,
+ new__name,
+ v_package_id
);
insert into cr_items (
@@ -698,23 +889,25 @@
content_folder__is_folder(v_parent_id) = ''f'' and
content_item__is_valid_child(v_parent_id, new__content_type) = ''t'' then
+ if new__relation_tag is null then
+ v_rel_tag := content_item__get_content_type(v_parent_id)
+ || ''-'' || new__content_type;
+ else
+ v_rel_tag := new__relation_tag;
+ end if;
+
v_rel_id := acs_object__new(
null,
''cr_item_child_rel'',
new__creation_date,
null,
null,
v_parent_id,
- ''f''
+ ''f'',
+ v_rel_tag || '': '' || v_parent_id || '' - '' || v_item_id,
+ v_package_id
);
- if new__relation_tag is null then
- v_rel_tag := content_item__get_content_type(v_parent_id)
- || ''-'' || new__content_type;
- else
- v_rel_tag := new__relation_tag;
- end if;
-
insert into cr_child_rels (
rel_id, parent_id, child_id, relation_tag, order_n
) values (
@@ -744,7 +937,8 @@
null,
new__creation_date,
new__creation_user,
- new__creation_ip
+ new__creation_ip,
+ v_package_id
);
end if;
@@ -758,6 +952,37 @@
end;' language 'plpgsql';
+create or replace function content_item__new ( integer, varchar, integer, varchar, timestamptz, integer, integer, varchar, boolean, varchar, text, varchar, boolean, varchar,varchar,varchar)
+returns integer as '
+declare
+ new__item_id alias for $1; --default null
+ new__name alias for $2;
+ new__parent_id alias for $3; -- default null
+ new__title alias for $4; -- default null
+ new__creation_date alias for $5; -- default now()
+ new__creation_user alias for $6; -- default null
+ new__context_id alias for $7; -- default null
+ new__creation_ip alias for $8; -- default null
+ new__is_live alias for $9; -- default ''f''
+ new__mime_type alias for $10;
+ new__text alias for $11; -- default null
+ new__storage_type alias for $12; -- check in (''text'', ''file'')
+ new__security_inherit_p alias for $13; -- default ''t''
+ new__storage_area_key alias for $14; -- default ''CR_FILES''
+ new__item_subtype alias for $15;
+ new__content_type alias for $16;
+ v_item_id cr_items.item_id%TYPE;
+begin
+ v_item_id := content_item__new (new__item_id, new__name, new__parent_id, new__title,
+ new__creation_date, new__creation_user, new__context_id, new__creation_ip,
+ new__is_live, new__mime_type, new__text, new__storage_type,
+ new__security_inherit_p, new__storage_area_key, new__item_subtype,
+ new__content_type, null);
+
+ return v_item_id;
+
+end;' language 'plpgsql';
+
create or replace function content_item__is_published (integer)
returns boolean as '
declare
@@ -1169,6 +1394,10 @@
update cr_items
set name = rename__name
where item_id = rename__item_id;
+
+ update acs_objects
+ set title = rename__name
+ where object_id = rename__item_id;
else
if exists_id != rename__item_id then
raise EXCEPTION ''-20000: An item with the name % already exists in this directory.'', rename__name;
@@ -2044,8 +2273,14 @@
where item_id = move__item_id;
end if;
- end if; end if;
+ if move__name is not null then
+ update acs_objects
+ set title = move__name
+ where object_id = move__item_id;
+ end if;
+ end if;
+
return 0;
end;' language 'plpgsql';
@@ -2413,6 +2648,7 @@
v_object_type acs_objects.object_type%TYPE;
v_is_valid integer;
v_rel_id integer;
+ v_package_id integer;
v_exists integer;
v_order_n cr_item_rels.order_n%TYPE;
begin
@@ -2453,6 +2689,8 @@
v_exists := 0;
end if;
+ v_package_id := acs_object__package_id(relate__item_id);
+
-- if order_n is null, use rel_id (the order the item was related)
if relate__order_n is null then
v_order_n := v_rel_id;
@@ -2470,8 +2708,12 @@
now(),
null,
null,
- relate__item_id
+ relate__item_id,
+ ''t'',
+ relate__relation_tag || '': '' || relate__item_id || '' - '' || relate__object_id,
+ v_package_id
);
+
insert into cr_item_rels (
rel_id, item_id, related_object_id, order_n, relation_tag
) values (
@@ -2487,6 +2729,10 @@
order_n = v_order_n
where
rel_id = v_rel_id;
+
+ update acs_objects set
+ title = relate__relation_tag || '': '' || relate__item_id || '' - '' || relate__object_id
+ where object_id = v_rel_id;
end if;
end if;
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql 4 Mar 2004 14:52:36 -0000 1.20
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql 12 Mar 2004 18:48:47 -0000 1.21
@@ -52,6 +52,10 @@
where
keyword_id = set_heading__keyword_id;
+ update acs_objects
+ set title = set_heading__heading
+ where object_id = set_heading__keyword_id;
+
return 0;
end;' language 'plpgsql';
@@ -94,7 +98,7 @@
select define_function_args('content_keyword__new','heading,description,parent_id,keyword_id,creation_date;now,creation_user,creation_ip,object_type;content_keyword');
-create or replace function content_keyword__new (varchar,varchar,integer,integer,timestamptz,integer,varchar,varchar)
+create or replace function content_keyword__new (varchar,varchar,integer,integer,timestamptz,integer,varchar,varchar,integer)
returns integer as '
declare
new__heading alias for $1;
@@ -105,15 +109,26 @@
new__creation_user alias for $6; -- default null
new__creation_ip alias for $7; -- default null
new__object_type alias for $8; -- default ''content_keyword''
+ new__package_id alias for $9; -- default null
v_id integer;
+ v_package_id acs_objects.package_id%TYPE;
begin
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(new__parent_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_id := acs_object__new (new__keyword_id,
new__object_type,
new__creation_date,
new__creation_user,
new__creation_ip,
- new__parent_id
+ new__parent_id,
+ ''t'',
+ new__heading,
+ v_package_id
);
insert into cr_keywords
@@ -125,7 +140,31 @@
end;' language 'plpgsql';
+create or replace function content_keyword__new (varchar,varchar,integer,integer,timestamptz,integer,varchar,varchar)
+returns integer as '
+declare
+ new__heading alias for $1;
+ new__description alias for $2; -- default null
+ new__parent_id alias for $3; -- default null
+ new__keyword_id alias for $4; -- default null
+ new__creation_date alias for $5; -- default now()
+ new__creation_user alias for $6; -- default null
+ new__creation_ip alias for $7; -- default null
+ new__object_type alias for $8; -- default ''content_keyword''
+begin
+ return content_keyword__new(new__heading,
+ new__description,
+ new__parent_id,
+ new__keyword_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ new__object_type,
+ null
+ );
+end;' language 'plpgsql';
+
-- procedure delete
create or replace function content_keyword__delete (integer)
returns integer as '
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v
diff -u -r1.35 -r1.36
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 4 Mar 2004 14:52:36 -0000 1.35
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 12 Mar 2004 18:48:47 -0000 1.36
@@ -19,7 +19,7 @@
-- than the standard package_instantiate_object. So we don't bother calling define_function_args
-- here.
-create or replace function content_revision__new (varchar,varchar,timestamptz,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar)
+create or replace function content_revision__new (varchar,varchar,timestamptz,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
new__title alias for $1;
@@ -34,19 +34,30 @@
new__creation_date alias for $9; -- default now()
new__creation_user alias for $10; -- default null
new__creation_ip alias for $11; -- default null
+ new__package_id alias for $12; -- default null
v_revision_id integer;
+ v_package_id acs_objects.package_id%TYPE;
v_content_type acs_object_types.object_type%TYPE;
begin
v_content_type := content_item__get_content_type(new__item_id);
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(new__item_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_revision_id := acs_object__new(
new__revision_id,
v_content_type,
new__creation_date,
new__creation_user,
new__creation_ip,
- new__item_id
+ new__item_id,
+ ''t'',
+ new__title,
+ v_package_id
);
-- binary data is stored in cr_revisions using Dons lob hack.
@@ -71,6 +82,64 @@
end;' language 'plpgsql';
+create or replace function content_revision__new (varchar,varchar,timestamptz,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar)
+returns integer as '
+declare
+ new__title alias for $1;
+ new__description alias for $2; -- default null
+ new__publish_date alias for $3; -- default now()
+ new__mime_type alias for $4; -- default ''text/plain''
+ new__nls_language alias for $5; -- default null
+ -- lob id
+ new__data alias for $6;
+ new__item_id alias for $7;
+ new__revision_id alias for $8; -- default null
+ new__creation_date alias for $9; -- default now()
+ new__creation_user alias for $10; -- default null
+ new__creation_ip alias for $11; -- default null
+begin
+ return content_revision__new(new__title,
+ new__description,
+ new__publish_date,
+ new__mime_type,
+ new__nls_language,
+ new__data,
+ new__item_id,
+ new__revision_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ null
+ );
+end;' language 'plpgsql';
+
+create or replace function content_revision__new(varchar,varchar,timestamptz,varchar,text,integer,integer) returns integer as '
+declare
+ new__title alias for $1;
+ new__description alias for $2; -- default null
+ new__publish_date alias for $3; -- default now()
+ new__mime_type alias for $4; -- default ''text/plain''
+ new__text alias for $5; -- default '' ''
+ new__item_id alias for $6;
+ new__package_id alias for $7; -- default null
+begin
+ return content_revision__new(new__title,
+ new__description,
+ new__publish_date,
+ new__mime_type,
+ null,
+ new__text,
+ new__item_id,
+ null,
+ now(),
+ null,
+ null,
+ null,
+ new__package_id
+ );
+
+end;' language 'plpgsql';
+
create or replace function content_revision__new(varchar,varchar,timestamptz,varchar,text,integer) returns integer as '
declare
new__title alias for $1;
@@ -90,6 +159,8 @@
null,
now(),
null,
+ null,
+ null,
null
);
@@ -121,11 +192,11 @@
new__creation_date,
new__creation_user,
new__creation_ip,
+ null,
null
);
end;' language 'plpgsql';
--- function new
create or replace function content_revision__new (varchar,varchar,timestamptz,varchar,varchar,text,integer,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
@@ -141,21 +212,65 @@
new__creation_user alias for $10; -- default null
new__creation_ip alias for $11; -- default null
new__content_length alias for $12; -- default null
+begin
+ return content_revision__new(new__title,
+ new__description,
+ new__publish_date,
+ new__mime_type,
+ new__nls_language,
+ new__text,
+ new__item_id,
+ new__revision_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ new__content_length,
+ null
+ );
+end;' language 'plpgsql';
+
+-- function new
+create or replace function content_revision__new (varchar,varchar,timestamptz,varchar,varchar,text,integer,integer,timestamptz,integer,varchar,integer,integer)
+returns integer as '
+declare
+ new__title alias for $1;
+ new__description alias for $2; -- default null
+ new__publish_date alias for $3; -- default now()
+ new__mime_type alias for $4; -- default ''text/plain''
+ new__nls_language alias for $5; -- default null
+ new__text alias for $6; -- default '' ''
+ new__item_id alias for $7;
+ new__revision_id alias for $8; -- default null
+ new__creation_date alias for $9; -- default now()
+ new__creation_user alias for $10; -- default null
+ new__creation_ip alias for $11; -- default null
+ new__content_length alias for $12; -- default null
+ new__package_id alias for $13; -- default null
v_revision_id integer;
+ v_package_id acs_objects.package_id%TYPE;
v_content_type acs_object_types.object_type%TYPE;
v_storage_type cr_items.storage_type%TYPE;
v_length cr_revisions.content_length%TYPE;
begin
v_content_type := content_item__get_content_type(new__item_id);
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(new__item_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_revision_id := acs_object__new(
new__revision_id,
v_content_type,
new__creation_date,
new__creation_user,
new__creation_ip,
- new__item_id
+ new__item_id,
+ ''t'',
+ v_package_id,
+ new__title
);
select storage_type into v_storage_type
@@ -266,7 +381,9 @@
copy__creation_ip as creation_ip,
now() as last_modified,
copy__creation_user as modifying_user,
- copy__creation_ip as modifying_ip
+ copy__creation_ip as modifying_ip,
+ title,
+ package_id
from
acs_objects
where
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql 4 Mar 2004 14:52:36 -0000 1.17
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql 12 Mar 2004 18:48:47 -0000 1.18
@@ -14,7 +14,7 @@
select define_function_args('content_symlink__new','name,label,target_id,parent_id,symlink_id,creation_date;now,creation_user,creation_ip');
-create or replace function content_symlink__new (varchar,varchar,integer,integer,integer,timestamptz,integer,varchar)
+create or replace function content_symlink__new (varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
new__name alias for $1; -- default null
@@ -25,7 +25,9 @@
new__creation_date alias for $6; -- default now()
new__creation_user alias for $7; -- default null
new__creation_ip alias for $8; -- default null
+ new__package_id alias for $9; -- default null
v_symlink_id cr_symlinks.symlink_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_name cr_items.name%TYPE;
v_label cr_symlinks.label%TYPE;
v_ctype varchar;
@@ -80,6 +82,12 @@
v_label := new__label;
end if;
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(new__parent_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_symlink_id := content_item__new(
v_name,
new__parent_id,
@@ -96,19 +104,49 @@
''text/plain'',
null,
null,
- ''text''
+ ''text'',
+ v_package_id
);
insert into cr_symlinks
(symlink_id, target_id, label)
values
(v_symlink_id, new__target_id, v_label);
+ update acs_objects
+ set title = v_label
+ where object_id = v_symlink_id;
+
return v_symlink_id;
end;' language 'plpgsql';
+create or replace function content_symlink__new (varchar,varchar,integer,integer,integer,timestamptz,integer,varchar)
+returns integer as '
+declare
+ new__name alias for $1; -- default null
+ new__label alias for $2; -- default null
+ new__target_id alias for $3;
+ new__parent_id alias for $4;
+ new__symlink_id alias for $5; -- default null
+ new__creation_date alias for $6; -- default now()
+ new__creation_user alias for $7; -- default null
+ new__creation_ip alias for $8; -- default null
+begin
+ return content_extlink__new(new__name,
+ new__label,
+ new__target_id,
+ new__parent_id,
+ new__symlink_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ null
+ );
+
+end;' language 'plpgsql';
+
-- procedure delete
create or replace function content_symlink__delete (integer)
returns integer as '
@@ -205,7 +243,8 @@
null,
now(),
copy__creation_user,
- copy__creation_ip
+ copy__creation_ip,
+ null
);
@@ -217,7 +256,7 @@
return v_symlink_id;
end;' language 'plpgsql';
-create function content_symlink__copy (
+create or replace function content_symlink__copy (
integer,
integer,
integer,
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql 4 Mar 2004 14:52:36 -0000 1.14
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql 12 Mar 2004 18:48:47 -0000 1.15
@@ -29,16 +29,38 @@
null,
now(),
null,
+ null,
null
);
end;' language 'plpgsql';
+create or replace function content_template__new (varchar,integer,integer,timestamptz,integer,varchar)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__parent_id alias for $2; -- default null
+ new__template_id alias for $3; -- default null
+ new__creation_date alias for $4; -- default now()
+ new__creation_user alias for $5; -- default null
+ new__creation_ip alias for $6; -- default null
+begin
+ return content_template__new(new__name,
+ new__parent_id,
+ new__template_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ null
+ );
+
+end;' language 'plpgsql';
+
-- function new
select define_function_args('content_template__new','name,parent_id,template_id,creation_date,creation_user,creation_ip');
-create or replace function content_template__new (varchar,integer,integer,timestamptz,integer,varchar)
+create or replace function content_template__new (varchar,integer,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
new__name alias for $1;
@@ -47,7 +69,9 @@
new__creation_date alias for $4; -- default now()
new__creation_user alias for $5; -- default null
new__creation_ip alias for $6; -- default null
+ new__package_id alias for $7; -- default null
v_template_id cr_templates.template_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_parent_id cr_items.parent_id%TYPE;
begin
@@ -64,6 +88,12 @@
raise EXCEPTION ''-20000: This folder does not allow templates to be created'';
else
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(v_parent_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_template_id := content_item__new (
new__name,
v_parent_id,
@@ -80,7 +110,8 @@
''text/plain'',
null,
null,
- ''text''
+ ''text'',
+ v_package_id
);
insert into cr_templates (
@@ -96,6 +127,27 @@
end;' language 'plpgsql';
+create or replace function content_template__new(varchar,text,bool,integer) returns integer as '
+declare
+ new__name alias for $1;
+ new__text alias for $2;
+ new__is_live alias for $3;
+ new__package_id alias for $4; -- default null
+begin
+ return content_template__new(new__name,
+ null,
+ null,
+ now(),
+ null,
+ null,
+ new__text,
+ new__is_live,
+ new__package_id
+ );
+
+end;' language 'plpgsql';
+
+
create or replace function content_template__new(varchar,text,bool) returns integer as '
declare
new__name alias for $1;
@@ -109,7 +161,8 @@
null,
null,
new__text,
- new__is_live
+ new__is_live,
+ null
);
end;' language 'plpgsql';
@@ -126,7 +179,35 @@
new__creation_ip alias for $6; -- default null
new__text alias for $7; -- default null
new__is_live alias for $8; -- default ''f''
+begin
+ return content_template__new(new__name,
+ new__parent_id,
+ new__template_id,
+ new__creation_date,
+ new__creation_user,
+ new__creation_ip,
+ new__text,
+ new__is_live,
+ null
+ );
+
+end;' language 'plpgsql';
+
+
+create or replace function content_template__new (varchar,integer,integer,timestamptz,integer,varchar,text,bool,integer)
+returns integer as '
+declare
+ new__name alias for $1;
+ new__parent_id alias for $2; -- default null
+ new__template_id alias for $3; -- default null
+ new__creation_date alias for $4; -- default now()
+ new__creation_user alias for $5; -- default null
+ new__creation_ip alias for $6; -- default null
+ new__text alias for $7; -- default null
+ new__is_live alias for $8; -- default ''f''
+ new__package_id alias for $7; -- default null
v_template_id cr_templates.template_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_parent_id cr_items.parent_id%TYPE;
begin
@@ -143,6 +224,12 @@
raise EXCEPTION ''-20000: This folder does not allow templates to be created'';
else
+ if new__package_id is null then
+ v_package_id := acs_object__package_id(v_parent_id);
+ else
+ v_package_id := new__package_id;
+ end if;
+
v_template_id := content_item__new (
new__template_id, -- new__item_id
new__name, -- new__name
@@ -159,7 +246,8 @@
''t'', -- new__security_inherit_p
''CR_FILES'', -- new__storage_area_key
''content_item'', -- new__item_subtype
- ''content_template'' -- new__content_type
+ ''content_template'', -- new__content_type
+ v_package_id -- new__package_id
);
insert into cr_templates (
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.0d2-5.1.0d3.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-content-repository/tcl/extlink-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/extlink-procs-oracle.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-content-repository/tcl/extlink-procs-oracle.xql 4 Mar 2004 14:52:37 -0000 1.8
+++ openacs-4/packages/acs-content-repository/tcl/extlink-procs-oracle.xql 12 Mar 2004 18:48:48 -0000 1.9
@@ -14,7 +14,8 @@
parent_id => :parent_id,
extlink_id => :extlink_id,
creation_user => :creation_user,
- creation_ip => :creation_ip
+ creation_ip => :creation_ip,
+ package_id => :package_id
);
end;
@@ -27,7 +28,8 @@
update acs_objects
set last_modified = sysdate,
modifying_user = :modifying_user,
- modifying_ip = :modifying_ip
+ modifying_ip = :modifying_ip,
+ title = :label
where object_id = :extlink_id
Index: openacs-4/packages/acs-content-repository/tcl/extlink-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/extlink-procs-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-content-repository/tcl/extlink-procs-postgresql.xql 4 Mar 2004 14:52:37 -0000 1.4
+++ openacs-4/packages/acs-content-repository/tcl/extlink-procs-postgresql.xql 12 Mar 2004 18:48:48 -0000 1.5
@@ -14,7 +14,8 @@
:extlink_id,
current_timestamp,
:creation_user,
- :creation_ip
+ :creation_ip,
+ :package_id
);
@@ -26,7 +27,8 @@
update acs_objects
set last_modified = current_timestamp,
modifying_user = :modifying_user,
- modifying_ip = :modifying_ip
+ modifying_ip = :modifying_ip,
+ title = :label
where object_id = :extlink_id
Index: openacs-4/packages/acs-content-repository/tcl/extlink-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/extlink-procs.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-content-repository/tcl/extlink-procs.tcl 4 Mar 2004 14:52:37 -0000 1.5
+++ openacs-4/packages/acs-content-repository/tcl/extlink-procs.tcl 12 Mar 2004 18:48:48 -0000 1.6
@@ -16,6 +16,7 @@
{-name ""}
{-label ""}
{-description ""}
+ {-package_id ""}
} {
Create a new external link.
@@ -26,12 +27,17 @@
@name Name to assign the object (defaults to "link extlink_id")
@label Label for the extlink (defaults to the URL)
@description An extended description of the link (defaults to NULL)
+ @package_id Package Id of the package that created the link
} {
set creation_user [ad_conn user_id]
set creation_ip [ad_conn peeraddr]
+ if {[empty_string_p $package_id]} {
+ set package_id [ad_conn package_id]
+ }
+
return [db_exec_plsql extlink_new {}]
}
Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs-oracle.xql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-content-repository/tcl/keyword-procs-oracle.xql 4 Mar 2004 14:52:37 -0000 1.7
+++ openacs-4/packages/acs-content-repository/tcl/keyword-procs-oracle.xql 12 Mar 2004 18:48:48 -0000 1.8
@@ -14,7 +14,8 @@
sysdate(),
:user_id,
:creation_ip,
- :object_type
+ :object_type,
+ :package_id
);
end;
Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs-postgresql.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-content-repository/tcl/keyword-procs-postgresql.xql 4 Mar 2004 14:52:37 -0000 1.6
+++ openacs-4/packages/acs-content-repository/tcl/keyword-procs-postgresql.xql 12 Mar 2004 18:48:48 -0000 1.7
@@ -12,7 +12,8 @@
current_timestamp,
:user_id,
:creation_ip,
- :object_type
+ :object_type,
+ :package_id
)
Index: openacs-4/packages/acs-content-repository/tcl/keyword-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/keyword-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-content-repository/tcl/keyword-procs.tcl 4 Mar 2004 14:52:37 -0000 1.6
+++ openacs-4/packages/acs-content-repository/tcl/keyword-procs.tcl 12 Mar 2004 18:48:48 -0000 1.7
@@ -16,12 +16,17 @@
{-parent_id ""}
{-keyword_id ""}
{-object_type "content_keyword"}
+ {-package_id ""}
} {
Create a new keyword
} {
set user_id [ad_conn user_id]
set creation_ip [ad_conn peeraddr]
+ if {[empty_string_p $package_id]} {
+ set package_id [ad_conn package_id]
+ }
+
set keyword_id [db_exec_plsql content_keyword_new {}]
return $keyword_id
Index: openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql 4 Mar 2004 14:52:37 -0000 1.8
+++ openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql 12 Mar 2004 18:48:48 -0000 1.9
@@ -63,7 +63,8 @@
content_type => :image_type,
storage_type => :storage_type,
height => :original_height,
- width => :original_width
+ width => :original_width,
+ package_id => :package_id
);
end;
@@ -81,7 +82,8 @@
creation_user => :creation_user,
creation_ip => :creation_ip,
height => :original_height,
- width => :original_width
+ width => :original_width,
+ package_id => :package_id
);
end;
@@ -98,7 +100,8 @@
creation_user => :creation_user,
creation_ip => :creation_ip,
content_type => :other_type,
- storage_type => :storage_type
+ storage_type => :storage_type,
+ package_id => :package_id
);
end;
@@ -114,7 +117,8 @@
item_id => :item_id,
revision_id => :revision_id,
creation_user => :creation_user,
- creation_ip => :creation_ip
+ creation_ip => :creation_ip,
+ package_id => :package_id
);
end;
Index: openacs-4/packages/acs-content-repository/tcl/revision-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs-postgresql.xql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-content-repository/tcl/revision-procs-postgresql.xql 4 Mar 2004 14:52:37 -0000 1.8
+++ openacs-4/packages/acs-content-repository/tcl/revision-procs-postgresql.xql 12 Mar 2004 18:48:48 -0000 1.9
@@ -61,7 +61,8 @@
/* nls_language => */ null,
/* publish_date => */ current_timestamp,
/* height => */ :original_height,
- /* width => */ :original_width
+ /* width => */ :original_width,
+ /* package_id => */ :package_id
);
@@ -79,7 +80,8 @@
/* creation_user => */ :creation_user,
/* creation_ip => */ :creation_ip,
/* height => */ :original_height,
- /* width => */ :original_width
+ /* width => */ :original_width,
+ /* package_id => */ :package_id
);
@@ -102,7 +104,8 @@
/* mime_type => */ null,
/* nls_language => */ null,
/* text => */ null,
- /* storage_type => */ :storage_type
+ /* storage_type => */ :storage_type,
+ /* package_id => */ :package_id
);
@@ -120,7 +123,8 @@
/* revision_id => */ :revision_id,
/* creation_date => */ current_timestamp,
/* creation_user => */ :creation_user,
- /* creation_ip => */ :creation_ip
+ /* creation_ip => */ :creation_ip,
+ /* package_id => */ :package_id
);
Index: openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 4 Mar 2004 14:52:37 -0000 1.12
+++ openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 12 Mar 2004 18:48:48 -0000 1.13
@@ -88,6 +88,7 @@
{-other_type "content_revision"}
{-title ""}
{-description ""}
+ {-package_id ""}
-item_id
parent_id
tmp_filename
@@ -107,6 +108,7 @@
@param other_type The type of content item to create for a non-image file
@param title The title given the new revision
@param description The description of the new revision
+ @param package_id Package Id of the package that created the item
@param item_id If present, make a new revision of this item, otherwise, make a new
item
@param parent_id The parent of the content item we create
@@ -147,6 +149,10 @@
set mime_type "application/octet-stream"
}
+ if {[empty_string_p $package_id]} {
+ set package_id [ad_conn package_id]
+ }
+
set old_item_p [info exists item_id]
if { !$old_item_p } {
set item_id [db_nextval acs_object_id_seq]
Index: openacs-4/packages/acs-content-repository/tcl/symlink-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/symlink-procs-oracle.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-content-repository/tcl/symlink-procs-oracle.xql 4 Mar 2004 14:52:37 -0000 1.3
+++ openacs-4/packages/acs-content-repository/tcl/symlink-procs-oracle.xql 12 Mar 2004 18:48:48 -0000 1.4
@@ -13,7 +13,8 @@
parent_id => :parent_id,
symlink_id => :symlink_id,
creation_user => :creation_user,
- creation_ip => :creation_ip
+ creation_ip => :creation_ip,
+ package_id => :package_id
);
end;
@@ -26,7 +27,8 @@
update acs_objects
set last_modified = sysdate,
modifying_user = :modifying_user,
- modifying_ip = :modifying_ip
+ modifying_ip = :modifying_ip,
+ title = :label
where object_id = :symlink_id
Index: openacs-4/packages/acs-content-repository/tcl/symlink-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/symlink-procs-postgresql.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-content-repository/tcl/symlink-procs-postgresql.xql 4 Mar 2004 14:52:37 -0000 1.3
+++ openacs-4/packages/acs-content-repository/tcl/symlink-procs-postgresql.xql 12 Mar 2004 18:48:48 -0000 1.4
@@ -13,7 +13,8 @@
:symlink_id,
current_timestamp,
:creation_user,
- :creation_ip
+ :creation_ip,
+ :package_id
);
@@ -25,7 +26,8 @@
update acs_objects
set last_modified = current_timestamp,
modifying_user = :modifying_user,
- modifying_ip = :modifying_ip
+ modifying_ip = :modifying_ip,
+ title = :label
where object_id = :symlink_id
Index: openacs-4/packages/acs-content-repository/tcl/symlink-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/symlink-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-content-repository/tcl/symlink-procs.tcl 4 Mar 2004 14:52:37 -0000 1.3
+++ openacs-4/packages/acs-content-repository/tcl/symlink-procs.tcl 12 Mar 2004 18:48:48 -0000 1.4
@@ -15,6 +15,7 @@
-parent_id:required
{-name ""}
{-label ""}
+ {-package_id ""}
} {
Create a new internal link.
@@ -25,12 +26,17 @@
@name Name to assign the object (defaults to the name of the target item)
@label Label for the symlink (defaults to the URL)
@description An extended description of the link (defaults to NULL)
+ @package_id Package Id of the package that created the link
} {
set creation_user [ad_conn user_id]
set creation_ip [ad_conn peeraddr]
+ if {[empty_string_p $package_id]} {
+ set package_id [ad_conn package_id]
+ }
+
return [db_exec_plsql symlink_new {}]
}
Index: openacs-4/packages/acs-events/sql/oracle/acs-events-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/oracle/acs-events-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-events/sql/oracle/acs-events-create.sql 4 Mar 2004 14:52:38 -0000 1.7
+++ openacs-4/packages/acs-events/sql/oracle/acs-events-create.sql 12 Mar 2004 18:48:48 -0000 1.8
@@ -587,6 +587,7 @@
new_event_id := acs_object.new(
object_id => event_id,
object_type => object_type,
+ title => name,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
Index: openacs-4/packages/acs-events/sql/oracle/activity-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/oracle/activity-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-events/sql/oracle/activity-create.sql 4 Mar 2004 14:52:38 -0000 1.5
+++ openacs-4/packages/acs-events/sql/oracle/activity-create.sql 12 Mar 2004 18:48:48 -0000 1.6
@@ -200,6 +200,7 @@
new_activity_id := acs_object.new(
object_id => activity_id,
object_type => object_type,
+ title => name,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
@@ -265,6 +266,10 @@
html_p = nvl(edit.html_p, html_p),
status_summary = nvl(edit.status_summary, status_summary)
where activity_id = edit.activity_id;
+
+ update acs_objects
+ set title = nvl(edit.name, title)
+ where object_id = edit.activity_id;
end edit;
procedure object_map (
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-events/sql/oracle/upgrade/upgrade-0.4d-0.4d1.sql'.
Fisheye: No comparison available. Pass `N' to diff?
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.9 -r1.10
--- openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql 4 Mar 2004 14:52:39 -0000 1.9
+++ openacs-4/packages/acs-events/sql/postgresql/acs-events-create.sql 12 Mar 2004 18:48:48 -0000 1.10
@@ -479,7 +479,10 @@
new__creation_date, -- creation_date
new__creation_user, -- creation_user
new__creation_ip, -- creation_ip
- new__context_id -- context_id
+ new__context_id, -- context_id
+ ''t'', -- security_inherit_p
+ new__name, -- title
+ null -- package_id
);
insert into acs_events
Index: openacs-4/packages/acs-events/sql/postgresql/activity-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/activity-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-events/sql/postgresql/activity-create.sql 4 Mar 2004 14:52:39 -0000 1.5
+++ openacs-4/packages/acs-events/sql/postgresql/activity-create.sql 12 Mar 2004 18:48:48 -0000 1.6
@@ -198,7 +198,10 @@
new__creation_date, -- creation_date
new__creation_user, -- creation_user
new__creation_ip, -- creation_ip
- new__context_id -- context_id
+ new__context_id, -- context_id
+ ''t'', -- security_inherit_p
+ new__name, -- title
+ null -- package_id
);
insert into acs_activities
@@ -300,6 +303,10 @@
status_summary = coalesce(edit__status_summary, status_summary)
where activity_id = edit__activity_id;
+ update acs_objects
+ set title = coalesce(edit__name, name)
+ where activity_id = edit__activity_id;
+
return 0;
end;' language 'plpgsql';
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-events/sql/postgresql/upgrade/upgrade-0.4d-0.4d1.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql 4 Mar 2004 14:52:40 -0000 1.14
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-create.sql 12 Mar 2004 18:48:49 -0000 1.15
@@ -261,9 +261,9 @@
-- LARS: Make object_id 0 be a user, not a person
insert into acs_objects
- (object_id, object_type)
+ (object_id, object_type, title)
values
- (0, 'user');
+ (0, 'user', 'Unregistered Visitor');
insert into parties
(party_id)
@@ -338,7 +338,8 @@
object_id integer;
begin
object_id := acs_object.new (
- object_id => -3
+ object_id => -3,
+ title => 'Default Context'
);
insert into acs_magic_objects
Index: openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql 4 Mar 2004 14:52:40 -0000 1.16
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql 12 Mar 2004 18:48:49 -0000 1.17
@@ -90,6 +90,26 @@
max_n_values => 1
);
+ attr_id := acs_attribute.create_attribute (
+ object_type => 'acs_object',
+ attribute_name => 'package_id',
+ datatype => 'integer',
+ pretty_name => 'Package ID',
+ pretty_plural => 'Package IDs',
+ min_n_values => 0,
+ max_n_values => 1
+ );
+
+ attr_id := acs_attribute.create_attribute (
+ object_type => 'acs_object',
+ attribute_name => 'title',
+ datatype => 'string',
+ pretty_name => 'Title',
+ pretty_plural => 'Titles',
+ min_n_values => 0,
+ max_n_values => 1
+ );
+
commit;
end;
/
@@ -111,6 +131,8 @@
object_type not null
constraint acs_objects_object_type_fk
references acs_object_types (object_type),
+ title varchar2(1000) default null,
+ package_id integer default null,
context_id constraint acs_objects_context_id_fk
references acs_objects(object_id),
security_inherit_p char(1) default 't' not null,
@@ -134,6 +156,9 @@
create index acs_objects_creation_user_idx on acs_objects (creation_user);
create index acs_objects_modify_user_idx on acs_objects (modifying_user);
+create index acs_objects_package_object_idx on acs_objects (package_id, object_id);
+create index acs_objects_title_idx on acs_objects(title);
+
-- create bitmap index acs_objects_object_type_idx on acs_objects (object_type);
create index acs_objects_object_type_idx on acs_objects (object_type);
@@ -178,6 +203,18 @@
Who last modified the object
';
+comment on column acs_objects.package_id is '
+ Which package instance this object belongs to.
+ Please note that in mid-term this column will replace all
+ package_ids of package specific tables.
+';
+
+comment on column acs_objects.title is '
+ Title of the object if applicable.
+ Please note that in mid-term this column will replace all
+ titles or object_names of package specific tables.
+';
+
-----------------------
-- CONTEXT HIERARCHY --
-----------------------
@@ -384,7 +421,9 @@
creation_user in acs_objects.creation_user%TYPE
default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- context_id in acs_objects.context_id%TYPE default null
+ context_id in acs_objects.context_id%TYPE default null,
+ title in acs_objects.title%TYPE default null,
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE;
procedure del (
@@ -401,6 +440,10 @@
object_id in acs_objects.object_id%TYPE
) return varchar2;
+ function package_id (
+ object_id in acs_objects.object_id%TYPE
+ ) return acs_objects.package_id%TYPE;
+
-- Determine where the attribute is stored and what sql needs to be
-- in the where clause to retreive it
-- Used in get_attribute and set_attribute
@@ -493,11 +536,15 @@
creation_user in acs_objects.creation_user%TYPE
default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- context_id in acs_objects.context_id%TYPE default null
+ context_id in acs_objects.context_id%TYPE default null,
+ title in acs_objects.title%TYPE default null,
+ package_id in acs_objects.package_id%TYPE default null
)
return acs_objects.object_id%TYPE
is
v_object_id acs_objects.object_id%TYPE;
+ v_title acs_objects.title%TYPE;
+ v_object_type_pretty_name acs_object_types.pretty_name%TYPE;
begin
if object_id is null then
select acs_object_id_seq.nextval
@@ -507,11 +554,22 @@
v_object_id := object_id;
end if;
+ if title is null then
+ select pretty_name
+ into v_object_type_pretty_name
+ from acs_object_types
+ where object_type = new.object_type;
+
+ v_title := v_object_type_pretty_name || ' ' || v_object_id;
+ else
+ v_title := title;
+ end if;
+
insert into acs_objects
- (object_id, object_type, context_id,
+ (object_id, object_type, title, package_id, context_id,
creation_date, creation_user, creation_ip)
values
- (v_object_id, object_type, context_id,
+ (v_object_id, object_type, v_title, package_id, context_id,
creation_date, creation_user, creation_ip);
acs_object.initialize_attributes(v_object_id);
@@ -570,14 +628,22 @@
)
return varchar2
is
- object_name varchar2(500);
+ object_name acs_objects.title%TYPE;
v_object_id integer := object_id;
begin
-- Find the name function for this object, which is stored in the
-- name_method column of acs_object_types. Starting with this
-- object's actual type, traverse the type hierarchy upwards until
-- a non-null name_method value is found.
--
+ select title into object_name
+ from acs_objects
+ where object_id = name.object_id;
+
+ if (object_name is not null) then
+ return object_name;
+ end if;
+
for object_type
in (select name_method
from acs_object_types
@@ -619,6 +685,23 @@
return object_type_pretty_name || ' ' || object_id;
end default_name;
+ function package_id (
+ object_id in acs_objects.object_id%TYPE
+ ) return acs_objects.package_id%TYPE
+ is
+ v_package_id acs_objects.package_id%TYPE;
+ begin
+ if object_id is null then
+ return null;
+ end if;
+
+ select package_id into v_package_id
+ from acs_objects
+ where object_id = package_id.object_id;
+
+ return v_package_id;
+ end package_id;
+
procedure get_attribute_storage (
object_id_in in acs_objects.object_id%TYPE,
attribute_name_in in acs_attributes.attribute_name%TYPE,
Index: openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql 4 Mar 2004 14:52:40 -0000 1.6
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql 12 Mar 2004 18:48:49 -0000 1.7
@@ -434,6 +434,7 @@
v_rel_id := acs_object.new (
object_id => rel_id,
object_type => rel_type,
+ title => rel_type || ': ' || object_id_one || ' - ' || object_id_two,
context_id => context_id,
creation_user => creation_user,
creation_ip => creation_ip
Index: openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql,v
diff -u -r1.26 -r1.27
--- openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql 4 Mar 2004 14:52:40 -0000 1.26
+++ openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql 12 Mar 2004 18:48:49 -0000 1.27
@@ -162,6 +162,9 @@
default_locale varchar2(30)
);
+alter table acs_objects add constraint acs_objects_package_id_fk
+foreign key (package_id) references apm_packages(package_id);
+
-- create bitmap index apm_packages_package_key_idx on apm_packages (package_key);
create index apm_packages_package_key_idx on apm_packages (package_key);
@@ -1496,7 +1499,8 @@
-- Create the new parameter.
v_parameter_id := acs_object.new(
object_id => parameter_id,
- object_type => 'apm_parameter'
+ object_type => 'apm_parameter',
+ title => register_parameter.package_key || ': Parameter ' || register_parameter.parameter_name
);
insert into apm_parameters
@@ -1547,6 +1551,13 @@
min_n_values = nvl(update_parameter.min_n_values, min_n_values),
max_n_values = nvl(update_parameter.max_n_values, max_n_values)
where parameter_id = update_parameter.parameter_id;
+
+ update acs_objects
+ set title = (select package_key || ': Parameter ' || parameter_name
+ from apm_parameters
+ where parameter_id = update_parameter.parameter_id)
+ where object_id = update_parameter.parameter_id;
+
return parameter_id;
end;
@@ -1745,12 +1756,18 @@
creation_ip => creation_ip,
context_id => context_id
);
+
if instance_name is null then
v_instance_name := package_key || ' ' || v_package_id;
else
v_instance_name := instance_name;
end if;
+ update acs_objects
+ set title = v_instance_name,
+ package_id = v_package_id
+ where object_id = v_package_id;
+
select package_type into v_package_type
from apm_package_types
where package_key = apm_package.new.package_key;
@@ -1951,7 +1968,8 @@
end if;
v_version_id := acs_object.new(
object_id => v_version_id,
- object_type => 'apm_package_version'
+ object_type => 'apm_package_version',
+ title => package_key || ', Version ' || version_name
);
insert into apm_package_versions
(version_id, package_key, version_name, version_uri, summary, description_format, description,
@@ -2023,6 +2041,12 @@
release_date, vendor, vendor_uri, auto_mount
from apm_package_versions
where version_id = copy.version_id;
+
+ update acs_objects
+ set title = (select v.package_key || ', Version ' || v.version_name
+ from apm_package_versions v
+ where v.version_id = copy.version_id)
+ where object_id = copy.version_id;
insert into apm_package_dependencies(dependency_id, version_id, dependency_type, service_uri, service_version)
select acs_object_id_seq.nextval, v_version_id, dependency_type, service_uri, service_version
@@ -2080,7 +2104,7 @@
else
v_version_id := edit.version_id;
end if;
-
+
update apm_package_versions
set version_uri = edit.version_uri,
summary = edit.summary,
Index: openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql 4 Mar 2004 14:52:40 -0000 1.7
+++ openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql 12 Mar 2004 18:48:49 -0000 1.8
@@ -69,6 +69,7 @@
v_authority_id := acs_object.new(
object_id => new.authority_id,
object_type => new.object_type,
+ title => new.short_name,
creation_date => sysdate(),
creation_user => new.creation_user,
creation_ip => new.creation_ip,
Index: openacs-4/packages/acs-kernel/sql/oracle/community-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/community-core-create.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-kernel/sql/oracle/community-core-create.sql 4 Mar 2004 14:52:40 -0000 1.12
+++ openacs-4/packages/acs-kernel/sql/oracle/community-core-create.sql 12 Mar 2004 18:48:49 -0000 1.13
@@ -299,8 +299,14 @@
v_party_id parties.party_id%TYPE;
begin
v_party_id :=
- acs_object.new(party_id, object_type,
- creation_date, creation_user, creation_ip, context_id);
+ acs_object.new(
+ object_id => party_id,
+ object_type => object_type,
+ title => lower(email),
+ creation_date => creation_date,
+ creation_user => creation_user,
+ creation_ip => creation_ip,
+ context_id => context_id);
insert into parties
(party_id, email, url)
@@ -444,6 +450,10 @@
values
(v_person_id, first_names, last_name);
+ update acs_objects
+ set title = first_names || ' ' || last_name
+ where object_id = v_person_id;
+
return v_person_id;
end new;
Index: openacs-4/packages/acs-kernel/sql/oracle/groups-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/groups-body-create.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-kernel/sql/oracle/groups-body-create.sql 4 Mar 2004 14:52:40 -0000 1.12
+++ openacs-4/packages/acs-kernel/sql/oracle/groups-body-create.sql 12 Mar 2004 18:48:49 -0000 1.13
@@ -777,7 +777,11 @@
values
(v_group_id, group_name, v_join_policy);
+ update acs_objects
+ set title = group_name
+ where object_id = v_group_id;
+
-- setup the permissible relationship types for this group
insert into group_rels
(group_rel_id, group_id, rel_type)
Index: openacs-4/packages/acs-kernel/sql/oracle/journal-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/journal-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-kernel/sql/oracle/journal-create.sql 4 Mar 2004 14:52:40 -0000 1.4
+++ openacs-4/packages/acs-kernel/sql/oracle/journal-create.sql 12 Mar 2004 18:48:49 -0000 1.5
@@ -93,6 +93,7 @@
v_journal_id := acs_object.new (
object_id => journal_id,
object_type => 'journal_entry',
+ title => action,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
Index: openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-body-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-body-create.sql 4 Mar 2004 14:52:40 -0000 1.4
+++ openacs-4/packages/acs-kernel/sql/oracle/rel-constraints-body-create.sql 12 Mar 2004 18:48:49 -0000 1.5
@@ -33,6 +33,7 @@
v_constraint_id := acs_object.new (
object_id => constraint_id,
object_type => constraint_type,
+ title => constraint_name,
context_id => context_id,
creation_user => creation_user,
creation_ip => creation_ip
Index: openacs-4/packages/acs-kernel/sql/oracle/rel-segments-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/rel-segments-body-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-kernel/sql/oracle/rel-segments-body-create.sql 4 Mar 2004 14:52:40 -0000 1.7
+++ openacs-4/packages/acs-kernel/sql/oracle/rel-segments-body-create.sql 12 Mar 2004 18:48:49 -0000 1.8
@@ -39,6 +39,10 @@
party.new(segment_id, object_type, creation_date, creation_user,
creation_ip, email, url, context_id);
+ update acs_objects
+ set title = segment_name
+ where object_id = v_segment_id;
+
insert into rel_segments
(segment_id, segment_name, group_id, rel_type)
values
Index: openacs-4/packages/acs-kernel/sql/oracle/site-nodes-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/site-nodes-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-kernel/sql/oracle/site-nodes-create.sql 4 Mar 2004 14:52:40 -0000 1.5
+++ openacs-4/packages/acs-kernel/sql/oracle/site-nodes-create.sql 12 Mar 2004 18:48:49 -0000 1.6
@@ -126,6 +126,8 @@
v_node_id := acs_object.new (
object_id => node_id,
object_type => 'site_node',
+ title => name,
+ package_id => object_id,
creation_user => creation_user,
creation_ip => creation_ip
);
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql,v
diff -u -r1.27 -r1.28
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql 4 Mar 2004 14:52:41 -0000 1.27
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql 12 Mar 2004 18:48:50 -0000 1.28
@@ -259,9 +259,9 @@
-- with the user_id assigned throughout the toolkit Tcl code
insert into acs_objects
- (object_id, object_type)
+ (object_id, object_type, title)
values
- (0, ''user'');
+ (0, ''user'', ''Unregistered Visitor'');
insert into parties
(party_id)
@@ -372,7 +372,8 @@
now(),
null,
null,
- null
+ null,
+ 'Default Context'
);
insert into acs_magic_objects
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql,v
diff -u -r1.48 -r1.49
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql 4 Mar 2004 14:52:41 -0000 1.48
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql 12 Mar 2004 18:48:50 -0000 1.49
@@ -150,6 +150,38 @@
''f''
);
+ attr_id := acs_attribute__create_attribute (
+ ''acs_object'',
+ ''package_id'',
+ ''integer'',
+ ''Package ID'',
+ ''Package IDs'',
+ null,
+ null,
+ null,
+ 0,
+ 1,
+ null,
+ ''type_specific'',
+ ''f''
+ );
+
+ attr_id := acs_attribute__create_attribute (
+ ''acs_object'',
+ ''title'',
+ ''string'',
+ ''Title'',
+ ''Titles'',
+ null,
+ null,
+ null,
+ 0,
+ 1,
+ null,
+ ''type_specific'',
+ ''f''
+ );
+
return 0;
end;' language 'plpgsql';
@@ -178,6 +210,8 @@
object_type varchar(100) not null
constraint acs_objects_object_type_fk
references acs_object_types (object_type),
+ title varchar(1000) default null,
+ package_id integer default null,
context_id integer constraint acs_objects_context_id_fk
references acs_objects(object_id),
security_inherit_p boolean default 't' not null,
@@ -203,6 +237,9 @@
create index acs_objects_creation_user_idx on acs_objects (creation_user);
create index acs_objects_modify_user_idx on acs_objects (modifying_user);
+create index acs_objects_package_object_idx on acs_objects (package_id, object_id);
+create index acs_objects_title_idx on acs_objects(title);
+
create index acs_objects_object_type_idx on acs_objects (object_type);
create function acs_objects_mod_ip_insert_tr () returns opaque as '
@@ -341,6 +378,18 @@
Who last modified the object
';
+comment on column acs_objects.package_id is '
+ Which package instance this object belongs to.
+ Please note that in mid-term this column will replace all
+ package_ids of package specific tables.
+';
+
+comment on column acs_objects.title is '
+ Title of the object if applicable.
+ Please note that in mid-term this column will replace all
+ titles or object_names of package specific tables.
+';
+
-----------------------
-- CONTEXT HIERARCHY --
-----------------------
@@ -584,7 +633,7 @@
-- function new
-create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean)
+create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean,varchar,integer)
returns integer as '
declare
new__object_id alias for $1; -- default null
@@ -594,8 +643,12 @@
new__creation_ip alias for $5; -- default null
new__context_id alias for $6; -- default null
new__security_inherit_p alias for $7; -- default ''t''
+ new__title alias for $8; -- default null
+ new__package_id alias for $9; -- default null
v_object_id acs_objects.object_id%TYPE;
v_creation_date timestamptz;
+ v_title acs_objects.title%TYPE;
+ v_object_type_pretty_name acs_object_types.pretty_name%TYPE;
begin
if new__object_id is null then
select acs_object_id_seq.nextval
@@ -604,17 +657,28 @@
v_object_id := new__object_id;
end if;
+ if new__object_id is null then
+ select pretty_name
+ into v_object_type_pretty_name
+ from acs_object_types
+ where object_type = new__object_type;
+
+ v_title := v_object_type_pretty_name || '' '' || v_object_id;
+ else
+ v_title := new__title;
+ end if;
+
if new__creation_date is null then
v_creation_date:= now();
else
v_creation_date := new__creation_date;
end if;
insert into acs_objects
- (object_id, object_type, context_id,
+ (object_id, object_type, title, package_id, context_id,
creation_date, creation_user, creation_ip, security_inherit_p)
values
- (v_object_id, new__object_type, new__context_id,
+ (v_object_id, new__object_type, v_title, new__package_id, new__context_id,
v_creation_date, new__creation_user, new__creation_ip,
new__security_inherit_p);
@@ -637,30 +701,75 @@
v_object_id acs_objects.object_id%TYPE;
v_creation_date timestamptz;
begin
- if new__object_id is null then
- select acs_object_id_seq.nextval
- into v_object_id from dual;
- else
- v_object_id := new__object_id;
- end if;
+ return acs_object__new(new__object_id, new__object_type, new__creation_date,
+ new__creation_user, new__creation_ip, new__context_id,
+ ''t'', null, null);
+end;' language 'plpgsql';
- if new__creation_date is null then
- v_creation_date:= now();
- else
- v_creation_date := new__creation_date;
- end if;
+create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean)
+returns integer as '
+declare
+ new__object_id alias for $1; -- default null
+ new__object_type alias for $2; -- default ''acs_object''
+ new__creation_date alias for $3; -- default now()
+ new__creation_user alias for $4; -- default null
+ new__creation_ip alias for $5; -- default null
+ new__context_id alias for $6; -- default null
+ new__security_inherit_p alias for $7; -- default ''t''
+begin
+ return acs_object__new(new__object_id, new__object_type, new__creation_date,
+ new__creation_user, new__creation_ip, new__context_id,
+ new__security_inherit_p, null, null);
+end;' language 'plpgsql';
- insert into acs_objects
- (object_id, object_type, context_id,
- creation_date, creation_user, creation_ip)
- values
- (v_object_id, new__object_type, new__context_id,
- v_creation_date, new__creation_user, new__creation_ip);
+create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean,varchar)
+returns integer as '
+declare
+ new__object_id alias for $1; -- default null
+ new__object_type alias for $2; -- default ''acs_object''
+ new__creation_date alias for $3; -- default now()
+ new__creation_user alias for $4; -- default null
+ new__creation_ip alias for $5; -- default null
+ new__context_id alias for $6; -- default null
+ new__security_inherit_p alias for $7; -- default ''t''
+ new__title alias for $8; -- default null
+begin
+ return acs_object__new(new__object_id, new__object_type, new__creation_date,
+ new__creation_user, new__creation_ip, new__context_id,
+ new__security_inherit_p, new__title, null);
+end;' language 'plpgsql';
- PERFORM acs_object__initialize_attributes(v_object_id);
+create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,varchar,integer)
+returns integer as '
+declare
+ new__object_id alias for $1; -- default null
+ new__object_type alias for $2; -- default ''acs_object''
+ new__creation_date alias for $3; -- default now()
+ new__creation_user alias for $4; -- default null
+ new__creation_ip alias for $5; -- default null
+ new__context_id alias for $6; -- default null
+ new__title alias for $7; -- default null
+ new__package_id alias for $8; -- default null
+begin
+ return acs_object__new(new__object_id, new__object_type, new__creation_date,
+ new__creation_user, new__creation_ip, new__context_id,
+ ''t'', new__title, new__package_id);
+end;' language 'plpgsql';
- return v_object_id;
-
+create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,varchar)
+returns integer as '
+declare
+ new__object_id alias for $1; -- default null
+ new__object_type alias for $2; -- default ''acs_object''
+ new__creation_date alias for $3; -- default now()
+ new__creation_user alias for $4; -- default null
+ new__creation_ip alias for $5; -- default null
+ new__context_id alias for $6; -- default null
+ new__title alias for $7; -- default null
+begin
+ return acs_object__new(new__object_id, new__object_type, new__creation_date,
+ new__creation_user, new__creation_ip, new__context_id,
+ ''t'', new__title, null);
end;' language 'plpgsql';
create function acs_object__new (integer,varchar) returns integer as '
@@ -750,6 +859,14 @@
-- where o.object_id = name__object_id)
-- connect by object_type = prior supertype
+ select title into object_name
+ from acs_objects
+ where object_id = name__object_id;
+
+ if (object_name is not null) then
+ return object_name;
+ end if;
+
for obj_type
in select o2.name_method
from acs_object_types o1, acs_object_types o2
@@ -799,6 +916,25 @@
end;' language 'plpgsql' stable strict;
+-- function package_id
+create or replace function acs_object__package_id (integer)
+returns integer as '
+declare
+ p_object_id alias for $1;
+ v_package_id acs_objects.package_id%TYPE;
+begin
+ if p_object_id is null then
+ return null;
+ end if;
+
+ select package_id into v_package_id
+ from acs_objects
+ where object_id = p_object_id;
+
+ return v_package_id;
+end;' language 'plpgsql' stable strict;
+
+
-- procedure get_attribute_storage
create or replace function acs_object__get_attribute_storage (integer,varchar)
returns text as '
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql 4 Mar 2004 14:52:41 -0000 1.15
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql 12 Mar 2004 18:48:50 -0000 1.16
@@ -462,7 +462,10 @@
now(),
creation_user,
creation_ip,
- context_id
+ context_id,
+ ''t'',
+ new__rel_type || '': '' || new__object_id_one || '' - '' || new__object_id_two,
+ null
);
insert into acs_rels
Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql,v
diff -u -r1.51 -r1.52
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 4 Mar 2004 14:52:41 -0000 1.51
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 12 Mar 2004 18:48:50 -0000 1.52
@@ -227,6 +227,8 @@
create index apm_packages_package_key_idx on apm_packages (package_key);
+alter table acs_objects add foreign key (package_id) references apm_packages(package_id);
+
comment on table apm_packages is '
This table maintains the list of all package instances in the sytem.
';
@@ -1340,6 +1342,9 @@
now(),
null,
null,
+ null,
+ ''t'',
+ register_parameter__package_key || '': Parameter '' || register_parameter__parameter_name,
null
);
@@ -1396,6 +1401,12 @@
max_n_values = coalesce(update_parameter__max_n_values, max_n_values)
where parameter_id = update_parameter__parameter_id;
+ update acs_objects
+ set title = (select package_key || '': Parameter '' || parameter_name
+ from apm_parameters
+ where parameter_id = update_parameter__parameter_id)
+ where object_id = update_parameter__parameter_id;
+
return parameter_id;
end;' language 'plpgsql';
@@ -1628,6 +1639,11 @@
v_instance_name := new__instance_name;
end if;
+ update acs_objects
+ set title = v_instance_name,
+ package_id = v_package_id
+ where object_id = v_package_id;
+
select package_type into v_package_type
from apm_package_types
where package_key = new__package_key;
@@ -1809,6 +1825,9 @@
now(),
null,
null,
+ null,
+ ''t'',
+ apm_pkg_ver__package_key || '', Version '' || apm_pkg_ver__version_name,
null
);
@@ -1904,6 +1923,12 @@
from apm_package_versions
where version_id = copy__version_id;
+ update acs_objects
+ set title = (select v.package_key || '', Version '' || v.version_name
+ from apm_package_versions v
+ where v.version_id = copy__version_id)
+ where object_id = copy__version_id;
+
insert into apm_package_dependencies(dependency_id, version_id, dependency_type, service_uri, service_version)
select nextval(''t_acs_object_id_seq''), v_version_id, dependency_type, service_uri, service_version
from apm_package_dependencies
Index: openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql 4 Mar 2004 14:52:41 -0000 1.6
+++ openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql 12 Mar 2004 18:48:50 -0000 1.7
@@ -66,7 +66,9 @@
p_creation_user,
p_creation_ip,
p_context_id,
- ''t''
+ ''t'',
+ p_short_name,
+ null
);
insert into auth_authorities (authority_id, short_name, pretty_name, enabled_p,
Index: openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql 4 Mar 2004 14:52:41 -0000 1.19
+++ openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql 12 Mar 2004 18:48:50 -0000 1.20
@@ -286,7 +286,8 @@
begin
v_party_id :=
acs_object__new(new__party_id, new__object_type, new__creation_date,
- new__creation_user, new__creation_ip, new__context_id);
+ new__creation_user, new__creation_ip, new__context_id,
+ ''t'', new__email, null);
insert into parties
(party_id, email, url)
@@ -409,6 +410,10 @@
new__creation_date, new__creation_user, new__creation_ip,
new__email, new__url, new__context_id);
+ update acs_objects
+ set title = new__first_names || '' '' || new__last_name
+ where object_id = v_person_id;
+
insert into persons
(person_id, first_names, last_name)
values
Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql,v
diff -u -r1.27 -r1.28
--- openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql 4 Mar 2004 14:52:41 -0000 1.27
+++ openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql 12 Mar 2004 18:48:50 -0000 1.28
@@ -833,6 +833,10 @@
end if;
end if;
+ update acs_objects
+ set title = new__group_name
+ where object_id = v_group_id;
+
insert into groups
(group_id, group_name, join_policy)
values
Index: openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql 4 Mar 2004 14:52:41 -0000 1.7
+++ openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql 12 Mar 2004 18:48:50 -0000 1.8
@@ -107,7 +107,10 @@
new__creation_date,
new__creation_user,
new__creation_ip,
- new__object_id
+ new__object_id,
+ ''t'',
+ new__action,
+ null
);
insert into journal_entries (
Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-body-create.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-body-create.sql 4 Mar 2004 14:52:41 -0000 1.10
+++ openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-body-create.sql 12 Mar 2004 18:48:50 -0000 1.11
@@ -56,7 +56,10 @@
now(),
new__creation_user,
new__creation_ip,
- new__context_id
+ new__context_id,
+ ''t'',
+ new__constraint_name,
+ null
);
insert into rel_constraints
Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql 4 Mar 2004 14:52:41 -0000 1.13
+++ openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql 12 Mar 2004 18:48:50 -0000 1.14
@@ -35,6 +35,10 @@
party__new(new__segment_id, object_type, creation_date, creation_user,
creation_ip, email, url, context_id);
+ update acs_objects
+ set title = new__segment_name
+ where object_id = v_segment_id;
+
insert into rel_segments
(segment_id, segment_name, group_id, rel_type)
values
Index: openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql 4 Mar 2004 14:52:41 -0000 1.19
+++ openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql 12 Mar 2004 18:48:50 -0000 1.20
@@ -235,7 +235,10 @@
now(),
new__creation_user,
new__creation_ip,
- null
+ null,
+ ''t'',
+ new__name,
+ new__object_id
);
insert into site_nodes
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-mail/sql/oracle/acs-mail-nt-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/oracle/acs-mail-nt-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-mail/sql/oracle/acs-mail-nt-create.sql 4 Mar 2004 14:52:42 -0000 1.8
+++ openacs-4/packages/acs-mail/sql/oracle/acs-mail-nt-create.sql 12 Mar 2004 18:48:50 -0000 1.9
@@ -37,7 +37,8 @@
expand_group in char default 'f',
subject in acs_mail_bodies.header_subject%TYPE,
message in varchar2,
- max_retries in integer default 0
+ max_retries in integer default 0,
+ package_id in acs_objects.package_id%TYPE default null
) return acs_mail_queue_messages.message_id%TYPE;
-- /** acs_mail_nt.cancel_request
@@ -112,7 +113,8 @@
expand_group in char default 'f',
subject in acs_mail_bodies.header_subject%TYPE,
message in varchar2,
- max_retries in integer default 0
+ max_retries in integer default 0,
+ package_id in acs_objects.package_id%TYPE default null
) return acs_mail_queue_messages.message_id%TYPE
is
cursor c_expanded_cur is
@@ -164,16 +166,18 @@
body_from => party_from,
body_date => sysdate,
header_subject => subject,
- creation_user => v_creation_user
+ creation_user => v_creation_user,
+ package_id => package_id
);
-- create a CR item to stick message into
-- for oracle, we need to stick it in a blob
v_item_id := content_item.new (
name => 'acs-mail message' || v_body_id,
- title => subject,
- text => message
+ title => subject,
+ text => message,
+ package_id => package_id
);
-- content_item__new makes a CR revision. We need to get that revision
@@ -188,7 +192,8 @@
-- queue the message
v_message_id := acs_mail_queue_message.new (
body_id => v_body_id,
- creation_user => v_creation_user
+ creation_user => v_creation_user,
+ package_id => package_id
);
-- now put the message into the outgoing queue
Index: openacs-4/packages/acs-mail/sql/oracle/acs-mail-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/oracle/acs-mail-packages-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-mail/sql/oracle/acs-mail-packages-create.sql 4 Mar 2004 14:52:42 -0000 1.5
+++ openacs-4/packages/acs-mail/sql/oracle/acs-mail-packages-create.sql 12 Mar 2004 18:48:50 -0000 1.6
@@ -153,7 +153,9 @@
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- context_id in acs_objects.context_id%TYPE default null
+ context_id in acs_objects.context_id%TYPE default null,
+ title in acs_objects.title%TYPE default null
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_object_id acs_objects.object_id%TYPE;
@@ -164,9 +166,13 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- context_id => context_id
+ context_id => context_id,
+ title => title,
+ package_id => package_id
);
+
insert into acs_mail_gc_objects values ( v_object_id );
+
return v_object_id;
end new;
@@ -203,24 +209,36 @@
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- context_id in acs_objects.context_id%TYPE default null
+ context_id in acs_objects.context_id%TYPE default null,
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_object_id acs_objects.object_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
v_header_message_id acs_mail_bodies.header_message_id%TYPE;
begin
+ if package_id is null then
+ v_package_id := acs_object.package_id(content_item_id);
+ else
+ v_package_id := package_id;
+ end if;
+
v_object_id := acs_mail_gc_object.new (
gc_object_id => body_id,
object_type => object_type,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- context_id => context_id
+ context_id => context_id,
+ title => substr(header_subject,1,1000),
+ package_id => v_package_id
);
+
v_header_message_id :=
nvl(header_message_id,
sysdate || '.' || v_object_id || '@' ||
utl_inaddr.get_host_name || '.sddd');
+
insert into acs_mail_bodies
(body_id, body_reply_to, body_from, body_date, header_message_id,
header_reply_to, header_subject, header_from, header_to,
@@ -229,6 +247,7 @@
(v_object_id, body_reply_to, body_from, body_date,
v_header_message_id, header_reply_to, header_subject, header_from,
header_to, content_item_id);
+
return v_object_id;
end new;
@@ -276,15 +295,18 @@
header_from acs_mail_bodies.header_from%TYPE;
header_to acs_mail_bodies.header_to%TYPE;
content_item_id acs_mail_bodies.content_item_id%TYPE;
+ package_id acs_objects.package_id%TYPE;
begin
select body_reply_to, body_from, body_date,
header_reply_to, header_subject, header_from, header_to,
- content_item_id
+ content_item_id, package_id
into body_reply_to, body_from, body_date,
header_reply_to, header_subject, header_from, header_to,
- content_item_id
- from acs_mail_bodies
- where body_id = old_body_id;
+ content_item_id, package_id
+ from acs_mail_bodies b, acs_objects o
+ where b.body_id = old_body_id
+ and o.object_id = b.body_id;
+
v_object_id := acs_mail_body.new (
body_id => body_id,
body_reply_to => body_reply_to,
@@ -299,7 +321,8 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- context_id => context_id
+ context_id => context_id,
+ package_id => package_id
);
return v_object_id;
end clone;
@@ -331,7 +354,8 @@
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- context_id in acs_objects.context_id%TYPE default null
+ context_id in acs_objects.context_id%TYPE default null,
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_object_id acs_objects.object_id%TYPE;
@@ -342,10 +366,13 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- context_id => context_id
+ context_id => context_id,
+ package_id => package_id
);
+
insert into acs_mail_multiparts (multipart_id, multipart_kind)
values (v_object_id, multipart_kind);
+
return v_object_id;
end new;
@@ -409,26 +436,36 @@
function new (
mail_link_id in acs_mail_links.mail_link_id%TYPE default null,
body_id in acs_mail_bodies.body_id%TYPE,
-
context_id in acs_objects.context_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- object_type in acs_objects.object_type%TYPE default 'acs_mail_link'
+ object_type in acs_objects.object_type%TYPE default 'acs_mail_link',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_object_id acs_objects.object_id%TYPE;
+ v_package_id acs_objects.package_id%TYPE;
begin
+ if package_id is null then
+ v_package_id := acs_object.package_id(body_id);
+ else
+ v_package_id := package_id;
+ end if;
+
v_object_id := acs_object.new (
object_id => mail_link_id,
context_id => context_id,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- object_type => object_type
+ object_type => object_type,
+ package_id => package_id
);
+
insert into acs_mail_links ( mail_link_id, body_id )
values ( v_object_id, body_id );
+
return v_object_id;
end;
Index: openacs-4/packages/acs-mail/sql/oracle/acs-mail-queue-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/oracle/acs-mail-queue-create.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-mail/sql/oracle/acs-mail-queue-create.sql 4 Mar 2004 14:52:42 -0000 1.9
+++ openacs-4/packages/acs-mail/sql/oracle/acs-mail-queue-create.sql 12 Mar 2004 18:48:50 -0000 1.10
@@ -54,12 +54,12 @@
function new (
mail_link_id in acs_mail_links.mail_link_id%TYPE default null,
body_id in acs_mail_bodies.body_id%TYPE,
-
context_id in acs_objects.context_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- object_type in acs_objects.object_type%TYPE default 'acs_mail_link'
+ object_type in acs_objects.object_type%TYPE default 'acs_mail_link',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE;
procedure del (
@@ -75,27 +75,30 @@
function new (
mail_link_id in acs_mail_links.mail_link_id%TYPE default null,
body_id in acs_mail_bodies.body_id%TYPE,
-
context_id in acs_objects.context_id%TYPE default null,
creation_date in acs_objects.creation_date%TYPE default sysdate,
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
- object_type in acs_objects.object_type%TYPE default 'acs_mail_link'
+ object_type in acs_objects.object_type%TYPE default 'acs_mail_link',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_object_id acs_objects.object_id%TYPE;
begin
v_object_id := acs_mail_link.new (
mail_link_id => mail_link_id,
- body_id => body_id,
+ body_id => body_id,
context_id => context_id,
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- object_type => object_type
+ object_type => object_type,
+ package_id => package_id
);
+
insert into acs_mail_queue_messages ( message_id )
values ( v_object_id );
+
return v_object_id;
end;
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-mail/sql/oracle/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-drop.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-drop.sql 4 Mar 2004 14:52:43 -0000 1.5
+++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-drop.sql 12 Mar 2004 18:48:51 -0000 1.6
@@ -12,6 +12,8 @@
drop function acs_mail_queue_message__new (integer,integer,
integer,timestamptz,integer,varchar,varchar);
+drop function acs_mail_queue_message__new (integer,integer,
+ integer,timestamptz,integer,varchar,varchar,integer);
drop function acs_mail_queue_message__delete (integer);
drop table acs_mail_queue_incoming;
@@ -26,21 +28,29 @@
drop function acs_mail_gc_object__new (integer,varchar,timestamptz,integer,
varchar,integer);
+drop function acs_mail_gc_object__new (integer,varchar,timestamptz,integer,
+ varchar,integer,integer);
drop function acs_mail_gc_object__delete(integer);
drop function acs_mail_body__new (integer,integer,integer,timestamptz,varchar,
varchar,text,text,text,integer,varchar,date,integer,varchar,integer);
+drop function acs_mail_body__new (integer,integer,integer,timestamptz,varchar,
+ varchar,text,text,text,integer,varchar,date,integer,varchar,integer,integer);
drop function acs_mail_body__delete(integer);
drop function acs_mail_body__body_p(integer);
drop function acs_mail_body__clone (integer,integer,varchar,timestamptz,
integer,varchar,integer);
drop function acs_mail_body__set_content_object (integer,integer);
drop function acs_mail_multipart__new (integer,varchar,varchar,
timestamptz,integer,varchar,integer);
+drop function acs_mail_multipart__new (integer,varchar,varchar,
+ timestamptz,integer,varchar,integer,integer);
drop function acs_mail_multipart__delete (integer);
drop function acs_mail_multipart__multipart_p (integer);
drop function acs_mail_multipart__add_content (integer,integer);
drop function acs_mail_link__new (integer,integer,integer,timestamptz,
integer,varchar,varchar);
+drop function acs_mail_link__new (integer,integer,integer,timestamptz,
+ integer,varchar,varchar,integer);
drop function acs_mail_link__delete (integer);
drop function acs_mail_link__link_p (integer);
Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-create.sql 4 Mar 2004 14:52:43 -0000 1.5
+++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-create.sql 12 Mar 2004 18:48:51 -0000 1.6
@@ -27,19 +27,20 @@
-- @return The id of the new request
-- */
-create function acs_mail_nt__post_request(integer,integer,boolean,varchar,text,integer)
+create or replace function acs_mail_nt__post_request(integer,integer,boolean,varchar,text,integer,integer)
returns integer as '
declare
p_party_from alias for $1;
- p_party_to alias for $2;
+ p_party_to alias for $2;
p_expand_group alias for $3; -- default ''f''
- p_subject alias for $4;
- p_message alias for $5;
+ p_subject alias for $4;
+ p_message alias for $5;
p_max_retries alias for $6; -- default 0
+ p_package_id alias for $7; -- default null
v_header_from acs_mail_bodies.header_from%TYPE;
- v_header_to acs_mail_bodies.header_to%TYPE;
- v_body_id acs_mail_bodies.body_id%TYPE;
- v_item_id cr_items.item_id%TYPE;
+ v_header_to acs_mail_bodies.header_to%TYPE;
+ v_body_id acs_mail_bodies.body_id%TYPE;
+ v_item_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
v_message_id acs_mail_queue_messages.message_id%TYPE;
v_header_to_rec record;
@@ -74,31 +75,33 @@
-- create a mail body with empty content
select acs_mail_body__new (
- null, -- p_body_id
- null, -- p_body_reply_to
+ null, -- p_body_id
+ null, -- p_body_reply_to
p_party_from, -- p_body_from
- now(), -- p_body_date
- null, -- p_header_message_id
- null, -- p_header_reply_to
- p_subject, -- p_header_subject
- null, -- p_header_from
- null, -- p_header_to
- null, -- p_content_item_id
+ now(), -- p_body_date
+ null, -- p_header_message_id
+ null, -- p_header_reply_to
+ p_subject, -- p_header_subject
+ null, -- p_header_from
+ null, -- p_header_to
+ null, -- p_content_item_id
''acs_mail_body'', -- p_object_type
- now(), -- p_creation_date
+ now(), -- p_creation_date
v_creation_user, -- p_creation_user
- null, -- p_creation_ip
- null -- p_context_id
+ null, -- p_creation_ip
+ null, -- p_context_id
+ p_package_id -- p_package_id
) into v_body_id;
-- create a CR item to stick p_message into
select content_item__new(
- ''acs-mail message'' || v_body_id, -- new__name
- null, -- new__parent_id
- p_subject, -- new__title
- null, -- new__description
- p_message -- new__text
+ ''acs-mail message'' || v_body_id, -- new__name
+ null, -- new__parent_id
+ p_subject, -- new__title
+ null, -- new__description
+ p_message, -- new__text
+ p_package_id -- new__package_id
) into v_item_id;
-- content_item__new makes a CR revision. We need to get that revision
@@ -113,13 +116,14 @@
-- queue the message
select acs_mail_queue_message__new (
- null, -- p_mail_link_id
- v_body_id, -- p_body_id
- null, -- p_context_id
- now(), -- p_creation_date
+ null, -- p_mail_link_id
+ v_body_id, -- p_body_id
+ null, -- p_context_id
+ now(), -- p_creation_date
v_creation_user, -- p_creation_user
- null, -- p_creation_ip
- ''acs_mail_link'' -- p_object_type
+ null, -- p_creation_ip
+ ''acs_mail_link'', -- p_object_type
+ p_package_id -- p_package_id
) into v_message_id;
-- now put the message into the outgoing queue
@@ -155,6 +159,27 @@
return v_message_id;
end;' language 'plpgsql';
+create or replace function acs_mail_nt__post_request(integer,integer,boolean,varchar,text,integer)
+returns integer as '
+declare
+ p_party_from alias for $1;
+ p_party_to alias for $2;
+ p_expand_group alias for $3; -- default ''f''
+ p_subject alias for $4;
+ p_message alias for $5;
+ p_max_retries alias for $6; -- default 0
+begin
+ return acs_mail_nt__post_request(
+ p_party_from, -- p_party_from
+ p_party_to, -- p_party_to
+ p_expand_group, -- p_expand_group
+ p_subject, -- p_subject
+ p_message, -- p_message
+ p_max_retries, -- p_max_retries
+ null -- p_package_id
+ );
+end;' language 'plpgsql';
+
-- /** acs_mail_nt__post_request
-- * Overloaded function that
-- * only uses the basic params
@@ -166,25 +191,46 @@
-- @param message The body of the message
-- @return The id of the new request
--
-create function acs_mail_nt__post_request(integer,integer,varchar,text)
+create or replace function acs_mail_nt__post_request(integer,integer,varchar,text,integer)
returns integer as '
declare
p_party_from alias for $1;
- p_party_to alias for $2;
- p_subject alias for $3;
- p_message alias for $4;
+ p_party_to alias for $2;
+ p_subject alias for $3;
+ p_message alias for $4;
+ p_package_id alias for $5;
begin
return acs_mail_nt__post_request(
p_party_from, -- p_party_from
- p_party_to, -- p_party_to
- ''f'', -- p_expand_group
- p_subject, -- p_subject
- p_message, -- p_message
- 0 -- p_max_retries
+ p_party_to, -- p_party_to
+ ''f'', -- p_expand_group
+ p_subject, -- p_subject
+ p_message, -- p_message
+ 0, -- p_max_retries
+ p_package_id -- p_package_id
);
end;' language 'plpgsql';
+create or replace function acs_mail_nt__post_request(integer,integer,varchar,text)
+returns integer as '
+declare
+ p_party_from alias for $1;
+ p_party_to alias for $2;
+ p_subject alias for $3;
+ p_message alias for $4;
+begin
+ return acs_mail_nt__post_request(
+ p_party_from, -- p_party_from
+ p_party_to, -- p_party_to
+ ''f'', -- p_expand_group
+ p_subject, -- p_subject
+ p_message, -- p_message
+ 0, -- p_max_retries
+ null -- p_package_id
+ );
+end;' language 'plpgsql';
+
-- /** acs_mail_nt__cancel_request
-- * Cancel a notification request
-- * Original author: Stanislav Freidin
@@ -193,7 +239,7 @@
-- @param request_id Id of the request to cancel
-- */
-create function acs_mail_nt__cancel_request (integer)
+create or replace function acs_mail_nt__cancel_request (integer)
returns integer as '
declare
p_message_id alias for $1;
@@ -210,7 +256,7 @@
-- @author Vinod Kurup
-- */
-create function acs_mail_nt__expand_requests ()
+create or replace function acs_mail_nt__expand_requests ()
returns integer as '
begin
raise EXCEPTION ''-20000: Procedure no longer supported.'';
@@ -225,7 +271,7 @@
-- @author Vinod Kurup
-- */
-create function acs_mail_nt__update_requests ()
+create or replace function acs_mail_nt__update_requests ()
returns integer as '
begin
raise EXCEPTION ''-20000: Procedure no longer supported.'';
@@ -240,7 +286,7 @@
-- @author Vinod Kurup
-- */
-create function acs_mail_nt__process_queue (varchar,integer)
+create or replace function acs_mail_nt__process_queue (varchar,integer)
returns integer as '
declare
p_host alias for $1;
@@ -262,7 +308,7 @@
-- @author Vinod Kurup
-- */
-create function acs_mail_nt__schedule_process (numeric,varchar,integer)
+create or replace function acs_mail_nt__schedule_process (numeric,varchar,integer)
returns integer as '
declare
p_interval alias for $1;
Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-drop.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-drop.sql 4 Mar 2004 14:52:43 -0000 1.4
+++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-nt-drop.sql 12 Mar 2004 18:48:51 -0000 1.5
@@ -10,6 +10,8 @@
drop function acs_mail_nt__post_request(integer,integer,boolean,varchar,text,integer);
drop function acs_mail_nt__post_request(integer,integer,varchar,text);
+drop function acs_mail_nt__post_request(integer,integer,boolean,varchar,text,integer,integer);
+drop function acs_mail_nt__post_request(integer,integer,varchar,text,integer);
drop function acs_mail_nt__cancel_request (integer);
drop function acs_mail_nt__expand_requests ();
drop function acs_mail_nt__update_requests ();
Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql 4 Mar 2004 14:52:43 -0000 1.8
+++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql 12 Mar 2004 18:48:51 -0000 1.9
@@ -8,7 +8,7 @@
-- Package Implementations ---------------------------------------------
-create function acs_mail_gc_object__new (integer,varchar,timestamptz,integer,varchar,integer)
+create or replace function acs_mail_gc_object__new (integer,varchar,timestamptz,integer,varchar,integer,varchar,integer)
returns integer as '
declare
p_gc_object_id alias for $1; -- default null
@@ -17,6 +17,8 @@
p_creation_user alias for $4; -- default null
p_creation_ip alias for $5; -- default null
p_context_id alias for $6; -- default null
+ p_title alias for $7; -- default null
+ p_package_id alias for $8; -- default null
v_object_id integer;
begin
v_object_id := acs_object__new (
@@ -25,6 +27,35 @@
p_creation_date, -- creation_date
p_creation_user, -- creation_user
p_creation_ip, -- creation_ip
+ p_context_id, -- context_id
+ ''t'', -- security_inherit_p
+ p_title, -- title
+ p_package_id -- package_id
+ );
+
+ insert into acs_mail_gc_objects values ( v_object_id );
+
+ return v_object_id;
+end;
+' language 'plpgsql';
+
+create or replace function acs_mail_gc_object__new (integer,varchar,timestamptz,integer,varchar,integer)
+returns integer as '
+declare
+ p_gc_object_id alias for $1; -- default null
+ p_object_type alias for $2; -- default acs_mail_gc_object
+ p_creation_date alias for $3; -- default now
+ p_creation_user alias for $4; -- default null
+ p_creation_ip alias for $5; -- default null
+ p_context_id alias for $6; -- default null
+ v_object_id integer;
+begin
+ v_object_id := acs_object__new (
+ p_gc_object_id, -- object_id
+ p_object_type, -- object_type
+ p_creation_date, -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip, -- creation_ip
p_context_id -- context_id
);
@@ -34,7 +65,7 @@
end;
' language 'plpgsql';
-create function acs_mail_gc_object__delete(integer)
+create or replace function acs_mail_gc_object__delete(integer)
returns integer as '
declare
p_gc_object_id alias for $1;
@@ -51,38 +82,48 @@
-- first create a CR item.
-- then call acs_mail_body__new with the CR item's item_id
-create function acs_mail_body__new (integer,integer,integer,timestamptz,varchar,varchar,text,text,text,integer,varchar,date,integer,varchar,integer)
+create or replace function acs_mail_body__new (integer,integer,integer,timestamptz,varchar,varchar,text,text,text,integer,varchar,date,integer,varchar,integer,integer)
returns integer as '
declare
- p_body_id alias for $1; -- default null
+ p_body_id alias for $1; -- default null
p_body_reply_to alias for $2; -- default null
- p_body_from alias for $3; -- default null
- p_body_date alias for $4; -- default null
+ p_body_from alias for $3; -- default null
+ p_body_date alias for $4; -- default null
p_header_message_id alias for $5; -- default null
- p_header_reply_to alias for $6; -- default null
- p_header_subject alias for $7; -- default null
- p_header_from alias for $8; -- default null
- p_header_to alias for $9; -- default null
- p_content_item_id alias for $10; -- default null
- p_object_type alias for $11; -- default acs_mail_body
- p_creation_date alias for $12; -- default now()
- p_creation_user alias for $13; -- default null
- p_creation_ip alias for $14; -- default null
- p_context_id alias for $15; -- default null
- v_object_id integer;
+ p_header_reply_to alias for $6; -- default null
+ p_header_subject alias for $7; -- default null
+ p_header_from alias for $8; -- default null
+ p_header_to alias for $9; -- default null
+ p_content_item_id alias for $10; -- default null
+ p_object_type alias for $11; -- default acs_mail_body
+ p_creation_date alias for $12; -- default now()
+ p_creation_user alias for $13; -- default null
+ p_creation_ip alias for $14; -- default null
+ p_context_id alias for $15; -- default null
+ p_package_id alias for $16; -- default null
+ v_object_id integer;
+ v_package_id acs_objects.package_id%TYPE;
v_system_url varchar;
v_domain_name varchar;
- v_idx integer;
+ v_idx integer;
v_header_message_id acs_mail_bodies.header_message_id%TYPE;
begin
+ if p_package_id is null then
+ v_package_id := acs_object__package_id(p_content_item_id);
+ else
+ v_package_id := p_package_id;
+ end if;
+
v_object_id := acs_mail_gc_object__new (
- p_body_id, -- gc_object_id
- p_object_type, -- object_type
- p_creation_date, -- creation_date
- p_creation_user, -- creation_user
- p_creation_ip, -- creation_ip
- p_context_id -- context_id
+ p_body_id, -- gc_object_id
+ p_object_type, -- object_type
+ p_creation_date, -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip, -- creation_ip
+ p_context_id, -- context_id
+ substr(p_header_subject,1,1000), -- title
+ v_package_id -- package_id
);
-- vinodk: get SystemURL parameter and use it to extract domain name
@@ -108,8 +149,47 @@
end;
' language 'plpgsql';
+create or replace function acs_mail_body__new (integer,integer,integer,timestamptz,varchar,varchar,text,text,text,integer,varchar,date,integer,varchar,integer)
+returns integer as '
+declare
+ p_body_id alias for $1; -- default null
+ p_body_reply_to alias for $2; -- default null
+ p_body_from alias for $3; -- default null
+ p_body_date alias for $4; -- default null
+ p_header_message_id alias for $5; -- default null
+ p_header_reply_to alias for $6; -- default null
+ p_header_subject alias for $7; -- default null
+ p_header_from alias for $8; -- default null
+ p_header_to alias for $9; -- default null
+ p_content_item_id alias for $10; -- default null
+ p_object_type alias for $11; -- default acs_mail_body
+ p_creation_date alias for $12; -- default now()
+ p_creation_user alias for $13; -- default null
+ p_creation_ip alias for $14; -- default null
+ p_context_id alias for $15; -- default null
+begin
+ return acs_mail_body__new(p_body_id,
+ p_body_reply_to,
+ p_body_from,
+ p_body_date,
+ p_header_message_id,
+ p_header_reply_to,
+ p_header_subject,
+ p_header_from,
+ p_header_to,
+ p_content_item_id,
+ p_object_type,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ p_content_id,
+ null
+ );
+end;
+' language 'plpgsql';
-create function acs_mail_body__delete(integer)
+
+create or replace function acs_mail_body__delete(integer)
returns integer as '
declare
p_body_id alias for $1;
@@ -136,7 +216,7 @@
end;
' language 'plpgsql' stable;
-create function acs_mail_body__clone (integer,integer,varchar,timestamptz,integer,varchar,integer)
+create or replace function acs_mail_body__clone (integer,integer,varchar,timestamptz,integer,varchar,integer)
returns integer as '
declare
p_old_body_id alias for $1;
@@ -156,15 +236,17 @@
v_header_from text;
v_header_to text;
v_content_item_id integer;
+ v_package_id acs_objects.package_id%TYPE;
begin
select body_reply_to, body_from, body_date,
header_reply_to, header_subject, header_from, header_to,
- content_item_id
+ content_item_id, package_id
into v_body_reply_to, v_body_from, v_body_date,
v_header_reply_to, v_header_subject, v_header_from, v_header_to,
- v_content_item_id
- from acs_mail_bodies
- where body_id = p_old_body_id;
+ v_content_item_id, v_package_id
+ from acs_mail_bodies b, acs_objects o
+ where b.body_id = p_old_body_id
+ and o.object_id = b.body_id;
v_object_id := acs_mail_body__new (
p_body_id, -- body_id
@@ -179,15 +261,16 @@
p_object_type, -- object_type
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- p_creation_ip, -- creation_ip
- p_context_id -- context_id
+ p_creation_ip, -- creation_ip
+ p_context_id, -- context_id
+ v_package_id -- package_id
);
return v_object_id;
end;
' language 'plpgsql';
-create function acs_mail_body__set_content_object (integer,integer)
+create or replace function acs_mail_body__set_content_object (integer,integer)
returns integer as '
declare
p_body_id alias for $1;
@@ -203,18 +286,52 @@
----
--create or replace package body acs_mail_multipart
-create function acs_mail_multipart__new (integer,varchar,varchar,
+create or replace function acs_mail_multipart__new (integer,varchar,varchar,
+timestamptz,integer,varchar,integer,integer)
+returns integer as '
+declare
+ p_multipart_id alias for $1; -- default null,
+ p_multipart_kind alias for $2;
+ p_object_type alias for $3; -- default acs_mail_multipart
+ p_creation_date alias for $4; -- default now()
+ p_creation_user alias for $5; -- default null
+ p_creation_ip alias for $6; -- default null
+ p_context_id alias for $7; -- default null
+ p_package_id alias for $8; -- default null
+ v_object_id integer;
+begin
+ v_object_id := acs_mail_gc_object__new (
+ p_multipart_id, -- gc_object_id
+ p_object_type, -- object_type
+ p_creation_date, -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip, -- creation_ip
+ p_context_id, -- context_id
+ null, -- title
+ p_package_id -- package_id
+ );
+
+ insert into acs_mail_multiparts
+ (multipart_id, multipart_kind)
+ values
+ (v_object_id, p_multipart_kind);
+
+ return v_object_id;
+end;
+' language 'plpgsql';
+
+create or replace function acs_mail_multipart__new (integer,varchar,varchar,
timestamptz,integer,varchar,integer)
returns integer as '
declare
p_multipart_id alias for $1; -- default null,
p_multipart_kind alias for $2;
- p_object_type alias for $3; -- default acs_mail_multipart
- p_creation_date alias for $4; -- default now()
- p_creation_user alias for $5; -- default null
- p_creation_ip alias for $6; -- default null
- p_context_id alias for $7; -- default null
- v_object_id integer;
+ p_object_type alias for $3; -- default acs_mail_multipart
+ p_creation_date alias for $4; -- default now()
+ p_creation_user alias for $5; -- default null
+ p_creation_ip alias for $6; -- default null
+ p_context_id alias for $7; -- default null
+ v_object_id integer;
begin
v_object_id := acs_mail_gc_object__new (
p_multipart_id, -- gc_object_id
@@ -234,7 +351,7 @@
end;
' language 'plpgsql';
-create function acs_mail_multipart__delete (integer)
+create or replace function acs_mail_multipart__delete (integer)
returns integer as '
declare
p_multipart_id alias for $1;
@@ -267,7 +384,7 @@
-- below one, or higher than the highest item already available,
-- adds at the end. Otherwise, inserts and renumbers others.
-create function acs_mail_multipart__add_content (integer,integer)
+create or replace function acs_mail_multipart__add_content (integer,integer)
returns integer as '
declare
p_multipart_id alias for $1;
@@ -295,24 +412,58 @@
--end acs_mail_multipart;
--create or replace package body acs_mail_link__
-create function acs_mail_link__new (integer,integer,integer,timestamptz,integer,varchar,varchar)
+create or replace function acs_mail_link__new (integer,integer,integer,timestamptz,integer,varchar,varchar,integer)
returns integer as '
declare
p_mail_link_id alias for $1; -- default null
- p_body_id alias for $2;
+ p_body_id alias for $2;
p_context_id alias for $3; -- default null
p_creation_date alias for $4; -- default now()
p_creation_user alias for $5; -- default null
p_creation_ip alias for $6; -- default null
p_object_type alias for $7; -- default acs_mail_link
- v_mail_link_id acs_mail_links.mail_link_id%TYPE;
+ p_package_id alias for $8; -- default null
+ v_mail_link_id acs_mail_links.mail_link_id%TYPE;
begin
v_mail_link_id := acs_object__new (
p_mail_link_id, -- object_id
p_object_type, -- object_type
p_creation_date, -- creation_date
p_creation_user, -- creation_user
p_creation_ip, -- creation_ip
+ p_context_id, -- context_id
+ ''t'', -- security_inherit_p
+ null, -- title
+ p_package_id -- package_id
+ );
+
+ insert into acs_mail_links
+ ( mail_link_id, body_id )
+ values
+ ( v_mail_link_id, p_body_id );
+
+ return v_mail_link_id;
+end;
+' language 'plpgsql';
+
+create or replace function acs_mail_link__new (integer,integer,integer,timestamptz,integer,varchar,varchar)
+returns integer as '
+declare
+ p_mail_link_id alias for $1; -- default null
+ p_body_id alias for $2;
+ p_context_id alias for $3; -- default null
+ p_creation_date alias for $4; -- default now()
+ p_creation_user alias for $5; -- default null
+ p_creation_ip alias for $6; -- default null
+ p_object_type alias for $7; -- default acs_mail_link
+ v_mail_link_id acs_mail_links.mail_link_id%TYPE;
+begin
+ v_mail_link_id := acs_object__new (
+ p_mail_link_id, -- object_id
+ p_object_type, -- object_type
+ p_creation_date, -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip, -- creation_ip
p_context_id -- context_id
);
@@ -325,7 +476,7 @@
end;
' language 'plpgsql';
-create function acs_mail_link__delete (integer)
+create or replace function acs_mail_link__delete (integer)
returns integer as '
declare
p_mail_link_id alias for $1;
Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql 4 Mar 2004 14:52:43 -0000 1.10
+++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql 12 Mar 2004 18:48:51 -0000 1.11
@@ -49,21 +49,53 @@
-- API -----------------------------------------------------------------
--create or replace package body acs_mail_queue_message__
+create function acs_mail_queue_message__new (integer,integer,integer,timestamptz,integer,varchar,varchar,integer)
+returns integer as '
+declare
+ p_mail_link_id alias for $1; -- default null
+ p_body_id alias for $2;
+ p_context_id alias for $3; -- default null
+ p_creation_date alias for $4; -- default now()
+ p_creation_user alias for $5; -- default null
+ p_creation_ip alias for $6; -- default null
+ p_object_type alias for $7; -- default acs_mail_link
+ p_package_id alias for $8; -- default null
+ v_mail_link_id acs_mail_links.mail_link_id%TYPE;
+begin
+ v_mail_link_id := acs_mail_link__new (
+ p_mail_link_id, -- mail_link_id
+ p_body_id, -- body_id
+ p_context_id, -- context_id
+ p_creation_date, -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip, -- creation_ip
+ p_object_type, -- object_type
+ p_package_id -- package_id
+ );
+
+ insert into acs_mail_queue_messages
+ ( message_id )
+ values
+ ( v_mail_link_id );
+
+ return v_mail_link_id;
+end;' language 'plpgsql';
+
create function acs_mail_queue_message__new (integer,integer,integer,timestamptz,integer,varchar,varchar)
returns integer as '
declare
p_mail_link_id alias for $1; -- default null
- p_body_id alias for $2;
+ p_body_id alias for $2;
p_context_id alias for $3; -- default null
p_creation_date alias for $4; -- default now()
p_creation_user alias for $5; -- default null
p_creation_ip alias for $6; -- default null
p_object_type alias for $7; -- default acs_mail_link
- v_mail_link_id acs_mail_links.mail_link_id%TYPE;
+ v_mail_link_id acs_mail_links.mail_link_id%TYPE;
begin
v_mail_link_id := acs_mail_link__new (
p_mail_link_id, -- mail_link_id
- p_body_id, -- body_id
+ p_body_id, -- body_id
p_context_id, -- context_id
p_creation_date, -- creation_date
p_creation_user, -- creation_user
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-mail/sql/postgresql/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql 4 Mar 2004 14:52:44 -0000 1.6
+++ openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql 12 Mar 2004 18:48:51 -0000 1.7
@@ -27,7 +27,8 @@
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
object_type in acs_objects.object_type%TYPE default 'acs_message',
- is_live in char default 't'
+ is_live in char default 't',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE;
function edit (
@@ -88,7 +89,8 @@
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
is_live in char default 't',
- storage_type in cr_items.storage_type%TYPE default 'file'
+ storage_type in cr_items.storage_type%TYPE default 'file',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE;
function edit_file (
@@ -121,7 +123,8 @@
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
is_live in char default 't',
- storage_type in cr_items.storage_type%TYPE default 'file'
+ storage_type in cr_items.storage_type%TYPE default 'file',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE;
function edit_image (
@@ -151,7 +154,8 @@
parent_id in acs_objects.context_id%TYPE,
creation_date in acs_objects.creation_date%TYPE 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 default null
) return cr_extlinks.extlink_id%TYPE;
function edit_extlink (
@@ -193,7 +197,8 @@
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
object_type in acs_objects.object_type%TYPE default 'acs_message',
- is_live in char default 't'
+ is_live in char default 't',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_message_id acs_messages.message_id%TYPE;
@@ -226,7 +231,8 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- item_subtype => object_type
+ item_subtype => object_type,
+ package_id => package_id
);
insert into acs_messages
@@ -394,7 +400,8 @@
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
is_live in char default 't',
- storage_type in cr_items.storage_type%TYPE default 'file'
+ storage_type in cr_items.storage_type%TYPE default 'file',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_file_id cr_items.item_id%TYPE;
@@ -408,7 +415,8 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- storage_type => storage_type
+ storage_type => storage_type,
+ package_id => package_id
);
-- create an initial revision for the new attachment
@@ -482,7 +490,8 @@
creation_user in acs_objects.creation_user%TYPE default null,
creation_ip in acs_objects.creation_ip%TYPE default null,
is_live in char default 't',
- storage_type in cr_items.storage_type%TYPE default 'file'
+ storage_type in cr_items.storage_type%TYPE default 'file',
+ package_id in acs_objects.package_id%TYPE default null
) return acs_objects.object_id%TYPE
is
v_image_id cr_items.item_id%TYPE;
@@ -496,7 +505,8 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- storage_type => storage_type
+ storage_type => storage_type,
+ package_id => package_id
);
-- create an initial revision for the new attachment
@@ -580,7 +590,8 @@
parent_id in acs_objects.context_id%TYPE,
creation_date in acs_objects.creation_date%TYPE 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 default null
) return cr_extlinks.extlink_id%TYPE
is
v_extlink_id cr_extlinks.extlink_id%TYPE;
@@ -594,7 +605,8 @@
extlink_id => new_extlink.extlink_id,
creation_date => new_extlink.creation_date,
creation_user => new_extlink.creation_user,
- creation_ip => new_extlink.creation_ip
+ creation_ip => new_extlink.creation_ip,
+ package_id => new_extlink.package_id
);
end new_extlink;
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-messaging/sql/oracle/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-drop.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-drop.sql 4 Mar 2004 14:52:44 -0000 1.6
+++ openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-drop.sql 12 Mar 2004 18:48:52 -0000 1.7
@@ -17,6 +17,9 @@
drop function acs_message__new (integer,integer,timestamptz,integer,
varchar,varchar,varchar,varchar,varchar,text,
integer,integer,integer,varchar,varchar,boolean);
+drop function acs_message__new (integer,integer,timestamptz,integer,
+ varchar,varchar,varchar,varchar,varchar,text,
+ integer,integer,integer,varchar,varchar,boolean,integer);
drop function acs_message__delete (integer);
drop function acs_message__message_p (integer);
drop function acs_message__send (integer,varchar,integer,timestamptz);
@@ -25,18 +28,26 @@
drop function acs_message__new_file (integer,integer,varchar,varchar,
text,varchar,text,timestamptz,integer,
varchar,boolean);
+drop function acs_message__new_file (integer,integer,varchar,varchar,
+ text,varchar,text,timestamptz,integer,
+ varchar,boolean,integer);
drop function acs_message__edit_file (integer,varchar,text,varchar,
text,timestamptz,integer,varchar,boolean);
drop function acs_message__delete_file (integer);
drop function acs_message__new_image (integer,integer,varchar,varchar,
text,varchar,text,integer,integer,
timestamptz,integer,varchar,boolean);
+drop function acs_message__new_image (integer,integer,varchar,varchar,
+ text,varchar,text,integer,integer,
+ timestamptz,integer,varchar,boolean,integer);
drop function acs_message__edit_image (integer,varchar,text,varchar,
text,integer,integer,timestamptz,integer,
varchar,boolean);
drop function acs_message__delete_image (integer);
drop function acs_message__new_extlink (varchar,integer,varchar,varchar,text,
integer,timestamptz,integer,varchar);
+drop function acs_message__new_extlink (varchar,integer,varchar,varchar,text,
+ integer,timestamptz,integer,varchar,integer);
drop function acs_message__edit_extlink (integer,varchar,varchar,text);
drop function acs_message__delete_extlink (integer);
drop function acs_message__name (integer);
Index: openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql 4 Mar 2004 14:52:44 -0000 1.16
+++ openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql 12 Mar 2004 18:48:52 -0000 1.17
@@ -29,28 +29,28 @@
if p_data is not null then
-- need to take care of blob?
v_revision_id := content_revision__new (
- p_message_id, -- item_id
- p_title, -- title
- p_description, -- description
- p_data, -- data
- p_mime_type, -- mime_type
+ p_message_id, -- item_id
+ p_title, -- title
+ p_description, -- description
+ p_data, -- data
+ p_mime_type, -- mime_type
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- p_creation_ip -- creation_ip
+ p_creation_ip -- creation_ip
);
else if p_title is not null or p_text is not null then
v_revision_id := content_revision__new (
- p_title, -- title
- p_description, -- description
- now(), -- publish_date
- p_mime_type, -- mime_type
- null, -- nls_language
- p_text, -- text
- p_message_id, -- item_id
- null, -- revision_id
+ p_title, -- title
+ p_description, -- description
+ now(), -- publish_date
+ p_mime_type, -- mime_type
+ null, -- nls_language
+ p_text, -- text
+ p_message_id, -- item_id
+ null, -- revision_id
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- p_creation_ip -- creation_ip
+ p_creation_ip -- creation_ip
);
end if;
end if;
@@ -75,7 +75,7 @@
create or replace function acs_message__new (integer,integer,timestamptz,integer,
varchar,varchar,varchar,varchar,text,integer,integer,integer,integer,
-varchar,varchar,boolean)
+varchar,varchar,boolean,integer)
returns integer as '
declare
p_message_id alias for $1; --default null,
@@ -95,6 +95,7 @@
p_creation_ip alias for $14; --default null,
p_object_type alias for $15; --default ''acs_message'',
p_is_live alias for $16; --default ''t''
+ p_package_id alias for $17;
v_message_id acs_messages.message_id%TYPE;
v_rfc822_id acs_messages.rfc822_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
@@ -127,22 +128,23 @@
end if;
v_message_id := content_item__new (
- v_rfc822_id, -- name
- p_parent_id, -- parent_id
- p_message_id, -- item_id
- null, -- locale
+ v_rfc822_id, -- name
+ p_parent_id, -- parent_id
+ p_message_id, -- item_id
+ null, -- locale
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- p_context_id, -- context_id
- p_creation_ip, -- creation_ip
- p_object_type, -- item_subtype
- ''acs_message_revision'', -- content_type
- null, -- title
- null, -- description
- ''text/plain'', -- mime_type
- null, -- nls_language
- null, -- text
- ''text'' -- storage_type
+ p_context_id, -- context_id
+ p_creation_ip, -- creation_ip
+ p_object_type, -- item_subtype
+ ''acs_message_revision'', -- content_type
+ null, -- title
+ null, -- description
+ ''text/plain'', -- mime_type
+ null, -- nls_language
+ null, -- text
+ ''text'', -- storage_type
+ p_package_id
);
insert into acs_messages
@@ -152,21 +154,65 @@
-- create an initial revision for the new message
v_revision_id := acs_message__edit (
- v_message_id, -- message_id
- p_title, -- title
- p_description, -- description
- p_mime_type, -- mime_type
- p_text, -- text
- p_data, -- data
+ v_message_id, -- message_id
+ p_title, -- title
+ p_description, -- description
+ p_mime_type, -- mime_type
+ p_text, -- text
+ p_data, -- data
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- p_creation_ip, -- creation_ip
- p_is_live -- is_live
+ p_creation_ip, -- creation_ip
+ p_is_live -- is_live
);
return v_message_id;
end;' language 'plpgsql';
+create or replace function acs_message__new (integer,integer,timestamptz,integer,
+varchar,varchar,varchar,varchar,text,integer,integer,integer,integer,
+varchar,varchar,boolean)
+returns integer as '
+declare
+ p_message_id alias for $1; --default null,
+ p_reply_to alias for $2; --default null,
+ p_sent_date alias for $3; --default sysdate,
+ p_sender alias for $4; --default null,
+ p_rfc822_id alias for $5; --default null,
+ p_title alias for $6; --default null,
+ p_description alias for $7; --default null,
+ p_mime_type alias for $8; --default ''text/plain'',
+ p_text alias for $9; --default null,
+ p_data alias for $10; --default null,
+ p_parent_id alias for $11; --default 0,
+ p_context_id alias for $12;
+ p_creation_date timestamptz := current_timestamp; -- alias for $13 --default sysdate,
+ p_creation_user alias for $13; --default null,
+ p_creation_ip alias for $14; --default null,
+ p_object_type alias for $15; --default ''acs_message'',
+ p_is_live alias for $16; --default ''t''
+begin
+ return acs_message__new (p_message_id,
+ p_reply_to,
+ p_sent_date,
+ p_sender,
+ p_rfc822_id,
+ p_title,
+ p_description,
+ p_mime_type,
+ p_text,
+ p_data,
+ p_parent_id,
+ p_context_id,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ p_object_type,
+ p_is_live,
+ null
+ );
+end;' language 'plpgsql';
+
create or replace function acs_message__delete (integer)
returns integer as '
declare
@@ -257,7 +303,7 @@
-- by direct calls to CR code in the near future.
create or replace function acs_message__new_file (integer,integer,varchar,varchar,
-text,varchar,integer,timestamptz,integer,varchar,boolean,varchar)
+text,varchar,integer,timestamptz,integer,varchar,boolean,varchar,integer)
returns integer as '
declare
p_message_id alias for $1;
@@ -272,44 +318,79 @@
p_creation_ip alias for $10; -- default null
p_is_live alias for $11; -- default ''t''
p_storage_type alias for $12; -- default ''file''
+ p_package_id alias for $13; -- default null
v_file_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
begin
v_file_id := content_item__new (
p_file_name, -- name
p_message_id, -- parent_id
- p_file_id, -- item_id
- null, -- locale
+ p_file_id, -- item_id
+ null, -- locale
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- null, -- context_id
+ null, -- context_id
p_creation_ip, -- creation_ip
''content_item'', -- item_subtype
''content_revision'', -- content_type
- null, -- title
- null, -- description
+ null, -- title
+ null, -- description
''text/plain'', -- mime_type
- null, -- nls_language
- null, -- text
- p_storage_type -- storage_type
+ null, -- nls_language
+ null, -- text
+ p_storage_type, -- storage_type
+ p_package_id -- package_id
);
-- create an initial revision for the new attachment
v_revision_id := acs_message__edit_file (
- v_file_id, -- file_id
- p_title, -- title
+ v_file_id, -- file_id
+ p_title, -- title
p_description, -- description
p_mime_type, -- mime_type
- p_data, -- data
+ p_data, -- data
p_creation_date, -- creation_date
p_creation_user, -- creation_user
p_creation_ip, -- creation_ip
- p_is_live -- is_live
+ p_is_live -- is_live
);
return v_file_id;
end;' language 'plpgsql';
+create or replace function acs_message__new_file (integer,integer,varchar,varchar,
+text,varchar,integer,timestamptz,integer,varchar,boolean,varchar)
+returns integer as '
+declare
+ p_message_id alias for $1;
+ p_file_id alias for $2; -- default null
+ p_file_name alias for $3;
+ p_title alias for $4; -- default null
+ p_description alias for $5; -- default null
+ p_mime_type alias for $6; -- default ''text/plain''
+ p_data alias for $7; -- default null
+ p_creation_date alias for $8; -- default sysdate
+ p_creation_user alias for $9; -- default null
+ p_creation_ip alias for $10; -- default null
+ p_is_live alias for $11; -- default ''t''
+ p_storage_type alias for $12; -- default ''file''
+begin
+ return acs_message__new_file (p_message_id,
+ p_file_id,
+ p_file_name,
+ p_title,
+ p_description,
+ p_mime_type,
+ p_data,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ p_is_live,
+ p_storage_type,
+ null
+ );
+end;' language 'plpgsql';
+
create or replace function acs_message__edit_file (integer,varchar,text,varchar,
integer,timestamptz,integer,varchar,boolean)
returns integer as '
@@ -326,13 +407,13 @@
v_revision_id cr_revisions.revision_id%TYPE;
begin
v_revision_id := content_revision__new (
- p_title, -- title
+ p_title, -- title
p_description,
current_timestamp,
p_mime_type, -- mime_type
NULL,
p_data, -- data
- p_file_id, -- item_id
+ p_file_id, -- item_id
NULL,
p_creation_date, -- creation_date
p_creation_user, -- creation_user
@@ -357,7 +438,7 @@
end;' language 'plpgsql';
create or replace function acs_message__new_image (integer,integer,varchar,varchar,
-text,varchar,integer,integer,integer,timestamptz,integer,varchar,boolean,varchar)
+text,varchar,integer,integer,integer,timestamptz,integer,varchar,boolean,varchar,integer)
returns integer as '
declare
p_message_id alias for $1;
@@ -374,46 +455,85 @@
p_creation_ip alias for $12; -- default null
p_is_live alias for $13; -- default ''t''
p_storage_type alias for $14; -- default ''file''
+ p_package_id alias for $15; -- default null
v_image_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
begin
v_image_id := content_item__new (
p_file_name, -- name
p_message_id, -- parent_id
p_image_id, -- item_id
- null, -- locale
+ null, -- locale
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- null, -- context_id
+ null, -- context_id
p_creation_ip, -- creation_ip
- ''content_item'', -- item_subtype
- ''content_revision'', -- content_type
- null, -- title
- null, -- description
- ''text/plain'', -- mime_type
- null, -- nls_language
- null, -- text
- ''file'' -- storage_type
+ ''content_item'', -- item_subtype
+ ''content_revision'', -- content_type
+ null, -- title
+ null, -- description
+ ''text/plain'', -- mime_type
+ null, -- nls_language
+ null, -- text
+ ''file'', -- storage_type
+ p_package_id -- package_id
);
-- create an initial revision for the new attachment
v_revision_id := acs_message__edit_image (
v_image_id, -- image_id
- p_title, -- title
+ p_title, -- title
p_description, -- description
p_mime_type, -- mime_type
- p_data, -- data
- p_width, -- width
- p_height, -- height
+ p_data, -- data
+ p_width, -- width
+ p_height, -- height
p_creation_date, -- creation_date
p_creation_user, -- creation_user
p_creation_ip, -- creation_ip
- p_is_live -- is_live
+ p_is_live -- is_live
);
return v_image_id;
end;' language 'plpgsql';
+create or replace function acs_message__new_image (integer,integer,varchar,varchar,
+text,varchar,integer,integer,integer,timestamptz,integer,varchar,boolean,varchar)
+returns integer as '
+declare
+ p_message_id alias for $1;
+ p_image_id alias for $2; -- default null
+ p_file_name alias for $3;
+ p_title alias for $4; -- default null
+ p_description alias for $5; -- default null
+ p_mime_type alias for $6; -- default ''text/plain''
+ p_data alias for $7; -- default null
+ p_width alias for $8; -- default null
+ p_height alias for $9; -- default null
+ p_creation_date alias for $10; -- default sysdate
+ p_creation_user alias for $11; -- default null
+ p_creation_ip alias for $12; -- default null
+ p_is_live alias for $13; -- default ''t''
+ p_storage_type alias for $14; -- default ''file''
+begin
+ return acs_message__new_image (p_message_id,
+ p_image_id,
+ p_file_name,
+ p_title,
+ p_description,
+ p_mime_type,
+ p_data,
+ p_width,
+ p_height,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ p_is_live,
+ p_storage_type,
+ null
+ );
+end;' language 'plpgsql';
+
create or replace function acs_message__edit_image (integer,varchar,text,varchar,
integer,integer,integer,timestamptz,integer,varchar,boolean)
returns integer as '
@@ -473,7 +593,7 @@
-- XXX should just call content_extlink.new
create or replace function acs_message__new_extlink (varchar,integer,varchar,
-varchar,text,integer,timestamptz,integer,varchar)
+varchar,text,integer,timestamptz,integer,varchar,integer)
returns integer as '
declare
p_name alias for $1; -- default null
@@ -485,23 +605,52 @@
p_creation_date alias for $7; -- default sysdate
p_creation_user alias for $8; -- default null
p_creation_ip alias for $9; -- default null
+ p_package_id alias for $10; -- default null
v_extlink_id cr_extlinks.extlink_id%TYPE;
begin
v_extlink_id := content_extlink__new (
- p_name, -- name
- p_url, -- url
- p_label, -- label
+ p_name, -- name
+ p_url, -- url
+ p_label, -- label
p_description, -- description
p_parent_id, -- parent_id
p_extlink_id, -- extlink_id
p_creation_date, -- creation_date
p_creation_user, -- creation_user
- p_creation_ip -- creation_ip
+ p_creation_ip, -- creation_ip
+ p_package_id
);
return v_extlink_id;
end;' language 'plpgsql';
+create or replace function acs_message__new_extlink (varchar,integer,varchar,
+varchar,text,integer,timestamptz,integer,varchar)
+returns integer as '
+declare
+ p_name alias for $1; -- default null
+ p_extlink_id alias for $2; -- default null
+ p_url alias for $3;
+ p_label alias for $4; -- default null
+ p_description alias for $5; -- default null
+ p_parent_id alias for $6;
+ p_creation_date alias for $7; -- default sysdate
+ p_creation_user alias for $8; -- default null
+ p_creation_ip alias for $9; -- default null
+begin
+ return acs_message__new_extlink (p_name,
+ p_extlink_id,
+ p_url,
+ p_label,
+ p_description,
+ p_parent_id,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ null
+ );
+end;' language 'plpgsql';
+
-- XXX should just edit extlink
create or replace function acs_message__edit_extlink (integer,varchar,varchar,text)
returns integer as '
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-messaging/sql/postgresql/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-reference/sql/oracle/acs-reference-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-reference/sql/oracle/acs-reference-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-reference/sql/oracle/acs-reference-create.sql 4 Mar 2004 14:52:45 -0000 1.6
+++ openacs-4/packages/acs-reference/sql/oracle/acs-reference-create.sql 12 Mar 2004 18:48:52 -0000 1.7
@@ -134,7 +134,8 @@
creation_date => creation_date,
creation_user => creation_user,
creation_ip => creation_ip,
- object_type => object_type
+ object_type => object_type,
+ title => source
);
if first_names is not null and last_name is not null then
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-reference/sql/oracle/upgrade/upgrade-5.0.2-5.0.2d1.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql 4 Mar 2004 14:52:46 -0000 1.10
+++ openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql 12 Mar 2004 18:48:53 -0000 1.11
@@ -108,6 +108,9 @@
now(),
p_creation_user,
p_creation_ip,
+ null,
+ ''t'',
+ p_source,
null
);
Index: openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-msg-types-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-msg-types-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-msg-types-create.sql 4 Mar 2004 14:52:46 -0000 1.6
+++ openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-msg-types-create.sql 12 Mar 2004 18:48:53 -0000 1.7
@@ -95,7 +95,8 @@
v_spec_parse_level integer;
begin
v_msg_type_id := acs_object.new(
- object_type => 'acs_sc_msg_type'
+ object_type => 'acs_sc_msg_type',
+ title => msg_type_name
);
insert into acs_sc_msg_types (
Index: openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-packages-create.sql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-packages-create.sql 4 Mar 2004 14:52:46 -0000 1.14
+++ openacs-4/packages/acs-service-contract/sql/oracle/acs-sc-packages-create.sql 12 Mar 2004 18:48:53 -0000 1.15
@@ -152,7 +152,10 @@
is
v_contract_id acs_sc_contracts.contract_id%TYPE;
begin
- v_contract_id := acs_object.new( object_type=>'acs_sc_contract');
+ v_contract_id := acs_object.new(
+ object_type => 'acs_sc_contract',
+ title => contract_name
+ );
insert into acs_sc_contracts (
contract_id,
@@ -250,7 +253,10 @@
begin
v_contract_id := acs_sc_contract.get_id(contract_name);
- v_operation_id := acs_object.new (object_type=>'acs_sc_operation');
+ v_operation_id := acs_object.new (
+ object_type => 'acs_sc_operation',
+ title => operation_name
+ );
v_operation_inputtype_id := acs_sc_msg_type.get_id(operation_inputtype);
v_operation_outputtype_id := acs_sc_msg_type.get_id(operation_outputtype);
@@ -341,7 +347,10 @@
is
v_impl_id acs_sc_impls.impl_id%TYPE;
begin
- v_impl_id := acs_object.new (object_type => 'acs_sc_implementation');
+ v_impl_id := acs_object.new (
+ object_type => 'acs_sc_implementation',
+ title => impl_pretty_name
+ );
insert into acs_sc_impls (
impl_id,
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-service-contract/sql/oracle/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-msg-types-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-msg-types-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-msg-types-create.sql 4 Mar 2004 14:52:46 -0000 1.6
+++ openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-msg-types-create.sql 12 Mar 2004 18:48:54 -0000 1.7
@@ -54,6 +54,9 @@
now(),
null,
null,
+ null,
+ ''t'',
+ p_msg_type_name,
null
);
Index: openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql 4 Mar 2004 14:52:46 -0000 1.12
+++ openacs-4/packages/acs-service-contract/sql/postgresql/acs-sc-packages-create.sql 12 Mar 2004 18:48:54 -0000 1.13
@@ -12,6 +12,9 @@
now(),
null,
null,
+ null,
+ ''t'',
+ p_contract_name,
null
);
@@ -121,6 +124,9 @@
now(),
null,
null,
+ null,
+ ''t'',
+ p_operation_name,
null
);
@@ -224,6 +230,9 @@
now(),
null,
null,
+ null,
+ ''t'',
+ p_impl_pretty_name,
null
);
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-service-contract/sql/postgresql/upgrade/upgrade-5.1.0d1-5.1.0d2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-subsite/tcl/group-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/acs-subsite/tcl/group-procs.tcl 4 Mar 2004 14:52:48 -0000 1.21
+++ openacs-4/packages/acs-subsite/tcl/group-procs.tcl 12 Mar 2004 18:48:54 -0000 1.22
@@ -269,6 +269,14 @@
set [join $set_clauses ", "]
where group_id = :group_id
"
+
+ if {[info exists group_name]} {
+ db_dml update_object_title {
+ update acs_objects
+ set title = :group_name
+ where object_id = :group_id
+ }
+ }
}
ad_proc -public group::possible_member_states {} {
Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/edit.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-subsite/www/admin/rel-segments/edit.tcl 4 Mar 2004 14:52:48 -0000 1.4
+++ openacs-4/packages/acs-subsite/www/admin/rel-segments/edit.tcl 12 Mar 2004 18:48:55 -0000 1.5
@@ -42,6 +42,11 @@
set segment_name = :segment_name
where segment_id = :segment_id
}
+ db_dml update_object_title {
+ update acs_objects
+ set title = :segment_name
+ where object_id = :segment_id
+ }
} -after_submit {
ad_returnredirect $view_url
ad_script_abort
Index: openacs-4/packages/acs-subsite/www/user/portrait/upload-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/portrait/Attic/upload-2.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-subsite/www/user/portrait/upload-2.tcl 4 Mar 2004 14:52:48 -0000 1.7
+++ openacs-4/packages/acs-subsite/www/user/portrait/upload-2.tcl 12 Mar 2004 18:48:55 -0000 1.8
@@ -169,13 +169,19 @@
update images
set width = :original_width, height = :original_height
where image_id = :revision_id"
+
db_dml update_photo_info "
update cr_revisions
set description = :portrait_comment,
publish_date = sysdate,
mime_type = :guessed_file_type,
title = :title
where revision_id = :revision_id"
+
+ db_dml update_object_title "
+ update acs_objects
+ set title = :title
+ where object_id = :revision_id"
}
}
}
Index: openacs-4/packages/acs-subsite/www/user/portrait/upload-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/portrait/Attic/upload-2.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-subsite/www/user/portrait/upload-2.xql 4 Mar 2004 14:52:48 -0000 1.4
+++ openacs-4/packages/acs-subsite/www/user/portrait/upload-2.xql 12 Mar 2004 18:48:55 -0000 1.5
@@ -43,4 +43,14 @@
+
+
+
+ update acs_objects
+ set title = :title
+ where object_id = :revision_id
+
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/acs-kernel-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-kernel-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-tcl/tcl/acs-kernel-procs.tcl 10 Mar 2004 16:26:46 -0000 1.8
+++ openacs-4/packages/acs-tcl/tcl/acs-kernel-procs.tcl 12 Mar 2004 18:48:55 -0000 1.9
@@ -36,6 +36,8 @@
ad_proc -public ad_verify_install {} {
Returns 1 if the acs is properly installed, 0 otherwise.
} {
+ # define util_memoize with proc here to avoid error messages about multiple
+ # defines.
if { ![db_table_exists apm_packages] || ![db_table_exists site_nodes] } {
proc util_memoize {script {max_age ""}} {eval $script}
return 0
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v
diff -u -r1.66 -r1.67
--- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 4 Mar 2004 14:52:49 -0000 1.66
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 12 Mar 2004 18:48:55 -0000 1.67
@@ -746,6 +746,12 @@
max_n_values = :max_n_values
where parameter_id = :parameter_id
}
+
+ db_dml object_title_update {
+ update acs_objects
+ set title = :parameter_name
+ where object_id = :parameter_id
+ }
return $parameter_id
}
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.xql,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/acs-tcl/tcl/apm-procs.xql 4 Mar 2004 14:52:49 -0000 1.19
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.xql 12 Mar 2004 18:48:55 -0000 1.20
@@ -87,6 +87,14 @@
+
+
+ update acs_objects
+ set title = :parameter_name
+ where object_id = :parameter_id
+
+
+
select package_id, parameter_id, parameter_name
Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v
diff -u -r1.44 -r1.45
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 8 Mar 2004 14:07:12 -0000 1.44
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 12 Mar 2004 18:48:55 -0000 1.45
@@ -223,6 +223,7 @@
update the name of a person
} {
db_dml update_person {}
+ db_dml update_object_title {}
name_flush -person_id $person_id
}
@@ -627,6 +628,9 @@
}
}
db_dml party_update {}
+ if {[info exists email]} {
+ db_dml object_title_update {}
+ }
acs_user::flush_cache -user_id $party_id
}
Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.xql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.xql 4 Mar 2004 14:52:49 -0000 1.14
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.xql 12 Mar 2004 18:48:55 -0000 1.15
@@ -56,6 +56,16 @@
+
+
+
+ update acs_objects
+ set title = :first_names || ' ' || :last_name
+ where object_id = :person_id
+
+
+
+
@@ -136,6 +146,17 @@
+
+
+
+ update acs_objects
+ set title = :email
+ where object_id = :party_id
+ and object_type = 'party'
+
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v
diff -u -r1.54 -r1.55
--- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 4 Mar 2004 14:52:49 -0000 1.54
+++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 12 Mar 2004 18:48:55 -0000 1.55
@@ -48,6 +48,7 @@
mount object at site node
} {
db_dml mount_object {}
+ db_dml update_object_package_id {}
update_cache -node_id $node_id
apm_invoke_callback_proc -package_key [apm_package_key_from_id $object_id] -type "after-mount" -arg_list [list node_id $node_id package_id $object_id]
@@ -64,6 +65,7 @@
set child_node_ids [get_children -all -node_id $node_id -element node_id]
db_dml rename_node {}
+ db_dml update_object_title {}
update_cache -sync_children -node_id $node_id
}
@@ -151,6 +153,7 @@
apm_invoke_callback_proc -package_key [apm_package_key_from_id $package_id] -type before-unmount -arg_list [list package_id $package_id node_id $node_id]
db_dml unmount_object {}
+ db_dml update_object_package_id {}
update_cache -node_id $node_id
}
Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql 4 Mar 2004 14:52:49 -0000 1.9
+++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql 12 Mar 2004 18:48:55 -0000 1.10
@@ -9,6 +9,14 @@
+
+
+ update acs_objects
+ set package_id = :object_id
+ where object_id = :node_id
+
+
+
update site_nodes
@@ -17,6 +25,14 @@
+
+
+ update acs_objects
+ set title = :name
+ where object_id = :node_id
+
+
+
update site_nodes
@@ -25,6 +41,14 @@
+
+
+ update acs_objects
+ set package_id = null
+ where object_id = :node_id
+
+
+
select node_id