Index: openacs-4/packages/bookmarks/bookmarks.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/bookmarks.info,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/bookmarks/bookmarks.info 15 Aug 2001 05:40:35 -0000 1.14
+++ openacs-4/packages/bookmarks/bookmarks.info 16 Aug 2001 20:30:28 -0000 1.15
@@ -102,8 +102,11 @@
+
+
+
Index: openacs-4/packages/bookmarks/www/bookmarks-check-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-check-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/bookmarks/www/bookmarks-check-postgresql.xql 23 Jul 2001 03:33:00 -0000 1.2
+++ openacs-4/packages/bookmarks/www/bookmarks-check-postgresql.xql 16 Aug 2001 20:30:28 -0000 1.3
@@ -6,24 +6,19 @@
- select url_id,
+ select bm_urls.url_id,
complete_url,
coalesce(url_title, complete_url) as url_title
- from bm_urls
- where exists
+ from bm_urls join
(
- select 1 from
- (
- select o2.bookmark_id, o2.url_id
- from bm_bookmarks o1, bm_bookmarks o2
- where o1.parent_id = :root_folder_id
- and o2.tree_sortkey >= o1.tree_sortkey
- and o2.tree_sortkey like (o1.tree_sortkey || '%')
- order by o2.tree_sortkey
- ) bm
- where bm.url_id = bm_urls.url_id
- and acs_permission__permission_p(bm.bookmark_id, :browsing_user_id, 'delete')= 't'
- )
+ select bookmark_id, url_id from bm_bookmarks
+ where tree_sortkey like
+ (
+ select tree_sortkey || '%' from bm_bookmarks
+ where bookmark_id= :root_folder_id
+ )
+ order by tree_sortkey
+ ) bm on (bm.url_id=bm_urls.url_id)
Index: openacs-4/packages/bookmarks/www/bookmarks-import-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-import-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/www/bookmarks-import-oracle.xql 16 Aug 2001 20:30:28 -0000 1.1
@@ -0,0 +1,66 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ declare
+ dummy_var integer;
+ begin
+ dummy_var := bookmark.new (
+ bookmark_id => :bookmark_id,
+ owner_id => :viewed_user_id,
+ local_title => :local_title,
+ parent_id => :parent_id,
+ folder_p => 't',
+ creation_user => :user_id,
+ creation_ip => :creation_ip
+ );
+ end;
+
+
+
+
+
+
+
+ declare
+ dummy_var integer;
+ begin
+ dummy_var := url.new (
+ url_id => :url_id,
+ url_title => :local_title,
+ host_url => :host_url,
+ complete_url => :complete_url,
+ creation_user => :viewed_user_id,
+ creation_ip => :creation_ip
+ );
+ end;
+
+
+
+
+
+
+
+
+ declare
+ dummy_var integer;
+ begin
+ dummy_var := bookmark.new (
+ bookmark_id => :bookmark_id,
+ owner_id => :viewed_user_id,
+ url_id => :url_id,
+ local_title => :local_title,
+ parent_id => :parent_id,
+ creation_user => :user_id,
+ creation_ip => :creation_ip
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/bookmarks/www/bookmarks-import-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-import-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/www/bookmarks-import-postgresql.xql 16 Aug 2001 20:30:28 -0000 1.1
@@ -0,0 +1,70 @@
+
+
+
+ postgresql7.1
+
+
+
+begin
+ perform bookmark__new (
+ :bookmark_id,
+ :viewed_user_id,
+ null,
+ :local_title,
+ TRUE,
+ :parent_id,
+ null,
+ :user_id,
+ :creation_ip,
+ null
+ );
+ return '';
+end;
+
+
+
+
+
+
+ declare
+ v_url_id integer;
+ begin
+ v_url_id := url__new (
+ :url_id,
+ :local_title,
+ :host_url,
+ :complete_url,
+ null,
+ null,
+ :viewed_user_id,
+ :creation_ip,
+ null
+ );
+ return v_url_id;
+ end;
+
+
+
+
+
+
+begin
+ perform bookmark__new (
+ :bookmark_id,
+ :viewed_user_id,
+ :url_id,
+ :local_title,
+ FALSE,
+ :parent_id,
+ null,
+ :user_id,
+ :creation_ip,
+ null
+ );
+ return '';
+end;
+
+
+
+
+
Index: openacs-4/packages/bookmarks/www/bookmarks-import.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-import.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/bookmarks/www/bookmarks-import.xql 16 Aug 2001 20:30:28 -0000 1.1
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+select count(bookmark_id) as n_existing
+from bm_bookmarks
+where bookmark_id = :bookmark_id
+
+
+
+
+
+
+
+ select count(*) from bm_bookmarks
+ where owner_id = :viewed_user_id
+ and parent_id = :parent_id
+ and folder_p = 't'
+ and local_title = :local_title
+
+
+
+
+
+
+
+ select bookmark_id
+ from bm_bookmarks
+ where folder_p = 't'
+ and owner_id = :user_id
+ and local_title = :local_title
+
+
+
+
+
+
+
+ select url_id
+ from bm_urls
+ where complete_url = :complete_url
+
+
+
+
+
+
+
+ select count(bookmark_id)
+ from bm_bookmarks
+ where url_id = :url_id
+ and owner_id = :viewed_user_id
+ and parent_id = :parent_id
+
+
+
+
+
+
+
+ select count(bookmark_id)
+ from bm_bookmarks
+ where bookmark_id = :bookmark_id
+
+
+
+
+