Index: openacs-4/packages/cms/www/modules/permissions/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/permissions/index-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,52 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select * from (
+ select
+ p.pretty_name,
+ p.privilege,
+ u.party_id as grantee_id,
+ n.first_names || ' ' || n.last_name as grantee_name,
+ u.email
+ from
+ acs_permissions per, acs_privileges p, parties u,
+ persons n,
+ (select object_id from acs_objects
+ connect by prior context_id = object_id
+ and prior security_inherit_p = 't'
+ start with object_id = :object_id) o
+ where
+ per.privilege = p.privilege
+ and
+ per.grantee_id = u.party_id
+ and
+ per.object_id = o.object_id
+ and
+ u.party_id = n.person_id
+ union
+ select
+ p.pretty_name, p.privilege,
+ -1 as grantee_id, 'All Users' as grantee_name, ' ' as email
+ from
+ acs_permissions per, acs_privileges p, parties u
+ where
+ u.party_id = -1
+ and
+ per.object_id = :object_id
+ and
+ per.privilege = p.privilege
+ and
+ per.grantee_id = u.party_id
+ ) order by
+ grantee_name, privilege
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/permissions/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/permissions/index-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,63 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select * from (
+ select
+ p.pretty_name,
+ p.privilege,
+ u.party_id as grantee_id,
+ n.first_names || ' ' || n.last_name as grantee_name,
+ u.email
+ from
+ acs_permissions per, acs_privileges p, parties u,
+ persons n,
+ (select o2.object_id
+ from (select * from acs_objects where object_id = :object_id) o1,
+ acs_objects o2
+ where o2.tree_sortkey <= o1.tree_sortkey
+ and o1.tree_sortkey like (o2.tree_sortkey || '%')
+ and o2.tree_sortkey >= (select case when max(ob2.tree_sortkey) is null
+ then '/'
+ else max(ob2.tree_sortkey) end
+ from (select *
+ from acs_objects
+ where object_id = :object_id) ob1,
+ acs_objects ob2
+ where ob2.tree_sortkey <= ob1.tree_sortkey
+ and ob1.tree_sortkey like (ob2.tree_sortkey || '%')
+ and ob2.security_inherit = 'f')) o
+ where
+ per.privilege = p.privilege
+ and
+ per.grantee_id = u.party_id
+ and
+ per.object_id = o.object_id
+ and
+ u.party_id = n.person_id
+ union
+ select
+ p.pretty_name, p.privilege,
+ -1 as grantee_id, 'All Users' as grantee_name, ' ' as email
+ from
+ acs_permissions per, acs_privileges p, parties u
+ where
+ u.party_id = -1
+ and
+ per.object_id = :object_id
+ and
+ per.privilege = p.privilege
+ and
+ per.grantee_id = u.party_id
+ ) order by
+ grantee_name, privilege
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/permissions/permission-alter-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/permission-alter-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/permissions/permission-alter-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ acs_object.name(:object_id) as object_name,
+ acs_object.name(:grantee_id) as grantee_name,
+ acs_permission.permission_p(:object_id, :user_id, 'cm_perm') as user_cm_perm
+ from
+ dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/permissions/permission-alter-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/permission-alter-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/permissions/permission-alter-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ acs_object__name(:object_id) as object_name,
+ acs_object__name(:grantee_id) as grantee_name,
+ acs_permission__permission_p(:object_id, :user_id, 'cm_perm') as user_cm_perm
+ from
+ dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/search/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/search/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/search/index.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ select
+ label, mime_type as value
+ from
+ cr_mime_types
+
+
+
+
+
+
+
+
+ select count(*) from ($sql_query)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/search/search-results.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/search/search-results.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/search/search-results.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ select * from ($sql_query)
+ where row_index >= :start_row and row_index < (:start_row + :rows_per_page)
+ order by search_score desc, title
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/ancestors-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/ancestors-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/ancestors-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,69 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ t.tree_level, t.parent_id,
+ content_folder.is_folder(i.item_id) is_folder,
+ content_item.get_title(t.parent_id) as title
+ from
+ cr_items i,
+ (
+ select
+ parent_id, level as tree_level
+ from
+ cr_items
+ where
+ parent_id ^= 0
+ connect by
+ prior parent_id = item_id
+ start with
+ item_id = :item_id
+ ) t
+ where
+ i.item_id = t.parent_id
+ order by
+ tree_level desc
+
+
+
+
+
+
+
+ select
+ $index_page_sql
+ -- does it have a template
+ content_item.get_template( item_id, 'public' ) template_id,
+ -- symlinks to this folder will have the path of this item
+ content_item.get_virtual_path( item_id, :root_id ) virtual_path,
+ content_item.get_path(
+ content_symlink.resolve( item_id ), :root_id ) physical_path,
+ content_folder.is_folder( item_id ) is_folder,
+ live_revision
+ from
+ cr_items
+ where
+ item_id = :item_id
+
+
+
+
+
+
+
+ select
+ content_item.get_template(
+ nvl( content_folder.get_index_page( :item_id ), 0), 'public' )
+ from
+ dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/ancestors-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/ancestors-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/ancestors-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,70 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ t.tree_level, t.parent_id,
+ content_folder__is_folder(i.item_id) as is_folder,
+ content_item__get_title(t.parent_id,'f') as title
+ from
+ cr_items i,
+ (
+ select
+ i2.parent_id, tree_level(i2.tree_sortkey) as tree_level
+ from
+ (select * from cr_items where item_id = :item_id) i1, cr_items i2
+ where
+ i2.parent_id != 0
+ and
+ i2.tree_sortkey <= i1.tree_sortkey
+ and
+ i1.tree_sortkey like (i2.tree_sortkey || '%')
+ ) t
+ where
+ i.item_id = t.parent_id
+ order by
+ tree_level desc
+
+
+
+
+
+
+
+
+ select
+ $index_page_sql
+ -- does it have a template
+ content_item__get_template( item_id, 'public' ) as template_id,
+ -- symlinks to this folder will have the path of this item
+ content_item__get_virtual_path( item_id, :root_id ) as virtual_path,
+ content_item__get_path(
+ content_symlink__resolve( item_id ), :root_id ) as physical_path,
+ content_folder__is_folder( item_id ) as is_folder,
+ live_revision
+ from
+ cr_items
+ where
+ item_id = :item_id
+
+
+
+
+
+
+
+ select
+ content_item__get_template(
+ coalesce( content_folder__get_index_page( :item_id ), 0), 'public' )
+ from
+ dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/attributes-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/attributes-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin
+ $subfolder_sql
+ $symlink_sql
+ end;
+
+
+
+
+
+
+
+ select
+ content_folder.is_registered(:folder_id,'content_folder') allow_subfolders,
+ content_folder.is_registered(:folder_id,'content_symlink') allow_symlinks,
+ content_folder.is_registered(:folder_id,'content_template') allow_templates
+ from dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/attributes-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/attributes-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+ postgresql7.1
+
+
+
+-- FIXME: dynamic sql
+
+ begin
+ $subfolder_sql
+ $symlink_sql
+ return null;
+ end;
+
+
+
+
+
+
+
+
+ select
+ content_folder__is_registered(:folder_id,'content_folder','f') as allow_subfolders,
+ content_folder__is_registered(:folder_id,'content_symlink','f') as allow_symlinks,
+ content_folder__is_registered(:folder_id,'content_template','f') as allow_templates
+
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/attributes.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/attributes.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select label from cr_folders where folder_id = :folder_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/copy-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/copy-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/copy-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,52 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_item.copy(
+ item_id => :cp_item_id,
+ target_folder_id => :folder_id,
+ creation_user => :user_id,
+ creation_ip => :ip
+ );
+ end;
+
+
+
+
+
+
+
+ select
+ content_item.get_path( :folder_id )
+ from
+ dual
+
+
+
+
+
+
+
+
+ select
+ content_item.get_title(item_id) title,
+ content_item.get_path(item_id,:root_id) name,
+ item_id, parent_id
+ from
+ cr_items
+ where
+ item_id in ([join $clip_items ","])
+ and
+ -- only for those items which user has cm_examine
+ cms_permission.permission_p(item_id, :user_id, 'cm_examine') = 't'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/copy-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/copy-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/copy-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,53 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+
+ select content_item__copy(
+ :cp_item_id,
+ :folder_id,
+ :user_id,
+ :ip
+ );
+
+
+
+
+
+
+
+
+ select
+ content_item__get_path( :folder_id, null )
+ from
+ dual
+
+
+
+
+
+
+
+
+ select
+ content_item__get_title(item_id, 'f') as title,
+ content_item__get_path(item_id,:root_id) as name,
+ item_id, parent_id
+ from
+ cr_items
+ where
+ item_id in ([join $clip_items ","])
+ and
+ -- only for those items which user has cm_examine
+ cms_permission__permission_p(item_id, :user_id, 'cm_examine') = 't'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/create-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/Attic/create-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/create-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ :1 := content_folder.new(
+ name => :name,
+ label => :label,
+ description => :description,
+ parent_id => :create_parent_id,
+ creation_user => :user_id,
+ creation_ip => :ip );
+ end;
+
+
+
+
+
+
+
+ begin
+ content_folder.register_content_type(
+ folder_id => :folder_id,
+ content_type => 'content_template',
+ include_subtypes => 'f'
+ );
+ end;
+
+
+
+
+
+
+
+ select content_item.get_path(:create_parent_id) from dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/create-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/Attic/create-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/create-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_folder__new (
+ :name,
+ :label,
+ :description,
+ :create_parent_id,
+ null,
+ null,
+ now(),
+ :user_id,
+ :ip );
+
+
+
+
+
+
+
+
+
+ select content_folder__register_content_type(
+ :folder_id,
+ 'content_template',
+ 'f'
+ );
+
+
+
+
+
+
+
+
+
+ select content_item__get_path(:create_parent_id, null)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/delete-items-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete-items-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/delete-items-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ $delete_proc (
+ $delete_key => :del_item_id
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/delete-items-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete-items-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/delete-items-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+
+ select $delete_proc (
+ :del_item_id
+ );
+
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/delete-items.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete-items.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/delete-items.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ select
+ parent_id
+ from
+ cr_resolved_items
+ where
+ resolved_id = :del_item_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/delete-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/Attic/delete-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/delete-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin content_folder.delete(:id); end;
+
+
+
+
+
+
+
+ select content_folder.is_empty(:id) from dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/delete-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/Attic/delete-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/delete-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_folder__delete(:id)
+
+
+
+
+
+
+
+ select content_folder__is_empty(:id)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/index-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,55 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select content_symlink.resolve( :id ) from dual
+
+
+
+
+
+
+
+
+ select content_folder.get_index_page($parent_var) from dual
+
+
+
+
+
+
+
+
+ select
+ i.item_id id,
+ content_item.get_path(i.item_id) path
+ from
+ cr_items i, cr_symlinks s
+ where
+ i.item_id = s.target_id
+ and
+ i.item_id = :original_id
+
+
+
+
+
+
+
+ select
+ parent_id, NVL(label, name) label, description
+ from
+ cr_items i, cr_folders f
+ where
+ i.item_id = f.folder_id
+ and
+ f.folder_id = :id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,56 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_symlink__resolve( :id )
+
+
+
+
+
+
+
+
+ select content_folder__get_index_page($parent_var)
+
+
+
+
+
+
+
+
+ select
+ i.item_id id,
+ content_item__get_path(i.item_id, null) as path
+ from
+ cr_items i, cr_symlinks s
+ where
+ i.item_id = s.target_id
+ and
+ i.item_id = :original_id
+
+
+
+
+
+
+
+ select
+ parent_id, coalesce(label, name) label, description
+ from
+ cr_items i, cr_folders f
+ where
+ i.item_id = f.folder_id
+ and
+ f.folder_id = :id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/index.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ select name from cm_modules where key = :mount_point
+
+
+
+
+
+
+
+
+ select
+ content_type
+ from
+ cr_folder_type_map
+ where
+ folder_id = :root_id
+
+
+
+
+
+
+
+
+
+ select
+ content_type
+ from
+ cr_folder_type_map
+ where
+ folder_id = :id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/move-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/move-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/move-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,50 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_item.move(
+ item_id => :mv_item_id,
+ target_folder_id => :folder_id
+ );
+ end;
+
+
+
+
+
+
+
+ select
+ content_item.get_path( :folder_id )
+ from
+ dual
+
+
+
+
+
+
+
+
+ select
+ content_item.get_title(item_id) title,
+ content_item.get_path(item_id,:root_id) name,
+ item_id, parent_id
+ from
+ cr_items
+ where
+ item_id in ([join $clip_items ","])
+ and
+ -- only for those items which user has cm_write
+ cms_permission.permission_p(item_id, :user_id, 'cm_write') = 't'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/move-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/move-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/move-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_item__move(
+ :mv_item_id,
+ :folder_id
+ );
+
+
+
+
+
+
+
+
+ select
+ content_item__get_path( :folder_id, null )
+ from
+ dual
+
+
+
+
+
+
+
+
+ select
+ content_item__get_title(item_id, 'f') as title,
+ content_item__get_path(item_id,:root_id) as name,
+ item_id, parent_id
+ from
+ cr_items
+ where
+ item_id in ([join $clip_items ","])
+ and
+ -- only for those items which user has cm_write
+ cms_permission__permission_p(item_id, :user_id, 'cm_write') = 't'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/rename-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/rename-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/rename-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_folder.rename (
+ folder_id => :item_id,
+ name => :name,
+ label => :label,
+ description => :description
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/rename-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/rename-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/rename-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_folder__rename (
+ :item_id,
+ :name,
+ :label,
+ :description
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/rename.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/rename.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/rename.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ select
+ i.name, f.label, f.description
+ from
+ cr_items i, cr_folders f
+ where
+ i.item_id = :item_id
+ and
+ f.folder_id = :item_id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/symlink-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/symlink-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/symlink-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ :symlink_id := content_symlink.new(
+ name => :name,
+ label => :label,
+ target_id => :sym_item_id,
+ parent_id => :folder_id,
+ creation_date => sysdate,
+ creation_user => :user_id,
+ creation_ip => :ip
+ );
+ end;
+
+
+
+
+
+
+
+ select
+ content_item.get_title(item_id) title, 'symlink_to_' || name as name,
+ item_id
+ from
+ cr_items
+ where
+ item_id in ([join $clip_items ","])
+ and
+ -- only items which have are not symlinks
+ content_type ^= 'content_symlink'
+ and
+ -- only for those item which user has cm_examine
+ cms_permission.permission_p(item_id, :user_id, 'cm_examine') = 't'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/symlink-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/symlink-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/symlink-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,46 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_symlink__new(
+ :name,
+ :label,
+ :sym_item_id,
+ :folder_id,
+ null,
+ current_timestamp,
+ :user_id,
+ :ip
+ );
+
+
+
+
+
+
+
+
+ select
+ content_item__get_title(item_id,'f') as title, 'symlink_to_' || name as name,
+ item_id
+ from
+ cr_items
+ where
+ item_id in ([join $clip_items ","])
+ and
+ -- only items which have are not symlinks
+ content_type != 'content_symlink'
+ and
+ -- only for those item which user has cm_examine
+ cms_permission__permission_p(item_id, :user_id, 'cm_examine') = 't'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/type-register-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/type-register-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/type-register-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin
+ content_folder.register_content_type(
+ folder_id => :folder_id,
+ content_type => :type,
+ include_subtypes => 'f'
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/type-register-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/type-register-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/type-register-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_folder__register_content_type(
+ :folder_id,
+ :type,
+ 'f'
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/type-unregister-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/type-unregister-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/type-unregister-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_folder.unregister_content_type(
+ folder_id => :folder_id,
+ content_type => :type_key,
+ include_subtypes => 'f'
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/sitemap/type-unregister-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/type-unregister-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/sitemap/type-unregister-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_folder__unregister_content_type(
+ :folder_id,
+ :type_key,
+ 'f'
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/assets.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/assets.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ select width, height from images
+ where image_id = :revision_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/copy-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/copy-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/copy-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+ oracle8.1.6
+
+
+
+ declare copy_id integer; begin
+ copy_id := content_item.copy2(
+ :template_id, :folder_id, :creation_user, :creation_ip
+ );
+ insert into cr_templates (template_id) values (copy_id);
+ end;
+
+
+
+
+
+
+ select content_item.get_path(:folder_id) from dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/copy-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/copy-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/copy-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ declare
+ copy_id integer;
+ begin
+ copy_id := content_item__copy2(
+ :template_id, :folder_id, :creation_user, :creation_ip
+ );
+
+ insert into cr_templates (template_id) values (copy_id);
+
+ return null;
+ end;
+
+
+
+
+
+
+ select content_item__get_path(:folder_id, null)
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/delete-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/delete-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/delete-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin content_template.delete(:template_id); end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/delete-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/delete-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/delete-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_template__delete(:template_id)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/move-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/move-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/move-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,24 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin
+ content_item.move(
+ :template_id, :folder_id
+ );
+ end;
+
+
+
+
+
+
+ select content_item.get_path(:folder_id) from dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/move-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/move-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/move-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_item__move(
+ :template_id, :folder_id
+ );
+
+
+
+
+
+
+
+ select content_item__get_path(:folder_id, null)
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/new-template-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-template-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/new-template-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin :1 := content_template.new(
+ template_id => :template_id,
+ name => :name,
+ parent_id => :folder_id,
+ creation_ip => :creation_ip,
+ creation_user => :creation_user
+ ); end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/new-template-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-template-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/new-template-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_template__new(
+ :name,
+ :folder_id,
+ :template_id,
+ now(),
+ :creation_user,
+ :creation_ip
+ );
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/publish-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/publish-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/publish-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ content_item.get_path(item_id) path, item_id
+ from
+ cr_items
+ where item_id = (
+ select item_id from cr_revisions where revision_id = :revision_id)
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/publish-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/publish-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/publish-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ content_item__get_path(item_id,null) as path, item_id
+ from
+ cr_items
+ where item_id = (
+ select item_id from cr_revisions where revision_id = :revision_id)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/publish.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/publish.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/publish.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ update cr_items set live_revision = :revision_id
+ where item_id = :template_id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template-create-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-create-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template-create-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin
+ :ret_val := content_template.new(
+ template_id => :template_id,
+ name => :name,
+ parent_id => :parent_id,
+ creation_user => :user_id,
+ creation_ip => :ip_address
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template-create-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-create-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template-create-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_template__new(
+ :name,
+ :parent_id,
+ :template_id,
+ now(),
+ :user_id,
+ :ip_address
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template-delete-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-delete-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template-delete-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_template.delete(:template_id);
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template-delete-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-delete-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template-delete-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_template__delete(:template_id);
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select content_symlink.resolve(:template_id) from dual
+
+
+
+
+
+
+
+
+ select content_item.get_path(:template_id, :root_id) from dual
+
+
+
+
+
+
+
+
+ select
+ content_item.get_title(item_id) title, item_id, use_context
+ from
+ cr_item_template_map
+ where
+ template_id = :template_id
+ order by
+ use_context
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_symlink__resolve(:template_id)
+
+
+
+
+
+
+
+
+ select content_item__get_path(:template_id, :root_id)
+
+
+
+
+
+
+
+
+ select
+ content_item__get_title(item_id, 'f') as title, item_id, use_context
+ from
+ cr_item_template_map
+ where
+ template_id = :template_id
+ order by
+ use_context
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/templates/template.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/templates/template.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ select
+ pretty_name, content_type, use_context
+ from
+ acs_object_types types, cr_type_template_map map
+ where
+ map.template_id = :template_id
+ and
+ types.object_type = map.content_type
+ order by
+ types.pretty_name
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_method.add_method (
+ content_type => :content_type,
+ content_method => :content_method,
+ is_default => 'f'
+ );
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_method__add_method (
+ :content_type,
+ :content_method,
+ 'f'
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-set-default-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-set-default-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-set-default-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_method.set_default_method (
+ content_type => :content_type,
+ content_method => :content_method
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-set-default-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-set-default-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-set-default-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_method__set_default_method (
+ :content_type,
+ :content_method
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-unregister-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-unregister-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-unregister-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_method.remove_method (
+ content_type => :content_type,
+ content_method => :content_method
+ );
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-unregister-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-unregister-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-unregister-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_method__remove_method (
+ :content_type,
+ :content_method
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-unset-default-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-unset-default-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-unset-default-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_method.unset_default_method (
+ content_type => :content_type
+ );
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method-unset-default-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-unset-default-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method-unset-default-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_method__unset_default_method (
+ :content_type
+ );
+
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content-method.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content-method.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+ select
+ m.content_method, label, is_default, description
+ from
+ cm_content_type_method_map map, cm_content_methods m
+ where
+ m.content_method = map.content_method
+ and
+ map.content_type = :content_type
+ order by
+ is_default desc, label
+
+
+
+
+
+
+
+
+ select
+ count( mime_type )
+ from
+ cr_content_mime_type_map
+ where
+ mime_type like ('%text/%')
+ and
+ content_type = :content_type
+
+
+
+
+
+
+
+
+ select
+ label, m.content_method
+ from
+ cm_content_methods m
+ where
+ not exists (
+ select 1
+ from
+ cm_content_type_method_map
+ where
+ content_method = m.content_method
+ and
+ content_type = :content_type )
+ $text_entry_filter_sql
+ order by
+ label
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/index-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,87 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ decode (supertype, 'acs_object', '', supertype) as parent_type,
+ decode (object_type, 'content_revision', '', object_type) as object_type,
+ pretty_name
+ from
+ acs_object_types
+ where
+ object_type ^= 'acs_object'
+ connect by
+ object_type = prior supertype
+ start with
+ object_type = :content_type
+ order by
+ rownum desc
+
+
+
+
+
+
+
+
+ select
+ attr.attribute_id, attr.attribute_name, attr.object_type,
+ attr.pretty_name as attribute_name_pretty,
+ datatype, types.pretty_name as pretty_name,
+ nvl(description_key,' ') as description_key,
+ description, widget
+ from
+ acs_attributes attr, acs_attribute_descriptions d,
+ cm_attribute_widgets w,
+ ( select
+ object_type, pretty_name
+ from
+ acs_object_types
+ where
+ object_type ^= 'acs_object'
+ connect by
+ prior supertype = object_type
+ start with
+ object_type = :content_type
+ ) types
+ where
+ attr.object_type = types.object_type
+ and
+ attr.attribute_id = w.attribute_id(+)
+ and
+ attr.attribute_name = d.attribute_name(+)
+ order by
+ types.object_type, sort_order, attr.attribute_name
+
+
+
+
+
+
+
+
+ select
+ template_id, ttmap.content_type, use_context, is_default, name,
+ content_item.get_path(
+ template_id,:root_id) as path,
+ (select pretty_name
+ from acs_object_types
+ where object_type = :content_type) pretty_name
+ from
+ cr_type_template_map ttmap, cr_items i
+ where
+ i.item_id = ttmap.template_id
+ and
+ ttmap.content_type = :content_type
+ order by
+ upper(name)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/index-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,88 @@
+
+
+
+ postgresql7.1
+
+
+
+ FIX ME CONNECT BY
+FIX ME ROWNUM
+
+ select
+ case when ot2.supertype = 'acs_object' then '' else ot2.supertype end as parent_type,
+ case when ot2.object_type = 'content_revision' then '' else ot2.object_type end as object_type,
+ pretty_name
+ from
+ (select * from acs_object_types where object_type = :content_type) ot1,
+ acs_object_types ot2
+ where
+ ot2.object_type != 'acs_object'
+ and
+ ot2.tree_sortkey <= ot1.tree_sortkey
+ and
+ ot1.tree_sortkey like (ot2.tree_sortkey || '%')
+ order by ot2.tree_sortkey desc
+
+
+
+
+
+
+
+ FIX ME CONNECT BY
+FIX ME OUTER JOIN
+
+ select
+ attr.attribute_id, attr.attribute_name, attr.object_type,
+ attr.pretty_name as attribute_name_pretty,
+ datatype, types.pretty_name as pretty_name,
+ coalesce(description_key,' ') as description_key,
+ description, widget
+ from
+ acs_attributes attr left outer join cm_attribute_widgets w using (attribute_id)
+ left outer join acs_attribute_descriptions d using (attribute_name)
+ ( select
+ o2.object_type, o2.pretty_name
+ from
+ (select * from acs_object_types where object_type = :content_type) o1,
+ acs_object_types o2
+ where
+ o2.object_type != 'acs_object'
+ and
+ o2.tree_sortkey <= o1.tree_sortkey
+ and
+ o1.tree_sortkey like (o2.tree_sortkey || '%')
+ ) types
+ where
+ attr.object_type = types.object_type
+ order by
+ types.object_type, sort_order, attr.attribute_name
+
+
+
+
+
+
+
+
+ select
+ template_id, ttmap.content_type, use_context, is_default, name,
+ content_item__get_path(
+ template_id,:root_id) as path,
+ (select pretty_name
+ from acs_object_types
+ where object_type = :content_type) pretty_name
+ from
+ cr_type_template_map ttmap, cr_items i
+ where
+ i.item_id = ttmap.template_id
+ and
+ ttmap.content_type = :content_type
+ order by
+ upper(name)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/index.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ select module_id from cm_modules where key = 'types'
+
+
+
+
+
+
+
+
+ select
+ pretty_name
+ from
+ acs_object_types
+ where
+ object_type = :content_type
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/mime-types-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/mime-types-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_type.register_mime_type (
+ content_type => :content_type,
+ mime_type => :mime_type
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/mime-types-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/mime-types-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_type__register_mime_type (
+ :content_type,
+ :mime_type
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/mime-types.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/mime-types.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+ select module_id from cm_modules where key = 'types'
+
+
+
+
+
+
+
+
+ select
+ pretty_name
+ from
+ acs_object_types
+ where
+ object_type = :content_type
+
+
+
+
+
+
+
+
+ select
+ label, mime_type
+ from
+ cr_mime_types
+ where
+ not exists ( select 1
+ from
+ cr_content_mime_type_map
+ where
+ mime_type = cr_mime_types.mime_type
+ and
+ content_type = :content_type )
+ order by
+ label
+
+
+
+
+
+
+
+
+ select
+ label, m.mime_type
+ from
+ cr_mime_types m, cr_content_mime_type_map map
+ where
+ m.mime_type = map.mime_type
+ and
+ map.content_type = :content_type
+ order by
+ label
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/register-templates-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/register-templates-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/register-templates-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin
+ content_type.register_template(
+ content_type => :content_type,
+ template_id => :template_id,
+ use_context => :context );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/register-templates-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/register-templates-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/register-templates-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_type__register_template(
+ :content_type,
+ :template_id,
+ :context,
+ 'f');
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/relation-register-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/relation-register-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ lpad(' ', level, '-') || pretty_name, object_type
+ from
+ acs_object_types
+ connect by
+ prior object_type = supertype
+ start with
+ object_type = 'content_revision'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/relation-register-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/relation-register-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select
+ lpad(' ', tree_level(tree_sortkey), '-') || pretty_name, object_type
+ from
+ acs_object_types
+ where tree_sortkey like (select tree_sortkey || '%'
+ from acs_object_types
+ where object_type = 'content_revision')
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/relation-register.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/relation-register.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ select module_id from cm_modules where key = 'types'
+
+
+
+
+
+
+
+
+ select
+ pretty_name
+ from
+ acs_object_types
+ where
+ object_type = :content_type
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/relation-unregister.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/Attic/relation-unregister.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/relation-unregister.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select module_id from cm_modules where key = 'types'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/relations.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/relations.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ select module_id from cm_modules where key = 'types'
+
+
+
+
+
+
+
+
+ select
+ pretty_name, target_type, relation_tag, min_n, max_n
+ from
+ cr_type_relations r, acs_object_types o
+ where
+ o.object_type = r.target_type
+ and
+ r.content_type = :type
+ order by
+ pretty_name, relation_tag
+
+
+
+
+
+
+
+
+ select
+ pretty_name, child_type, relation_tag, min_n, max_n
+ from
+ cr_type_children c, acs_object_types o
+ where
+ c.child_type = o.object_type
+ and
+ c.parent_type = :type
+ order by
+ pretty_name, relation_tag
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/set-default-template-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/set-default-template-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/set-default-template-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_type.set_default_template(
+ template_id => :template_id,
+ content_type => :content_type,
+ use_context => :context );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/set-default-template-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/set-default-template-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/set-default-template-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_type__set_default_template(
+ :content_type,
+ :template_id,
+ :context );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/unregister-mime-type-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-mime-type-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/unregister-mime-type-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_type.unregister_mime_type(
+ content_type => :content_type,
+ mime_type => :mime_type
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/unregister-mime-type-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-mime-type-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/unregister-mime-type-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_type__unregister_mime_type(
+ :content_type,
+ :mime_type
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/unregister-mime-type.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/Attic/unregister-mime-type.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/unregister-mime-type.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ select module_id from cm_modules where key = 'types'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/unregister-template-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-template-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/unregister-template-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_type.unregister_template(
+ template_id => :template_id,
+ content_type => :content_type,
+ use_context => :context );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/unregister-template-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-template-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/unregister-template-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_type__unregister_template(
+ :content_type,
+ :template_id,
+ :context );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register-1-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-1-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register-1-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ cm_form_widget.register_attribute_widget(
+ content_type => :content_type,
+ attribute_name => :attribute_name,
+ widget => :widget,
+ is_required => :is_required
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register-1-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-1-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register-1-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select cm_form_widget__register_attribute_widget(
+ :content_type,
+ :attribute_name,
+ :widget,
+ :is_required
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register-1.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-1.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register-1.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ update cm_attribute_widgets
+ set is_required = case when is_required = 't' then 'f' else 't' end
+ where attribute_id = :attribute_id
+ and widget = :widget
+
+
+
+
+
+
+
+ select 1
+ from
+ cm_attribute_widgets
+ where
+ attribute_id = :attribute_id
+ and
+ widget = :widget
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register-2-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-2-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register-2-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,34 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ f.param_id, param,
+ case when f.is_required = 't' then 't' else w.is_required end is_required, is_html,
+ nvl(w.value,f.default_value) default_value,
+ nvl(w.param_source,'literal') param_source
+ from
+ cm_form_widget_params f,
+ ( select
+ is_required, param_id, param_source, value
+ from
+ cm_attribute_widget_params awp, cm_attribute_widgets aw
+ where
+ awp.attribute_id = :attribute_id
+ and
+ awp.attribute_id = aw.attribute_id
+ ) w
+ where
+ widget = :widget
+ and
+ f.param_id = w.param_id (+)
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register-2.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+ select
+ a.pretty_name as attribute_name_pretty,
+ a.attribute_name,
+ t.pretty_name as content_type_pretty,
+ a.object_type as content_type
+ from
+ acs_attributes a, acs_object_types t
+ where
+ a.object_type = t.object_type
+ and
+ a.attribute_id = :attribute_id
+
+
+
+
+
+
+
+
+
+ select
+ f.param_id, param,
+ case when f.is_required = 't' then 't' else w.is_required end as is_required, is_html,
+ coalesce(w.value,f.default_value) as default_value,
+ coalesce(w.param_source,'literal') as param_source
+ from
+ cm_form_widget_params f left outer join
+ ( select
+ is_required, param_id, param_source, value
+ from
+ cm_attribute_widget_params awp, cm_attribute_widgets aw
+ where
+ awp.attribute_id = :attribute_id
+ and
+ awp.attribute_id = aw.attribute_id
+ ) w using (param_id)
+ where
+ widget = :widget
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register-3.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-3.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register-3.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+ select
+ distinct param
+ from
+ cm_form_widget_params f
+ where
+ is_required = 't'
+ and
+ widget = :widget
+ and
+ not exists (
+ select 1
+ from
+ cm_attribute_widget_params
+ where
+ attribute_id = :attribute_id
+ and
+ param_id = f.param_id )
+
+
+
+
+
+
+
+
+ select
+ pretty_name, attribute_name, object_type
+ from
+ acs_attributes
+ where
+ attribute_id = :attribute_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-register.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-register.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ select
+ module_id
+ from
+ cm_modules
+ where
+ key = 'types'
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-unregister-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-unregister-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-unregister-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ cm_form_widget.unregister_attribute_widget (
+ content_type => :content_type,
+ attribute_name => :attribute_name
+ );
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-unregister-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-unregister-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-unregister-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select cm_form_widget__unregister_attribute_widget (
+ :content_type,
+ :attribute_name
+ );
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/widget-unregister.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-unregister.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/widget-unregister.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ select
+ module_id
+ from
+ cm_modules
+ where
+ key = 'types'
+
+
+
+
+
+
+
+
+ select
+ attribute_name, object_type as content_type
+ from
+ acs_attributes
+ where
+ attribute_id = :attribute_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content_symlink/delete-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content_symlink/delete-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content_symlink/delete-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin content_symlink.delete(:id); end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/types/content_symlink/delete-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content_symlink/delete-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/types/content_symlink/delete-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_symlink__delete(:id)
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/create-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/create-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/create-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin :1 := acs_group.new(
+ group_id => :group_id,
+ group_name => :group_name,
+ email => :email,
+ url => :url,
+ creation_user => :user_id,
+ creation_ip => :ip ); end;
+
+
+
+
+
+
+ begin :1 := composition_rel.new(
+ object_id_one => :parent_id,
+ object_id_two => :group_id,
+ creation_user => :user_id,
+ creation_ip => :ip ); end;
+
+
+
+
+
+
+
+ select acs_object_id_seq.nextval from dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/create-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/create-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/create-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select acs_group__new(
+ :group_id,
+ 'group',
+ now(),
+ :user_id,
+ :ip
+ :email,
+ :url,
+ :group_name,
+ null,
+ null);
+
+
+
+
+
+
+
+
+ select composition_rel__new(
+ null,
+ ''composition_rel'',
+ :parent_id,
+ :group_id,
+ :user_id,
+ :ip ); end;
+
+
+
+
+
+
+
+ select acs_object_id_seq.nextval
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/delete-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/delete-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/delete-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin acs_group.delete(:id); end;
+
+
+
+
+
+
+
+ select NVL((select 'f' from dual where exists (
+ select 1 from acs_rels
+ where object_id_one = :id
+ and rel_type in ('composition_rel', 'membership_rel'))),
+ 't') as is_empty from dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/delete-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/delete-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/delete-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select acs_group__delete(:id)
+
+
+
+
+
+
+
+ select coalesce((select 'f' where exists (
+ select 1 from acs_rels
+ where object_id_one = :id
+ and rel_type in ('composition_rel', 'membership_rel'))),
+ 't') as is_empty
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/edit-user.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/edit-user.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/edit-user.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ update users $users_update where user_id = :item_id
+
+
+
+
+
+
+
+
+ update persons set first_names=:first_names, last_name = :last_name
+ where person_id=:item_id
+
+
+
+
+
+
+
+
+ update parties set email=:email, url=:url where party_id = :item_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/edit.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ update groups
+ set group_name = :group_name
+ where group_id = :group_id
+
+
+
+
+
+
+
+ update parties
+ set email = :email, url = :url
+ where party_id = :group_id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/index-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,48 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ cms_permission.permission_p (:module_id, :user_id, 'cm_admin')
+ from
+ dual
+
+
+
+
+
+
+
+ select
+ cms_permission.permission_p (:module_id, :user_id, 'cm_perm')
+ from
+ dual
+
+
+
+
+
+
+
+ select
+ g.group_id, g.group_name, p.email, p.url,
+ NVL((select 'f' from dual where exists (
+ select 1 from acs_rels
+ where object_id_one = :id
+ and rel_type in ('composition_rel', 'membership_rel'))),
+ 't') as is_empty
+ from
+ groups g, parties p
+ where
+ g.group_id = :id
+ and
+ p.party_id = :id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/index-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,48 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ cms_permission__permission_p (:module_id, :user_id, 'cm_admin')
+ from
+ dual
+
+
+
+
+
+
+
+ select
+ cms_permission__permission_p (:module_id, :user_id, 'cm_perm')
+ from
+ dual
+
+
+
+
+
+
+
+ select
+ g.group_id, g.group_name, p.email, p.url,
+ coalesce((select 'f' where exists (
+ select 1 from acs_rels
+ where object_id_one = :id
+ and rel_type in ('composition_rel', 'membership_rel'))),
+ 't') as is_empty
+ from
+ groups g, parties p
+ where
+ g.group_id = :id
+ and
+ p.party_id = :id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/index.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ select
+ party_id group_id, 'All Users' as group_name,
+ email, url, 'f' as is_empty
+ from
+ parties
+ where
+ party_id = -1
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/make-admin-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/make-admin-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/make-admin-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ declare
+ cursor c_module_cur is
+ select module_id from cm_modules;
+ v_module_id cm_modules.module_id%TYPE;
+ begin
+ open c_module_cur;
+ loop
+ fetch c_module_cur into v_module_id;
+ exit when c_module_cur%NOTFOUND;
+ cms_permission.grant_permission (
+ v_module_id, :user_id, 'cm_admin', :target_user_id, 't'
+ );
+ end loop;
+ close c_module_cur;
+
+ cms_permission.grant_permission (
+ content_item.get_root_folder, :user_id, 'cm_admin', :target_user_id, 't'
+ );
+
+ cms_permission.grant_permission (
+ content_template.get_root_folder, :user_id, 'cm_admin', :target_user_id, 't'
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/make-admin-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/make-admin-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/make-admin-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ declare
+ c_module_cur record;
+ begin
+ for c_module_cur in select module_id from cm_modules
+ loop
+ PERFORM cms_permission__grant_permission (
+ c_module_cur.module_id, :user_id, 'cm_admin', :target_user_id, 't'
+ );
+ end loop;
+
+ PERFORM cms_permission__grant_permission (
+ content_item.get_root_folder, :user_id, 'cm_admin', :target_user_id, 't'
+ );
+
+ PERFORM cms_permission__grant_permission (
+ content_template.get_root_folder, :user_id, 'cm_admin', :target_user_id, 't'
+ );
+
+ return null;
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/one-user-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/one-user-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/one-user-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ p.first_names, p.last_name,
+ pp.email, pp.url,
+ u.screen_name,
+ to_char(u.last_visit, 'YYYY/MM/DD HH24:MI') as last_visit,
+ to_char(u.no_alerts_until, 'YYYY/MM/DD') as no_alerts_until
+ from
+ persons p, parties pp, users u
+ where
+ p.person_id = :id
+ and
+ pp.party_id = :id
+ and
+ u.user_id = :id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/one-user-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/one-user-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/one-user-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ p.first_names, p.last_name,
+ pp.email, pp.url,
+ u.screen_name,
+ to_char(u.last_visit, 'YYYY/MM/DD HH24:MI') as last_visit,
+ to_char(u.no_alerts_until, 'YYYY/MM/DD') as no_alerts_until
+ from
+ persons p, parties pp, users u
+ where
+ p.person_id = :id
+ and
+ pp.party_id = :id
+ and
+ u.user_id = :id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/one-user.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/one-user.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/one-user.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ select
+ g.group_name, g.group_id
+ from
+ groups g, group_member_map m
+ where
+ m.group_id = g.group_id
+ and
+ m.member_id = :id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/user-assoc-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-assoc-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/user-assoc-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,53 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ declare
+ v_id membership_rels.rel_id%TYPE;
+ cursor c_rel_cur is
+ select
+ m.rel_id
+ from
+ acs_rels r, membership_rels m
+ where
+ r.object_id_two=$item_id
+ and
+ m.rel_id = r.rel_id;
+ begin
+ open c_rel_cur;
+ loop
+ fetch c_rel_cur into v_id;
+ exit when c_rel_cur%NOTFOUND;
+ membership_rel.delete(v_id);
+ end loop;
+ end;
+
+
+
+
+
+
+
+ declare
+ v_group_id groups.group_id%TYPE;
+ v_user_id users.user_id%TYPE;
+ begin
+ select g.group_id, u.user_id into v_group_id, v_user_id
+ from groups g, users u
+ where g.group_id = :id and u.user_id = :item_id;
+
+ :1 := membership_rel.new(
+ object_id_one => :id, object_id_two => :item_id,
+ creation_user => :user_id, creation_ip => :ip);
+
+ exception when no_data_found then null;
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/user-assoc-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-assoc-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/user-assoc-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,60 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ declare
+ c_rel_cur record;
+ begin
+ for c_rel_cur in
+ select
+ m.rel_id
+ from
+ acs_rels r, membership_rels m
+ where
+ r.object_id_two=$item_id
+ and
+ m.rel_id = r.rel_id
+ loop
+ PERFORM membership_rel__delete(c_rel_cur.rel_id);
+ end loop;
+
+ return null;
+ end;
+
+
+
+
+
+
+
+ declare
+ v_group_id groups.group_id%TYPE;
+ v_user_id users.user_id%TYPE;
+ begin
+ select g.group_id, u.user_id into v_group_id, v_user_id
+ from groups g, users u
+ where g.group_id = :id and u.user_id = :item_id;
+
+ if not found then
+ return null;
+ else
+
+ return membership_rel__new(
+ null,
+ 'membership_rel',
+ :id,
+ :item_id,
+ 'approved'
+ :user_id,
+ :ip);
+ end if;
+ end;
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/user-search-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-search-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/user-search-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select acs_object.name(:group_id) from dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/users/user-search-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-search-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/users/user-search-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+ postgresql7.1
+
+
+
+ select acs_object__name(:group_id)
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/case-create-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-create-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/case-create-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,92 @@
+
+
+
+ oracle8.1.6
+
+
+
+ begin :1 := workflow_case.new(
+ workflow_key => 'publishing_wf',
+ context_key => NULL,
+ object_id => :item_id,
+ creation_user => :user_id,
+ creation_ip => :creation_ip,
+ case_id => :case_id
+ );
+ end;
+
+
+
+
+
+
+
+ begin
+ workflow_case.add_manual_assignment(
+ case_id => :case_id,
+ transition_key => :transition,
+ party_id => :value
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ workflow_case.add_manual_assignment(
+ case_id => :case_id,
+ tranisition_key => :transition,
+ party_id => :new_value
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ workflow_case.start_case(
+ case_id => :case_id,
+ creation_user => :user_id,
+ creation_ip => :creation_ip,
+ msg => :msg
+ );
+ end;
+
+
+
+
+
+
+
+
+ select
+ person.name(user_id) name, user_id
+ from
+ users
+ where
+ user_id > 0
+ order by
+ name
+
+
+
+
+
+
+
+
+ select acs_object_id_seq.nextval from dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/case-create-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-create-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/case-create-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,92 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select workflow_case__new(
+ 'publishing_wf',
+ NULL,
+ :item_id,
+ now(),
+ :user_id,
+ :creation_ip,
+ :case_id
+ );
+
+
+
+
+
+
+
+
+ select workflow_case__add_manual_assignment(
+ :case_id,
+ :transition,
+ :value
+ );
+
+
+
+
+
+
+
+
+
+ select workflow_case__add_manual_assignment(
+ :case_id,
+ :transition,
+ :new_value
+ );
+
+
+
+
+
+
+
+
+
+ select workflow_case__start_case(
+ :case_id,
+ :user_id,
+ :creation_ip,
+ :msg
+ );
+
+
+
+
+
+
+
+
+
+ select
+ person__name(user_id) as name, user_id
+ from
+ users
+ where
+ user_id > 0
+ order by
+ name
+
+
+
+
+
+
+
+
+ select acs_object_id_seq.nextval
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/case-create.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-create.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/case-create.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ insert into wf_case_deadlines (
+ case_id, workflow_key, transition_key, deadline
+ ) values (
+ :case_id, 'publishing_wf', :transition, $dead_sql
+ )
+
+
+
+
+
+
+
+ update
+ wf_case_deadlines
+ set
+ deadline = $new_dead_sql
+ where
+ workflow_key = 'publishing_wf'
+ and
+ transition_key = :transition
+ and
+ case_id = :case_id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/case-status-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-status-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/case-status-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select k.transition_key, k.task_id, t.transition_name,
+ k.holding_user,
+ content_workflow.get_holding_user_name(k.task_id) hold_name
+ from wf_tasks k, wf_transitions t
+ where k.case_id = :case_id
+ and k.state in ('enabled', 'started')
+ and k.transition_key = t.transition_key
+
+
+
+
+
+
+ select to_char(deadline, 'DD MON') deadline
+ from wf_case_deadlines
+ where case_id = :case_id
+ and transition_key = :transition_key
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/case-status-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-status-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/case-status-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+ postgresql7.1
+
+
+
+ select k.transition_key, k.task_id, t.transition_name,
+ k.holding_user,
+ content_workflow__get_holding_user_name(k.task_id) hold_name
+ from wf_tasks k, wf_transitions t
+ where k.case_id = :case_id
+ and k.state in ('enabled', 'started')
+ and k.transition_key = t.transition_key
+
+
+
+
+
+
+ select to_char(deadline, 'DD MON') deadline
+ from wf_case_deadlines
+ where case_id = :case_id
+ and transition_key = :transition_key
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/case-status.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-status.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/case-status.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+
+
+ select case_id, initcap(state) state
+ from wf_cases where object_id = :item_id
+
+
+
+
+
+
+ select case when count(*) = 0 then 'no' else 'yes' end
+ from wf_case_assignments
+ where case_id = :case_id
+ and transition_key = :transition_key
+ and party_id = :user_id
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/index-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,114 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ count( decode(content_workflow.is_finished(c.case_id, transition_key),
+ 'f',1,null)
+ ) as total_count,
+ count( decode(content_workflow.is_overdue(c.case_id, transition_key),
+ 't',1,null)
+ ) as overdue_count,
+ count( decode(content_workflow.is_active(c.case_id, transition_key),
+ 't',1,null)
+ ) as active_count,
+ count( decode(content_workflow.is_checked_out(c.case_id, transition_key),
+ 't',1,null)
+ ) as checkout_count
+ from
+ wf_cases c, wf_transitions trans
+ where
+ c.workflow_key = trans.workflow_key
+ and
+ c.workflow_key = 'publishing_wf'
+ and
+ c.state = 'active'
+
+
+
+
+
+
+
+
+ select
+ trans.transition_key, transition_name, sort_order,
+ count(transition_name) as transition_count,
+ count(decode (
+ content_workflow.is_overdue(c.case_id, trans.transition_key),
+ 't',1,null)
+ ) as overdue_count,
+ count(decode (
+ content_workflow.is_active(c.case_id, trans.transition_key),
+ 't',1,null)
+ ) as active_count,
+ count( decode(
+ content_workflow.is_checked_out(c.case_id, trans.transition_key),
+ 't',1,null)
+ ) as checkout_count
+ from
+ wf_cases c, wf_transitions trans
+ where
+ trans.workflow_key = c.workflow_key
+ and
+ trans.workflow_key = 'publishing_wf'
+ and
+ c.state in ('active')
+ and
+ -- don't include tasks that have been finished or canceled
+ content_workflow.is_finished(c.case_id, trans.transition_key) = 'f'
+ group by
+ sort_order, transition_name, trans.transition_key
+
+
+
+
+
+
+
+
+ select
+ p.person_id, p.first_names, p.last_name,
+ count(transition_name) as transition_count,
+ count(decode (
+ content_workflow.is_overdue(c.case_id, t.transition_key),
+ 't',1,null)
+ ) as overdue_count,
+ count(decode (
+ content_workflow.is_active(c.case_id, t.transition_key),
+ 't',1,null)
+ ) as active_count,
+ count( decode(
+ content_workflow.is_checked_out(c.case_id, t.transition_key, ca.party_id),
+ 't',1,null)
+ ) as checkout_count
+ from
+ wf_cases c, wf_case_assignments ca,
+ wf_transitions t, persons p
+ where
+ t.workflow_key = 'publishing_wf'
+ and
+ t.workflow_key = c.workflow_key
+ and
+ c.state = 'active'
+ and
+ c.case_id = ca.case_id
+ and
+ ca.transition_key = t.transition_key
+ and
+ p.person_id = ca.party_id
+ and
+ -- don't include tasks that have been finished or canceled
+ content_workflow.is_finished(c.case_id, t.transition_key) = 'f'
+ group by
+ first_names, last_name, person_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/index-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,98 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ count( case when content_workflow__is_finished(c.case_id, transition_key) = 'f' then 1 else null end
+ ) as total_count,
+ count( case when content_workflow__is_overdue(c.case_id, transition_key) = 't' then 1 else null end
+ ) as overdue_count,
+ count( case when content_workflow__is_active(c.case_id, transition_key) = 't' then 1 else null end
+ ) as active_count,
+ count( case when content_workflow__is_checked_out(c.case_id, transition_key) = 't' then 1 else null end
+ ) as checkout_count
+ from
+ wf_cases c, wf_transitions trans
+ where
+ c.workflow_key = trans.workflow_key
+ and
+ c.workflow_key = 'publishing_wf'
+ and
+ c.state = 'active'
+
+
+
+
+
+
+
+
+ select
+ trans.transition_key, transition_name, sort_order,
+ count(transition_name) as transition_count,
+ count( case when content_workflow__is_overdue(c.case_id, trans.transition_key) = 't' then 1 else null end
+ ) as overdue_count,
+ count(case when content_workflow__is_active(c.case_id, trans.transition_key) = 't' then 1 else null end
+ ) as active_count,
+ count( case when content_workflow__is_checked_out(c.case_id, trans.transition_key) = 't' then 1 else null end
+ ) as checkout_count
+ from
+ wf_cases c, wf_transitions trans
+ where
+ trans.workflow_key = c.workflow_key
+ and
+ trans.workflow_key = 'publishing_wf'
+ and
+ c.state in ('active')
+ and
+ -- don't include tasks that have been finished or canceled
+ content_workflow__is_finished(c.case_id, trans.transition_key) = 'f'
+ group by
+ sort_order, transition_name, trans.transition_key
+
+
+
+
+
+
+
+
+ select
+ p.person_id, p.first_names, p.last_name,
+ count(transition_name) as transition_count,
+ count(case when content_workflow__is_overdue(c.case_id, t.transition_key) = 't' then 1 else null end
+ ) as overdue_count,
+ count(case when content_workflow__is_active(c.case_id, t.transition_key) = 't' then 1 else null end
+ ) as active_count,
+ count( case when content_workflow__is_checked_out(c.case_id, t.transition_key, ca.party_id) = 't' then 1 else null end
+ ) as checkout_count
+ from
+ wf_cases c, wf_case_assignments ca,
+ wf_transitions t, persons p
+ where
+ t.workflow_key = 'publishing_wf'
+ and
+ t.workflow_key = c.workflow_key
+ and
+ c.state = 'active'
+ and
+ c.case_id = ca.case_id
+ and
+ ca.transition_key = t.transition_key
+ and
+ p.person_id = ca.party_id
+ and
+ -- don't include tasks that have been finished or canceled
+ content_workflow__is_finished(c.case_id, t.transition_key) = 'f'
+ group by
+ first_names, last_name, person_id
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-checkin-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-checkin-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-checkin-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,62 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_workflow.checkin(
+ task_id => :task_id,
+ user_id => :user_id,
+ ip_address => :ip_address,
+ msg => :msg
+ );
+ end;
+
+
+
+
+
+
+
+
+ select content_workflow.can_approve( :task_id, :user_id ) from dual
+
+
+
+
+
+
+
+
+ select
+ c.object_id, tr.transition_name,
+ content_item.get_title(c.object_id) title,
+ tk.holding_user as holding_user,
+ to_char(tk.hold_timeout,'Mon. DD, YYYY') hold_timeout,
+ content_workflow.get_holding_user_name(tk.task_id) holding_user_name
+ from
+ wf_tasks tk, wf_transitions tr, wf_cases c
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.case_id = c.case_id
+
+
+
+
+
+
+
+
+ select content_workflow.can_approve( :task_id, :user_id ) from dual
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-checkin-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-checkin-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-checkin-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,61 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_workflow__checkin(
+ :task_id,
+ :user_id,
+ :ip_address,
+ :msg
+ );
+
+
+
+
+
+
+
+
+
+ select content_workflow__can_approve( :task_id, :user_id )
+
+
+
+
+
+
+
+
+ select
+ c.object_id, tr.transition_name,
+ content_item__get_title(c.object_id, 'f') as title,
+ tk.holding_user as holding_user,
+ to_char(tk.hold_timeout,'Mon. DD, YYYY') as hold_timeout,
+ content_workflow__get_holding_user_name(tk.task_id) as holding_user_name
+ from
+ wf_tasks tk, wf_transitions tr, wf_cases c
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.case_id = c.case_id
+
+
+
+
+
+
+
+
+ select content_workflow__can_approve( :task_id, :user_id )
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-checkin.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-checkin.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-checkin.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ abort transaction
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-finish-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-finish-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-finish-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_workflow.approve(
+ task_id => :task_id,
+ user_id => :user_id,
+ ip_address => :ip_address,
+ msg => :msg
+ );
+ end;
+
+
+
+
+
+
+
+ select content_workflow.can_approve( :task_id, :user_id ) from dual
+
+
+
+
+
+
+
+
+ select
+ c.object_id, content_item.get_title(c.object_id) title,
+ tr.transition_name
+ from
+ wf_tasks tk, wf_cases c,
+ wf_transitions tr
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.workflow_key = tr.workflow_key
+ and
+ tk.workflow_key = 'publishing_wf'
+ and
+ c.case_id = tk.case_id
+ and
+ content_workflow.can_approve( tk.task_id, :user_id ) = 't'
+
+
+
+
+
+
+
+
+ select content_workflow.can_approve( :task_id, :user_id ) from dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-finish-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-finish-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-finish-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,63 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select content_workflow__approve(
+ :task_id,
+ :user_id,
+ :ip_address,
+ :msg
+ );
+
+
+
+
+
+
+
+
+ select content_workflow__can_approve( :task_id, :user_id )
+
+
+
+
+
+
+
+
+ select
+ c.object_id, content_item__get_title(c.object_id,'f') as title,
+ tr.transition_name
+ from
+ wf_tasks tk, wf_cases c,
+ wf_transitions tr
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.workflow_key = tr.workflow_key
+ and
+ tk.workflow_key = 'publishing_wf'
+ and
+ c.case_id = tk.case_id
+ and
+ content_workflow__can_approve( tk.task_id, :user_id ) = 't'
+
+
+
+
+
+
+
+
+ select content_workflow__can_approve( :task_id, :user_id )
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-finish.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-finish.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-finish.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ abort transaction
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-reject-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-reject-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-reject-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,87 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_workflow.reject(
+ task_id => :task_id,
+ user_id => :user_id,
+ ip_address => :ip_address,
+ transition_key => :transition_key,
+ msg => :msg
+ );
+ end;
+
+
+
+
+
+
+
+ select content_workflow.can_reject( :task_id, :user_id ) from dual
+
+
+
+
+
+
+
+
+ select
+ c.object_id, content_item.get_title(c.object_id) title,
+ tr.transition_name
+ from
+ wf_tasks tk, wf_cases c,
+ wf_transitions tr
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.workflow_key = tr.workflow_key
+ and
+ tk.workflow_key = 'publishing_wf'
+ and
+ tk.case_id = c.case_id
+ and
+ content_workflow.can_reject( tk.task_id, :user_id ) = 't'
+
+
+
+
+
+
+
+
+ select
+ trans.transition_name, trans.transition_key
+ from
+ wf_places src, wf_places dest, wf_tasks t, wf_transitions trans
+ where
+ src.workflow_key = dest.workflow_key
+ and
+ src.workflow_key = 'publishing_wf'
+ and
+ src.workflow_key = trans.workflow_key
+ and
+ src.place_key = content_workflow.get_this_place( t.transition_key )
+ and
+ -- for the publishing_wf, past transitions have a lower sort order
+ dest.sort_order < src.sort_order
+ and
+ -- get the transition associated with that place
+ content_workflow.get_this_place( trans.transition_key ) = dest.place_key
+ and
+ t.task_id = :task_id
+ order by
+ dest.sort_order desc
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-reject-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-reject-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-reject-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,87 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_workflow__reject(
+ :task_id,
+ :user_id,
+ :ip_address,
+ :transition_key,
+ :msg
+ );
+
+
+
+
+
+
+
+
+ select content_workflow__can_reject( :task_id, :user_id )
+
+
+
+
+
+
+
+
+ select
+ c.object_id, content_item__get_title(c.object_id,'f') as title,
+ tr.transition_name
+ from
+ wf_tasks tk, wf_cases c,
+ wf_transitions tr
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.workflow_key = tr.workflow_key
+ and
+ tk.workflow_key = 'publishing_wf'
+ and
+ tk.case_id = c.case_id
+ and
+ content_workflow__can_reject( tk.task_id, :user_id ) = 't'
+
+
+
+
+
+
+
+
+ select
+ trans.transition_name, trans.transition_key
+ from
+ wf_places src, wf_places dest, wf_tasks t, wf_transitions trans
+ where
+ src.workflow_key = dest.workflow_key
+ and
+ src.workflow_key = 'publishing_wf'
+ and
+ src.workflow_key = trans.workflow_key
+ and
+ src.place_key = content_workflow__get_this_place( t.transition_key )
+ and
+ -- for the publishing_wf, past transitions have a lower sort order
+ dest.sort_order < src.sort_order
+ and
+ -- get the transition associated with that place
+ content_workflow__get_this_place( trans.transition_key ) = dest.place_key
+ and
+ t.task_id = :task_id
+ order by
+ dest.sort_order desc
+
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-reject.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-reject.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-reject.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ abort transaction
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-start-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-start-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-start-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ content_workflow.checkout(
+ task_id => :task_id,
+ hold_timeout => $hold_timeout_sql,
+ user_id => :user_id,
+ ip_address => :ip_address,
+ msg => :msg
+ );
+ end;
+
+
+
+
+
+
+
+
+ select content_workflow.can_start( :task_id, :user_id ) from dual
+
+
+
+
+
+
+
+
+ select
+ c.object_id, tr.transition_name,
+ content_item.get_title(c.object_id) title,
+ tk.holding_user as holding_user,
+ to_char(tk.hold_timeout,'Mon. DD, YYYY') hold_timeout,
+ content_workflow.get_holding_user_name(tk.task_id) holding_user_name
+ from
+ wf_tasks tk,
+ wf_transitions tr,
+ wf_cases c
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.case_id = c.case_id
+
+
+
+
+
+
+
+
+ select content_workflow.can_start( :task_id, :user_id ) from dual
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-start-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-start-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-start-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+ select content_workflow__checkout(
+ :task_id,
+ $hold_timeout_sql,
+ :user_id,
+ :ip_address,
+ :msg
+ );
+
+
+
+
+
+
+
+
+
+ select content_workflow__can_start( :task_id, :user_id )
+
+
+
+
+
+
+
+
+ select
+ c.object_id, tr.transition_name,
+ content_item__get_title(c.object_id,'f') as title,
+ tk.holding_user as holding_user,
+ to_char(tk.hold_timeout,'Mon. DD, YYYY') as hold_timeout,
+ content_workflow__get_holding_user_name(tk.task_id) as holding_user_name
+ from
+ wf_tasks tk,
+ wf_transitions tr,
+ wf_cases c
+ where
+ tk.task_id = :task_id
+ and
+ tk.transition_key = tr.transition_key
+ and
+ tk.case_id = c.case_id
+
+
+
+
+
+
+
+
+ select content_workflow__can_start( :task_id, :user_id )
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/task-start.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-start.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/task-start.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ abort transaction
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/user-tasks-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/user-tasks-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/user-tasks-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,104 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select nvl(party.name(:party_id),person.name(:party_id)) from dual
+
+
+
+
+
+
+
+
+ select
+ trans.transition_key, transition_name,
+ item_id, content_item.get_title(item_id) as title,
+ t.state,
+ to_char(deadline,'Mon. DD, YYYY') as deadline_pretty,
+ to_char(enabled_date,$date_format) as enabled_date_pretty,
+ to_char(started_date,$date_format) as started_date_pretty,
+ to_char(hold_timeout,'Mon. DD, YYYY') as hold_timeout_pretty,
+ holding_user, person.name(holding_user) as holding_user_name,
+ content_workflow.is_overdue(c.case_id, ca.transition_key) as is_overdue
+ from
+ wf_transitions trans, wf_tasks t, cr_items i,
+ wf_cases c, wf_case_assignments ca
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.case_id = ca.case_id
+ and
+ c.case_id = t.case_id
+ and
+ c.object_id = i.item_id
+ and
+ t.transition_key = trans.transition_key
+ and
+ ca.transition_key = trans.transition_key
+ and
+ c.state = 'active'
+ and
+ t.state in ('enabled','started')
+ and
+ ca.party_id = :party_id
+ order by
+ trans.sort_order, title
+
+
+
+
+
+
+
+ select
+ ca.transition_key, transition_name,
+ item_id, content_item.get_title(item_id) as title,
+ to_char(deadline,'Mon. DD, YYYY') as deadline_pretty,
+ content_workflow.is_overdue(c.case_id, ca.transition_key) as is_overdue
+ from
+ wf_case_assignments ca, wf_case_deadlines dead, wf_cases c,
+ cr_items i, wf_transitions trans
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.case_id = ca.case_id
+ and
+ c.case_id = dead.case_id
+ and
+ ca.transition_key = trans.transition_key
+ and
+ dead.transition_key = trans.transition_key
+ and
+ c.object_id = i.item_id
+ and
+ c.state = 'active'
+ and
+ content_workflow.is_finished(c.case_id, ca.transition_key) = 'f'
+ and
+ not exists ( select 1
+ from
+ wf_tasks
+ where
+ case_id = c.case_id
+ and
+ transition_key = ca.transition_key
+ and
+ state in ('enabled','started') )
+ and
+ ca.party_id = :party_id
+ order by
+ trans.sort_order, title
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/user-tasks-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/user-tasks-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/user-tasks-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,104 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select coalesce(party__name(:party_id),person__name(:party_id))
+
+
+
+
+
+
+
+
+ select
+ trans.transition_key, transition_name,
+ item_id, content_item__get_title(item_id,'f') as title,
+ t.state,
+ to_char(deadline,'Mon. DD, YYYY') as deadline_pretty,
+ to_char(enabled_date,$date_format) as enabled_date_pretty,
+ to_char(started_date,$date_format) as started_date_pretty,
+ to_char(hold_timeout,'Mon. DD, YYYY') as hold_timeout_pretty,
+ holding_user, person__name(holding_user) as holding_user_name,
+ content_workflow__is_overdue(c.case_id, ca.transition_key) as is_overdue
+ from
+ wf_transitions trans, wf_tasks t, cr_items i,
+ wf_cases c, wf_case_assignments ca
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.case_id = ca.case_id
+ and
+ c.case_id = t.case_id
+ and
+ c.object_id = i.item_id
+ and
+ t.transition_key = trans.transition_key
+ and
+ ca.transition_key = trans.transition_key
+ and
+ c.state = 'active'
+ and
+ t.state in ('enabled','started')
+ and
+ ca.party_id = :party_id
+ order by
+ trans.sort_order, title
+
+
+
+
+
+
+
+ select
+ ca.transition_key, transition_name,
+ item_id, content_item__get_title(item_id) as title,
+ to_char(deadline,'Mon. DD, YYYY') as deadline_pretty,
+ content_workflow__is_overdue(c.case_id, ca.transition_key) as is_overdue
+ from
+ wf_case_assignments ca, wf_case_deadlines dead, wf_cases c,
+ cr_items i, wf_transitions trans
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.case_id = ca.case_id
+ and
+ c.case_id = dead.case_id
+ and
+ ca.transition_key = trans.transition_key
+ and
+ dead.transition_key = trans.transition_key
+ and
+ c.object_id = i.item_id
+ and
+ c.state = 'active'
+ and
+ content_workflow__is_finished(c.case_id, ca.transition_key) = 'f'
+ and
+ not exists ( select 1
+ from
+ wf_tasks
+ where
+ case_id = c.case_id
+ and
+ transition_key = ca.transition_key
+ and
+ state in ('enabled','started') )
+ and
+ ca.party_id = :party_id
+ order by
+ trans.sort_order, title
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/workflow-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/workflow-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/workflow-oracle.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,101 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select
+ t.transition_key, transition_name,
+ item_id, content_item.get_title(item_id) as title,
+ t.state, ca.party_id,
+ nvl(party.name(ca.party_id),person.name(ca.party_id)) as assigned_party,
+ holding_user,
+ person.name(holding_user) as holding_user_name,
+ to_char(hold_timeout,'Mon. DD, YYYY') as hold_timeout_pretty,
+ to_char(deadline,'Mon., DD, YYYY') as deadline_pretty,
+ to_char(enabled_date,$date_format) as enabled_date_pretty,
+ to_char(started_date,$date_format) as started_date_pretty,
+ content_workflow.is_overdue(c.case_id, t.transition_key) as is_overdue
+ from
+ wf_tasks t, wf_transitions trans, cr_items i,
+ wf_cases c, wf_case_assignments ca
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.case_id = t.case_id
+ and
+ c.case_id = ca.case_id
+ and
+ c.state = 'active'
+ and
+ -- the workflow item is a content item
+ c.object_id = i.item_id
+ and
+ t.transition_key = trans.transition_key
+ and
+ ca.transition_key = t.transition_key
+ and
+ t.state in ('started','enabled')
+ $transition_sql
+ order by
+ trans.sort_order, title, assigned_party, deadline desc, state
+
+
+
+
+
+
+
+
+ select
+ ca.transition_key, transition_name, ca.party_id,
+ item_id, content_item.get_title(item_id) as title,
+ nvl(party.name(ca.party_id),person.name(ca.party_id)) as assigned_party,
+ to_char(dead.deadline,'Mon.DD, YYYY') as deadline_pretty,
+ content_workflow.is_overdue(c.case_id, ca.transition_key) as is_overdue
+ from
+ wf_cases c, wf_case_assignments ca, wf_case_deadlines dead,
+ wf_transitions trans, cr_items i
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.object_id = i.item_id
+ and
+ c.case_id = ca.case_id
+ and
+ c.case_id = dead.case_id
+ and
+ ca.transition_key = trans.transition_key
+ and
+ dead.transition_key = trans.transition_key
+ and
+ c.state = 'active'
+ and
+ -- non active task
+ not exists ( select 1
+ from
+ wf_tasks
+ where
+ state in ('enabled','started')
+ and
+ case_id = c.case_id
+ and
+ transition_key = ca.transition_key )
+ and
+ -- its finished
+ content_workflow.is_finished(c.case_id, ca.transition_key) = 'f'
+ -- ca.transition_key = transition
+ $transition_sql
+ order by
+ trans.sort_order, title, assigned_party, dead.deadline desc
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/workflow-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/workflow-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/workflow-postgresql.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,101 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select
+ t.transition_key, transition_name,
+ item_id, content_item__get_title(item_id,'f') as title,
+ t.state, ca.party_id,
+ coalesce(party__name(ca.party_id),person__name(ca.party_id)) as assigned_party,
+ holding_user,
+ person__name(holding_user) as holding_user_name,
+ to_char(hold_timeout,'Mon. DD, YYYY') as hold_timeout_pretty,
+ to_char(deadline,'Mon., DD, YYYY') as deadline_pretty,
+ to_char(enabled_date,$date_format) as enabled_date_pretty,
+ to_char(started_date,$date_format) as started_date_pretty,
+ content_workflow__is_overdue(c.case_id, t.transition_key) as is_overdue
+ from
+ wf_tasks t, wf_transitions trans, cr_items i,
+ wf_cases c, wf_case_assignments ca
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.case_id = t.case_id
+ and
+ c.case_id = ca.case_id
+ and
+ c.state = 'active'
+ and
+ -- the workflow item is a content item
+ c.object_id = i.item_id
+ and
+ t.transition_key = trans.transition_key
+ and
+ ca.transition_key = t.transition_key
+ and
+ t.state in ('started','enabled')
+ $transition_sql
+ order by
+ trans.sort_order, title, assigned_party, deadline desc, state
+
+
+
+
+
+
+
+
+ select
+ ca.transition_key, transition_name, ca.party_id,
+ item_id, content_item__get_title(item_id,'f') as title,
+ coalesce(party__name(ca.party_id),person__name(ca.party_id)) as assigned_party,
+ to_char(dead.deadline,'Mon.DD, YYYY') as deadline_pretty,
+ content_workflow__is_overdue(c.case_id, ca.transition_key) as is_overdue
+ from
+ wf_cases c, wf_case_assignments ca, wf_case_deadlines dead,
+ wf_transitions trans, cr_items i
+ where
+ c.workflow_key = 'publishing_wf'
+ and
+ c.workflow_key = trans.workflow_key
+ and
+ c.object_id = i.item_id
+ and
+ c.case_id = ca.case_id
+ and
+ c.case_id = dead.case_id
+ and
+ ca.transition_key = trans.transition_key
+ and
+ dead.transition_key = trans.transition_key
+ and
+ c.state = 'active'
+ and
+ -- non active task
+ not exists ( select 1
+ from
+ wf_tasks
+ where
+ state in ('enabled','started')
+ and
+ case_id = c.case_id
+ and
+ transition_key = ca.transition_key )
+ and
+ -- its finished
+ content_workflow__is_finished(c.case_id, ca.transition_key) = 'f'
+ -- ca.transition_key = transition
+ $transition_sql
+ order by
+ trans.sort_order, title, assigned_party, dead.deadline desc
+
+
+
+
+
Index: openacs-4/packages/cms/www/modules/workflow/workflow.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/workflow.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/cms/www/modules/workflow/workflow.xql 25 May 2001 23:49:05 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ select
+ transition_name
+ from
+ wf_transitions
+ where
+ transition_key = :transition
+ and
+ workflow_key = 'publishing_wf'
+
+
+
+
+
+