Index: openacs-4/packages/bookmarks/bookmarks.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/bookmarks.info,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/bookmarks/bookmarks.info 2 Jun 2001 03:58:13 -0000 1.3
+++ openacs-4/packages/bookmarks/bookmarks.info 2 Jun 2001 07:33:06 -0000 1.4
@@ -48,8 +48,14 @@
+
+
+
+
+
+
@@ -91,10 +97,14 @@
+
+
+
+
Index: openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql 2 Jun 2001 03:58:13 -0000 1.1
+++ openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql 2 Jun 2001 07:33:06 -0000 1.2
@@ -842,7 +842,7 @@
p_in_closed_p_id ALIAS FOR $2; -- in users.user_id%TYPE
v_count_in_closed_p integer;
v_count_bookmarks integer;
-
+ c_bookmark_ids RECORD;
BEGIN
FOR c_bookmark_ids IN
Index: openacs-4/packages/bookmarks/tcl/bookmarks-init-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-init-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/tcl/bookmarks-init-oracle.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select site_node.url(node_id) as path
+ from site_nodes
+ where object_id in (select package_id
+ from apm_packages where package_key = 'bookmarks')
+
+
+
+
+
+
+
+
+ select b.bookmark_id,
+ b.url_id,
+ b.local_title,
+ acs_objects.creation_date,
+ b.parent_id,
+ bm_urls.complete_url,
+ b.folder_p
+ from (select /*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/ bookmark_id, url_id, local_title, folder_p, level lev,
+ parent_id, owner_id, rownum ord_num from bm_bookmarks
+ start with parent_id = :root_folder_id connect by prior bookmark_id = parent_id) b,
+ bm_urls,
+ acs_objects
+ where owner_id = :user_id
+ and acs_objects.object_id = b.bookmark_id
+ and b.url_id = bm_urls.url_id(+)
+ order by ord_num
+
+
+
+
+
+
+
+ delete from bm_in_closed_p where creation_date < (sysdate - 1)
+
+
+
+
+
Index: openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,53 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select site_node__url(node_id) as path
+ from site_nodes
+ where object_id in (select package_id
+ from apm_packages where package_key = 'bookmarks')
+
+
+
+
+
+
+
+
+ select b.bookmark_id,
+ b.url_id,
+ b.local_title,
+ acs_objects.creation_date,
+ b.parent_id,
+ bm_urls.complete_url,
+ b.folder_p
+ from (select bookmark_id, url_id, local_title, folder_p, tree_level(tree_sortkey) lev,
+ parent_id, owner_id, 999 ord_num from bm_bookmarks
+ where tree_sortkey like
+ (
+ select tree_sortkey || ''%''
+ from bm_bookmarks
+ where bookmark_id = :root_folder_id
+ )
+ order by tree_sortkey) b left join bm_urls using (url_id),
+ acs_objects
+ where owner_id = :user_id
+ and acs_objects.object_id = b.bookmark_id
+ order by ord_num
+
+
+
+
+
+
+
+ delete from bm_in_closed_p where creation_date < (current_timestamp - 1)
+
+
+
+
+
Index: openacs-4/packages/bookmarks/tcl/bookmarks-init.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-init.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/tcl/bookmarks-init.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ select first_names||' '||last_name as name
+ from cc_users
+ where user_id = :user_id
+
+
+
+
+
Index: openacs-4/packages/bookmarks/tcl/bookmarks-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/tcl/bookmarks-procs-oracle.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,87 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select /*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/ bookmark_id,
+ local_title,
+ level as indentation
+ from bm_bookmarks
+ where folder_p = 't'
+ and owner_id = :user_id
+ and bookmark_id <> :bookmark_id
+ and parent_id <> :package_id
+ and acs_permission.permission_p(bookmark_id, :user_id, 'write') = 't'
+ $exclude_folders
+ start with parent_id = :package_id
+ connect by prior bookmark_id = parent_id
+
+
+
+
+
+
+
+
+ begin
+ :1 := bookmark.get_root_folder(
+ package_id => :package_id,
+ user_id => :user_id);
+ end;
+
+
+
+
+
+
+ select count(*) from bm_bookmarks
+ where owner_id = :viewed_user_id
+ and folder_p = 't'
+ and acs_permission.permission_p(bookmark_id, :browsing_user_id, 'write') = 't'
+
+
+
+
+
+
+ select count(*) from bm_bookmarks
+ where acs_permission.permission_p(bookmark_id, :browsing_user_id, 'delete') = 'f'
+ start with bookmark_id = :bookmark_id
+ connect by prior bookmark_id = parent_id
+
+
+
+
+
+
+ select bookmark.private_p(:bookmark_id) from dual
+
+
+
+
+
+
+
+ begin
+ bookmark.update_private_p(:bookmark_id, :private_p);
+ end;
+
+
+
+
+
+
+
+
+ begin
+ bookmark.initialize_in_closed_p(:viewed_user_id, :in_closed_p_id);
+ end;
+
+
+
+
+
+
Index: openacs-4/packages/bookmarks/tcl/bookmarks-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/tcl/bookmarks-procs-postgresql.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,90 @@
+
+
+
+ postgresql7.1
+
+
+
+ select bookmark_id,
+ local_title,
+ tree_level(tree_sortkey) as indentation
+ from bm_bookmarks
+ where tree_sortkey like
+ (
+ select tree_sortkey || ''%''
+ from bm_bookmarks
+ where parent_id = :package_id
+ )
+ and folder_p = 't'
+ and owner_id = :user_id
+ and bookmark_id <> :bookmark_id
+ and parent_id <> :package_id
+ and acs_permission__permission_p(bookmark_id, :user_id, 'write') = 't'
+ $exclude_folders
+ order by tree_sortkey
+
+
+
+
+
+
+
+ select bookmark__get_root_folder (:package_id, :user_id)
+
+
+
+
+
+
+
+ select count(*) from bm_bookmarks
+ where owner_id = :viewed_user_id
+ and folder_p = 't'
+ and acs_permission__permission_p(bookmark_id, :browsing_user_id, 'write') = 't'
+
+
+
+
+
+
+select count(*) from bm_bookmarks
+ where tree_sortkey like
+ (
+ select tree_sortkey || ''%''
+ from bm_bookmarks
+ where bookmark_id = :bookmark_id
+ )
+ and acs_permission__permission_p(bookmark_id, :browsing_user_id, 'delete') = 'f'
+ order by tree_sortkey
+
+
+
+
+
+
+ select bookmark__private_p(:bookmark_id)
+
+
+
+
+
+
+
+ select bookmark__update_private_p(:bookmark_id, :private_p)
+
+
+
+
+
+
+
+
+ select bookmark__initialize_in_closed_p (:viewed_user_id, :in_closed_p_id)
+
+
+
+
+
+
+
+
Index: openacs-4/packages/bookmarks/tcl/bookmarks-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/tcl/bookmarks-procs.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+ select count(*)
+ from bm_bookmarks
+ where bookmark_id = :bookmark_id
+
+
+
+
+
+
+ select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id
+
+
+
+
+
Index: openacs-4/packages/bookmarks/www/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/www/index-oracle.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+ oracle8.1.6
+
+
+
+ select acs_object.name(:package_id) from dual
+
+
+
+
+
+
+ select b.bookmark_id,
+b.url_id,
+b.local_title as bookmark_title,
+u.complete_url,
+u.last_live_date,
+u.last_checked_date,
+b.folder_p,
+bm_in_closed_p.closed_p,
+nvl(admin_view.object_id, 0) as admin_p,
+nvl(delete_view.object_id,0) as delete_p,
+b.lev as indentation
+$private_select
+
+from bm_urls u,
+(select $index_order bookmark_id, url_id, local_title, folder_p, level lev, parent_id, rownum ord_num
+from bm_bookmarks start with bookmark_id = :root_folder_id connect by prior bookmark_id = parent_id) b,
+bm_in_closed_p,
+(select object_id from acs_object_party_privilege_map
+ where party_id in (:browsing_user_id, -1) and privilege = 'admin') admin_view,
+(select object_id from acs_object_party_privilege_map
+ where party_id in (:browsing_user_id, -1) and privilege = 'delete') delete_view
+where b.url_id = u.url_id (+)
+and bm_in_closed_p.bookmark_id = b.bookmark_id
+and bm_in_closed_p.in_closed_p = 'f'
+and bm_in_closed_p.in_closed_p_id = :in_closed_p_id
+and exists (select 1 from bm_bookmarks where exists (select 1 from acs_object_party_privilege_map where object_id = bookmark_id and party_id in (:browsing_user_id, -1) and privilege = 'read') start with bookmark_id = b.bookmark_id connect by prior bookmark_id = parent_id)
+and b.bookmark_id <> :root_folder_id
+and b.bookmark_id = admin_view.object_id(+)
+and b.bookmark_id = delete_view.object_id(+)
+order by ord_num
+
+
+
+
+
Index: openacs-4/packages/bookmarks/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/www/index-postgresql.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,58 @@
+
+
+
+ postgresql7.1
+
+
+
+ select acs_object__name(:package_id)
+
+
+
+
+
+
+select b.bookmark_id,
+b.url_id,
+b.local_title as bookmark_title,
+u.complete_url,
+u.last_live_date,
+u.last_checked_date,
+b.folder_p,
+bm_in_closed_p.closed_p,
+coalesce(admin_view.object_id, 0) as admin_p,
+coalesce(delete_view.object_id,0) as delete_p,
+b.lev as indentation
+$private_select
+
+from bm_urls u,
+(select $index_order bookmark_id, url_id, local_title, folder_p,
+ tree_level(tree_sortkey) lev, parent_id, 999 ord_num
+from bm_bookmarks
+where tree_sortkey like
+(
+ select tree_sortkey || ''%''
+ from bm_bookmarks
+ where bookmark_id = :root_folder_id
+)
+order by tree_sortkey) b left join u on (url_id),
+bm_in_closed_p,
+(select object_id from acs_object_party_privilege_map
+ where party_id in (:browsing_user_id, -1) and privilege = 'admin') admin_view right join b
+on (admin_view.object_id=b.bookmark_id),
+(select object_id from acs_object_party_privilege_map
+ where party_id in (:browsing_user_id, -1) and privilege = 'delete') delete_view right join b
+on (delete_view.object_id = b.bookmark_id)
+where
+bm_in_closed_p.bookmark_id = b.bookmark_id
+and bm_in_closed_p.in_closed_p = 'f'
+and bm_in_closed_p.in_closed_p_id = :in_closed_p_id
+and exists (select 1 from bm_bookmarks where exists (select 1 from acs_object_party_privilege_map where object_id = bookmark_id and party_id in (:browsing_user_id, -1) and privilege = 'read') start with bookmark_id = b.bookmark_id connect by prior bookmark_id = parent_id)
+and b.bookmark_id <> :root_folder_id
+order by ord_num
+
+
+
+
+
+
Index: openacs-4/packages/bookmarks/www/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/www/index.xql 2 Jun 2001 07:33:06 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+ select 1 from parties where party_id = :viewed_user_id
+
+
+
+
+
+
+ select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id
+
+
+
+
+