Index: openacs-4/packages/bookmarks/www/bookmark-access.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-access.tcl,v diff -u -r1.2 -r1.2.8.1 --- openacs-4/packages/bookmarks/www/bookmark-access.tcl 10 Sep 2002 22:22:26 -0000 1.2 +++ openacs-4/packages/bookmarks/www/bookmark-access.tcl 6 May 2004 05:11:58 -0000 1.2.8.1 @@ -24,4 +24,4 @@ start with bookmark_id = (select parent_id from bm_bookmarks where bookmark_id = :bookmark_id) connect by prior parent_id = bookmark_id)" -ad_returnredirect "$url" +ad_returnredirect "[ad_html_to_text $url]" Index: openacs-4/packages/bookmarks/www/bookmark-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-edit.adp,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/bookmarks/www/bookmark-edit.adp 2 Sep 2003 09:58:55 -0000 1.4 +++ openacs-4/packages/bookmarks/www/bookmark-edit.adp 6 May 2004 05:11:58 -0000 1.4.4.1 @@ -11,12 +11,12 @@ URL: -"> + Title: -"> + 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 -r1.6 -r1.6.4.1 --- openacs-4/packages/bookmarks/www/index-oracle.xql 25 Sep 2003 17:06:02 -0000 1.6 +++ openacs-4/packages/bookmarks/www/index-oracle.xql 6 May 2004 05:11:58 -0000 1.6.4.1 @@ -123,6 +123,7 @@ where owner_id = :user_id and acs_objects.object_id = b.bookmark_id and b.url_id = bm_urls.url_id(+) + and b.bookmark_id != :root_folder_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 -r1.10 -r1.10.4.1 --- openacs-4/packages/bookmarks/www/index-postgresql.xql 25 Sep 2003 17:06:02 -0000 1.10 +++ openacs-4/packages/bookmarks/www/index-postgresql.xql 6 May 2004 05:11:58 -0000 1.10.4.1 @@ -114,6 +114,7 @@ acs_objects where owner_id = :user_id and acs_objects.object_id = b.bookmark_id + and b.bookmark_id != :root_folder_id order by b.tree_sortkey Index: openacs-4/packages/bookmarks/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/index.vuh,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/packages/bookmarks/www/index.vuh 25 Sep 2003 17:06:02 -0000 1.1 +++ openacs-4/packages/bookmarks/www/index.vuh 6 May 2004 05:11:58 -0000 1.1.4.1 @@ -23,42 +23,52 @@ where user_id = :user_id"] set folder_list 0 +set previous_folder_p "f" +set indent 1 +set indent_str " " +set i_str [string repeat $indent_str $indent] db_foreach bm_info { } { -if { [string equal $folder_list 0] } { - lappend folder_list $parent_id -} else { - set previous_parent_id [lindex $folder_list [expr [llength $folder_list]-1]] - if {$parent_id != $previous_parent_id} { + if { [string equal $folder_list 0] } { + lappend folder_list $parent_id + } else { + set previous_parent_id [lindex $folder_list end] + if {$parent_id != $previous_parent_id} { + set parent_location [lsearch -exact $folder_list $parent_id] - set parent_location [lsearch -exact $folder_list $parent_id] - - - - if {$parent_location==-1} { - lappend folder_list $parent_id - append bookmark_html "

\n\n" - } else { - set drop [expr [llength $folder_list]-$parent_location] - set folder_list [lrange $folder_list 0 $parent_location] - for {set i 1} {$i<$drop} {incr i} { - append bookmark_html "

\n\n" - } - } - } elseif { [string equal $folder_p "t"] && [string equal $previous_folder_p "t"] } { - # The previous folder was empty - append bookmark_html "

\n

\n\n" + if {$parent_location==-1} { + lappend folder_list $parent_id + append bookmark_html "$i_str

\n" + incr indent + set i_str [string repeat $indent_str $indent] + } else { + set drop [expr [llength $folder_list]-$parent_location] + set folder_list [lrange $folder_list 0 $parent_location] + for {set i 1} {$i<$drop} {incr i} { + incr indent -1 + set i_str [string repeat $indent_str $indent] + append bookmark_html "$i_str

\n\n" + } } + } elseif { [string equal $folder_p "t"] && [string equal $previous_folder_p "t"] } { + # The previous folder was empty + append bookmark_html "$i_str

\n$i_str

\n" + } } if {$folder_p=="t"} { - append bookmark_html "

$local_title

\n\n" + if {$local_title eq "Personal Toolbar Folder"} { + # Maintain special tags for Personal Toolbar Folder + append bookmark_html "$i_str

$local_title

\n" + } else { + append bookmark_html "$i_str

$local_title

\n" + } } else { - append bookmark_html "
$local_title\n\n" + append bookmark_html "$i_str
$local_title\n" } - set previous_folder_p $folder_p + set previous_folder_p $folder_p } set html "