Index: openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl 9 Sep 2013 12:19:56 -0000 1.6 +++ openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl 18 Apr 2014 06:38:28 -0000 1.7 @@ -152,7 +152,7 @@ contained bookmarks/folders. } { - if { [string equal [bm_delete_permission_p $bookmark_id] "f"] } { + if {[bm_delete_permission_p $bookmark_id] == "f"} { set n_errors 1 set error_list [list "You either do not have delete permissions on this bookmark/folder, or you are trying to delete a folder that contains at least one bookmarks or folder that you may not delete"] ad_return_template "complaint" @@ -169,13 +169,13 @@ } { set browsing_user_id [ad_conn user_id] - if { ![string equal $browsing_user_id $viewed_user_id] && ![empty_string_p $viewed_user_id]} { + if { $browsing_user_id ne $viewed_user_id && $viewed_user_id ne ""} { # The user is viewing someone elses bookmarks # and we need the set the context bar so that # he can go back to viewing his own bookmarks set user_name [db_string user_name "select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id" -default ""] - if { [empty_string_p $arg_list] } { + if { $arg_list eq "" } { # We are on the index page return [list "Bookmarks of $user_name"] } else { @@ -270,7 +270,7 @@ append result "$i_str],\n" } while {$prev_lev > $lev} { - set i_str [string repeat "\t" [expr $prev_lev - 1]] + set i_str [string repeat "\t" [expr {$prev_lev - 1}]] append result "$i_str],\n" incr prev_lev -1 } Index: openacs-4/packages/bookmarks/www/bookmark-add-import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-import.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/bookmarks/www/bookmark-add-import.tcl 9 Sep 2013 17:51:47 -0000 1.9 +++ openacs-4/packages/bookmarks/www/bookmark-add-import.tcl 18 Apr 2014 06:38:29 -0000 1.10 @@ -43,7 +43,7 @@ # If we we are coming from a Bookmarklet there will be no viewed_user_id # supplied, but the browsing_user_id will do -if { [empty_string_p $viewed_user_id] || $viewed_user_id == 0 } { +if { $viewed_user_id eq "" || $viewed_user_id == 0 } { set viewed_user_id [ad_conn user_id] } Index: openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl 9 Sep 2013 12:19:56 -0000 1.6 +++ openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl 18 Apr 2014 06:38:29 -0000 1.7 @@ -79,7 +79,7 @@ # Insert the bookmark #------------------------------------------------------------------------------------------ - if [catch {db_exec_plsql bookmark_add " + if {[catch {db_exec_plsql bookmark_add " declare dummy_var integer; begin @@ -92,7 +92,7 @@ creation_user => :user_id, creation_ip => :creation_ip ); - end;"} errmsg] { + end;"} errmsg]} { bm_handle_bookmark_double_click $bookmark_id $errmsg $return_url } #------------------------------------------------------------------------------------------ Index: openacs-4/packages/bookmarks/www/bookmark-add-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-one.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bookmarks/www/bookmark-add-one.tcl 9 Sep 2013 17:51:47 -0000 1.8 +++ openacs-4/packages/bookmarks/www/bookmark-add-one.tcl 18 Apr 2014 06:38:29 -0000 1.9 @@ -32,7 +32,7 @@ # complete url will not be provided but the url to bookmark # is in this case the return_url which is the page that the # user is viewing - if { [empty_string_p $complete_url] } { + if { $complete_url eq "" } { set complete_url $return_url } @@ -55,11 +55,11 @@ set url_title [bm_get_html_title $url_content] # If user did not enter a title for the bookmark, we need to assign remote page title - if {[empty_string_p $local_title]} { + if {$local_title eq ""} { set user_provided_title_p "f" set local_title $url_title - if {[empty_string_p $local_title]} { + if {$local_title eq ""} { ad_complain "We're sorry but we can not detect a title for this bookmark, the host does not provide one. If you still want to add this bookmark now, press \[Back\] on your browser and check the URL or type in a title." @@ -97,10 +97,10 @@ # If this page was called with a bookmarklet some form vars will not be # provided and we need to set them here. -if { [empty_string_p $viewed_user_id] } { +if { $viewed_user_id eq "" } { set viewed_user_id $user_id } -if { [empty_string_p $bookmark_id] } { +if { $bookmark_id eq "" } { set bookmark_id [db_nextval acs_object_id_seq] } Index: openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl 30 Sep 2003 12:10:04 -0000 1.4 +++ openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl 18 Apr 2014 06:38:29 -0000 1.5 @@ -21,12 +21,12 @@ bm_require_delete_permission $bookmark_id -if [catch {db_exec_plsql bookmark_delete " +if {[catch {db_exec_plsql bookmark_delete " begin bookmark.del ( bookmark_id => :bookmark_id ); - end;"} errmsg] { + end;"} errmsg]} { set n_errors 1 set error_list [list "We were not able to delete the bookmark from the database, this is the error message:
$errmsg"] Index: openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl 9 Sep 2013 12:19:56 -0000 1.4 +++ openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl 18 Apr 2014 06:38:29 -0000 1.5 @@ -25,7 +25,7 @@ old_private_p } -validate { valid_url { - if { [string equal $folder_p "f"] && [empty_string_p [string trim $complete_url]] } { + if { $folder_p == "f" && [empty_string_p [string trim $complete_url]] } { ad_complain "You must provide a non empty url" } } @@ -42,7 +42,7 @@ permission::require_permission -object_id $bookmark_id -privilege admin # We update or insert the url -if { [string equal $folder_p "f"] } { +if {$folder_p == "f"} { set host_url [bm_host_url $complete_url] set creation_ip [ad_conn peeraddr] @@ -83,7 +83,7 @@ end;" # Update the private_p status of the bookmark -if { ![string equal $old_private_p $private_p] } { +if { $old_private_p ne $private_p } { bm_update_bookmark_private_p $bookmark_id $private_p } Index: openacs-4/packages/bookmarks/www/bookmark-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-edit.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bookmarks/www/bookmark-edit.tcl 9 Sep 2013 12:19:56 -0000 1.7 +++ openacs-4/packages/bookmarks/www/bookmark-edit.tcl 18 Apr 2014 06:38:29 -0000 1.8 @@ -51,7 +51,7 @@ ad_return_template "complaint" } -if { [empty_string_p $viewed_user_id] } { +if { $viewed_user_id eq "" } { set viewed_user_id [ad_conn user_id] } @@ -74,7 +74,7 @@ # be set directly for this bookmark set security_inherit_p [db_string inheritance_p "select security_inherit_p from acs_objects where object_id = :bookmark_id"] -if { [string equal $old_private_p "t"] && [string equal $security_inherit_p "t"] } { +if { $old_private_p == "t" && $security_inherit_p == "t" } { set public_possible_p "f" } else { set public_possible_p "t" Index: openacs-4/packages/bookmarks/www/bookmark-header.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-header.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bookmarks/www/bookmark-header.tcl 9 Sep 2013 17:51:47 -0000 1.4 +++ openacs-4/packages/bookmarks/www/bookmark-header.tcl 18 Apr 2014 06:38:29 -0000 1.5 @@ -42,7 +42,7 @@ set browsing_user_id [ad_conn user_id] # Is the user viewing his own bookmarks? -if { ![info exists viewed_user_id] || [string equal $viewed_user_id $browsing_user_id] } { +if { ![info exists viewed_user_id] || $viewed_user_id eq $browsing_user_id } { # The user is viewing his own bookmarks set viewed_user_id $browsing_user_id set context {} @@ -55,7 +55,7 @@ set user_name [db_string user_name "select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id" -bind "viewed_user_id $viewed_user_id" -default ""] -if { ![string equal $viewed_user_id "0"] } { +if { $viewed_user_id ne "0" } { set root_folder_id [bm_get_root_folder_id [ad_conn package_id] $viewed_user_id] } else { set root_folder_id 0 Index: openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl 9 Sep 2013 12:19:56 -0000 1.3 +++ openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl 18 Apr 2014 06:38:29 -0000 1.4 @@ -31,7 +31,7 @@ # connect by prior bookmark_id = parent_id"] -if { [info exists reset_all_individual_p] && [string equal $reset_all_individual_p "t"] && [string equal $non_default_permissions_p "t"] } { +if { [info exists reset_all_individual_p] && $reset_all_individual_p == "t" && $non_default_permissions_p == "t" } { ad_returnredirect "permissions-reset-all?public_p=$public_p&viewed_user_id=$viewed_user_id&root_folder_id=$root_folder_id" } else { ad_returnredirect "index?viewed_user_id=$viewed_user_id" Index: openacs-4/packages/bookmarks/www/bookmarks-check.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-check.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bookmarks/www/bookmarks-check.tcl 9 Sep 2013 12:19:57 -0000 1.7 +++ openacs-4/packages/bookmarks/www/bookmarks-check.tcl 18 Apr 2014 06:38:29 -0000 1.8 @@ -31,7 +31,7 @@ set browsing_user_id [ad_conn user_id] -if { [empty_string_p $viewed_user_id] } { +if { $viewed_user_id eq "" } { # Only admins can call this page for all users permission::require_permission -object_id $package_id -privilege admin @@ -70,7 +70,7 @@