bm_set_in_closed_p

one of the documented procedures in this installation of the ACS
Usage:
bm_set_in_closed_p   db   owner_id
What it does:
This procedure insures that the 'in_closed_p' column in the 'bm_list' table is consistant with the open/closed of the folder structure (ie a bookmark inside a closed folder or in a folder in a closed folder etc is considered to be in_closed_p=t)
Defined in: /web/philip/tcl/bookmarks-defs.tcl

Source code:


    ns_db dml $db "begin transaction"
    
    # Set all files to be open.
    ns_db dml $db "update bm_list set in_closed_p = 'f' where owner_id = $owner_id"

    # Set as in_closed_p those bookmarks which have any parent as closed.
    ns_db dml $db "update bm_list set in_closed_p = 't' 
 where bookmark_id in (select bookmark_id from bm_list
 where owner_id = $owner_id
 connect by prior bookmark_id = parent_id
 start with parent_id in (select bookmark_id from bm_list where owner_id = $owner_id and folder_p = 't' and closed_p = 't'))"

    ns_db dml $db "end transaction"


philg@mit.edu