Index: openacs-4/packages/static-pages/www/admin/commentability-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/www/admin/commentability-oracle.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/static-pages/www/admin/commentability-oracle.xql 27 Jul 2001 15:43:31 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+ oracle8.1.6
+
+
+ FIX ME DECODE (USE SQL92 CASE)
+ select spf.folder_id,
+ decode(spf.folder_id,:root_folder_id,'[acs_root_dir]/www/',content_item.get_title(spf.folder_id)||'/') as folder_name,
+ static_page.five_n_spaces(lev) as spaces,
+ static_page_id,
+ substr(filename,instr(filename,'/',-1)+1) as filename,
+ decode(p_file.grantee_id,NULL,'not commentable','commentable') as file_permission,
+ decode(show_comments_p,'t','comments displayed','comments summarized') as display_policy,
+ decode(p_folder.grantee_id,NULL,'children not commentable','children commentable') as folder_permission
+from static_pages sp,
+ (select folder_id,level as lev from sp_folders
+ start with folder_id = :root_folder_id
+ connect by parent_id = prior folder_id) spf,
+ acs_permissions p_file,
+ acs_permissions p_folder
+where spf.folder_id=sp.folder_id(+)
+ and p_file.grantee_id(+) = acs.magic_object_id('the_public')
+ and p_file.privilege(+) = 'general_comments_create'
+ and p_file.object_id(+) = static_page_id
+ and p_folder.grantee_id(+) = acs.magic_object_id('the_public')
+ and p_folder.privilege(+) = 'general_comments_create'
+ and p_folder.object_id(+) = spf.folder_id
+
+
+
+
+
+
Index: openacs-4/packages/static-pages/www/admin/commentability-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/www/admin/commentability-postgresql.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/static-pages/www/admin/commentability-postgresql.xql 27 Jul 2001 15:43:31 -0000 1.1
@@ -0,0 +1,43 @@
+
+
+ postgresql7.1
+
+
+
+ select spf.folder_id,
+case when spf.folder_id = :root_folder_id then '[acs_root_dir]/www/' else
+ content_item__get_title(spf.folder.id)||'/' end as folder_name,
+ static_page__five_n_spaces(lev) as spaces,
+ static_page_id,
+ substr(filename,instr(filename,'/',-1)+1) as filename,
+case when p_file.grantee_id = NULL then 'not commentable' else 'commentable' end as file_permission,
+
+case when show_comments_p = 't' then 'comments displayed' else 'comments summarized' end as display_policy,
+
+case when p_folder.grantee_id = NULL then 'children not commentable' else 'children commentable' end as folder_permission
+
+from ((static_pages sp RIGHT OUTER JOIN
+ (select tree_level(folder_id) as lev from
+ (select folder_id from sp_folders
+ where tree_sortkey like ( select tree_sortkey || '%'
+ from sp_folders
+ where folder_id = :root_folder_id)
+ )
+ )
+ LEFT OUTER JOIN
+acs_permissions p_file ON
+ (p_file.grantee_id = acs.magic_object_id('the_public') and
+ p_file.privilege = 'general_comments_create' and
+ p_file.object_id = sp.static_page_id)
+
+ LEFT OUTER JOIN
+acs_permissions p_folder ON
+ (p_folder.grantee_id = acs.magic_object_id('the_public') and
+ p_folder.privilege = 'general_comments_create' and
+ p_folder.object_id = spf.folder_id)
+
+
+
+
+
+
Index: openacs-4/packages/static-pages/www/admin/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/www/admin/index-oracle.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/static-pages/www/admin/index-oracle.xql 27 Jul 2001 15:43:31 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+ oracle8.1.6
+
+
+
+ select count(*) as n_static_pages from static_pages
+ where folder_id in (
+ select folder_id from sp_folders
+ start with folder_id = :root_folder_id
+ connect by parent_id = prior folder_id
+ )
+
+
+
+
+
+
Index: openacs-4/packages/static-pages/www/admin/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/www/admin/index-postgresql.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/static-pages/www/admin/index-postgresql.xql 27 Jul 2001 15:43:31 -0000 1.1
@@ -0,0 +1,19 @@
+
+
+ postgresql7.1
+
+
+
+ select count(*) as n_static_pages from static_pages
+ where folder_id in (
+ select folder_id from sp_folders
+ where tree_sortkey like ( select tree_sortkey || '%'
+ from sp_folders
+ where folder_id = :root_folder_id)
+ )
+
+
+
+
+
+