Index: openacs-4/packages/bookmarks/www/delete-dead-links-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/delete-dead-links-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/bookmarks/www/delete-dead-links-postgresql.xql 30 Jul 2001 00:00:02 -0000 1.1
+++ openacs-4/packages/bookmarks/www/delete-dead-links-postgresql.xql 12 Sep 2001 01:10:21 -0000 1.2
@@ -7,31 +7,20 @@
select bookmark_id
-from
-(
- select bookmark_id, url_id
- from bm_bookmarks
- where tree_sortkey like
- (
- select tree_sortkey || '%'
- from bm_bookmarks
- where parent_id = :root_folder_id
- )
- order by tree_sortkey
-) bm
-where acs_permission__permission_p(bm.bookmark_id, :browsing_user_id, 'delete') = 't'
-and bm.url_id = :url_id
+ from (select bookmark_id, url_id from bm_bookmarks
+ start with parent_id = :root_folder_id
+ connect by prior bookmark_id = parent_id) bm
+ where acs_permission__permission_p(bm.bookmark_id, :browsing_user_id, 'delete') = 't'
+ and bm.url_id = :url_id
- FIX ME PLSQL
-FIX ME PLSQL
begin
- bookmark__delete (
+ perform bookmark__delete (
bookmark_id => :bookmark_id
);
end;
@@ -42,12 +31,12 @@
-begin
+
+ begin
perform bookmark__delete (
bookmark_id => :bookmark_id
- );
- return 0;
-end;
+ );
+ end;