Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -N -r1.38 -r1.39 --- openacs-4/packages/forums/forums.info 27 Jun 2007 22:46:55 -0000 1.38 +++ openacs-4/packages/forums/forums.info 20 Sep 2008 12:10:27 -0000 1.39 @@ -7,26 +7,26 @@ f f - + OpenACS Online discussion forums. - 2007-06-15 + 2008-09-16 OpenACS This online discussion board software is the successor of the original bboard package. The biggest improvement is a scalable datamodel. Forums supports threaded and flat view, moderation, a stand alone search function as well as integration with the OpenACS search package and integration with the notifications package for email alerts. It also supports reply via email. 0 #forums.Forums# - + - - + + Index: openacs-4/packages/forums/lib/forums-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums-portlet.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/forums/lib/forums-portlet.tcl 15 Dec 2006 22:45:33 -0000 1.2 +++ openacs-4/packages/forums/lib/forums-portlet.tcl 20 Sep 2008 12:10:28 -0000 1.3 @@ -22,13 +22,13 @@ if { [info exists n] } { # need to do a type check, as this is interpolated into the PG query # (PG LIMIT clause doesn't accept bind vars) - if { ![string is integer $n] || ![expr $n > 0] } { + if { ![string is integer $n] || ![expr {$n > 0}] } { error "n must be an integer greater than 0" } } else { set n 2 } -if { ![info exists cache] || [expr $cache < 0] } { +if { ![info exists cache] || [expr {$cache < 0}] } { set cache 0 } if { ![exists_and_not_null package_id] } { Index: openacs-4/packages/forums/lib/message/content-updater.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/Attic/content-updater.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/forums/lib/message/content-updater.tcl 28 Jun 2006 20:30:28 -0000 1.1 +++ openacs-4/packages/forums/lib/message/content-updater.tcl 20 Sep 2008 12:10:28 -0000 1.2 @@ -25,7 +25,7 @@ # Find the ordering of messages so it can be consistent # with the code that is in thread-chunk -if { [string equal $forum(presentation_type) flat] } { +if {$forum(presentation_type) eq "flat"} { set order_by "fma.posting_date, fma.tree_sortkey" } else { set order_by "fma.tree_sortkey" Index: openacs-4/packages/forums/lib/message/post.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/post.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/forums/lib/message/post.tcl 13 Jan 2008 12:06:33 -0000 1.18 +++ openacs-4/packages/forums/lib/message/post.tcl 20 Sep 2008 12:10:28 -0000 1.19 @@ -89,7 +89,7 @@ # Form initialisation # set message_id [db_nextval acs_object_id_seq] - if {[empty_string_p $parent_id]} { + if {$parent_id eq ""} { set parent_id "" } else { set forum_id $parent_message(forum_id) @@ -106,7 +106,7 @@ # Form processing # - if { [empty_string_p $anonymous_p] } { set anonymous_p 0 } + if { $anonymous_p eq "" } { set anonymous_p 0 } set action [template::form::get_button message] @@ -121,7 +121,7 @@ 0 $user_id \ 0] - if { [string equal $action "preview"] } { + if {$action eq "preview"} { set confirm_p 1 set subject.spellcheck ":nospell:" @@ -142,7 +142,7 @@ # Let's check if this person is subscribed to the forum # in case we might want to subscribe them to the thread - if {[empty_string_p $parent_id]} { + if {$parent_id eq ""} { if {![empty_string_p [notification::request::get_request_id \ -type_id [notification::type::get_type_id -short_name forums_forum_notif] \ -object_id $forum_id \ @@ -160,7 +160,7 @@ # review and either discard this line or fix the stuff below ... # set redirect_url "[ad_conn package_url]message-view?message_id=[set redirect_message_id]&\#$message_id" - if { [string equal $action "post"] } { + if {$action eq "post"} { set content [template::util::richtext::get_property content $message_body] set format [template::util::richtext::get_property format $message_body] @@ -186,7 +186,7 @@ set redirect_url "[ad_conn package_url]message-view?message_id=$msg(root_message_id)" # Wrap the notifications URL - if {![empty_string_p $subscribe_p] && $subscribe_p && [empty_string_p $parent_id]} { + if {$subscribe_p ne "" && $subscribe_p && $parent_id eq ""} { set notification_url [notification::display::subscribe_url \ -type forums_message_notif \ -object_id $message_id \ @@ -199,7 +199,7 @@ # Wrap the attachments URL if {$attachments_enabled_p} { - if { ![empty_string_p $attach_p] && $attach_p} { + if { $attach_p ne "" && $attach_p} { set redirect_url [attachments::add_attachment_url -object_id $message_id -return_url $redirect_url -pretty_name "[_ forums.Forum_Posting] \"$subject\""] } } Index: openacs-4/packages/forums/lib/message/row.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/forums/lib/message/row.tcl 6 Jun 2007 17:02:43 -0000 1.8 +++ openacs-4/packages/forums/lib/message/row.tcl 20 Sep 2008 12:10:28 -0000 1.9 @@ -34,7 +34,7 @@ set display_subject_p 1 } else { regsub {^(Response to |\s*Re:\s*)*} $message(subject) {} subject - set display_subject_p [expr ![string equal $subject $root_subject]] + set display_subject_p [expr {$subject ne $root_subject }] } if {[exists_and_not_null alt_template]} { @@ -48,4 +48,4 @@ } set allow_edit_own_p [parameter::get -parameter AllowUsersToEditOwnPostsP -default 0] -set own_p [expr [string equal $message(user_id) $viewer_id] && $allow_edit_own_p] +set own_p [expr {$message(user_id) eq $viewer_id && $allow_edit_own_p}] Index: openacs-4/packages/forums/lib/message/row2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row2.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/forums/lib/message/row2.tcl 28 Jun 2006 20:30:28 -0000 1.1 +++ openacs-4/packages/forums/lib/message/row2.tcl 20 Sep 2008 12:10:28 -0000 1.2 @@ -27,7 +27,7 @@ if {![info exists root_subject]} { set display_subject_p 1 } else {thr regsub {^(Response to |\s*Re:\s*)*} $message(subject) {} subject - set display_subject_p [expr ![string equal $subject $root_subject]] + set display_subject_p [expr {$subject ne $root_subject }] } if {[exists_and_not_null alt_template]} { @@ -87,4 +87,4 @@ ## Ends New ## set allow_edit_own_p [parameter::get -parameter AllowUsersToEditOwnPostsP -default 0] -set own_p [expr [string equal $message(user_id) $viewer_id] && $allow_edit_own_p] +set own_p [expr {$message(user_id) eq $viewer_id && $allow_edit_own_p}] Index: openacs-4/packages/forums/lib/message/thread-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/thread-chunk.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/forums/lib/message/thread-chunk.tcl 23 Dec 2007 14:50:15 -0000 1.9 +++ openacs-4/packages/forums/lib/message/thread-chunk.tcl 20 Sep 2008 12:10:28 -0000 1.10 @@ -8,7 +8,7 @@ } -if {$forum(posting_policy) == "moderated"} { +if {$forum(posting_policy) eq "moderated"} { set forum_moderated_p 1 } else { set forum_moderated_p 0 @@ -44,7 +44,7 @@ # ##### -if { [string equal $forum(presentation_type) flat] } { +if {$forum(presentation_type) eq "flat"} { set order_by "fma.posting_date, fma.tree_sortkey" } else { set order_by "fma.tree_sortkey" @@ -56,17 +56,17 @@ set direct_url_base [export_vars -base [ad_conn url] { { message_id $message(root_message_id) } }] set message(direct_url) "$direct_url_base\#msg_$message(message_id)" -set message(number) [expr [lsearch $message_id_list $message(message_id)] + 1] +set message(number) [expr {[lsearch $message_id_list $message(message_id)] + 1}] set message(parent_number) {} set message(parent_direct_url) "" if { [exists_and_not_null message(parent_id)] } { - set message(parent_number) [expr [lsearch $message_id_list $message(parent_id)] + 1] + set message(parent_number) [expr {[lsearch $message_id_list $message(parent_id)] + 1}] set message(parent_direct_url) "$direct_url_base\#msg_$message(parent_id)" set message(parent_root_url) [export_vars -base [ad_conn url] { { message_id $message(parent_id) } }] } set message(open_p) "t" -set message(reply_p) [expr [string equal $message(open_p) "t"] || [string equal $message(user_id) [ad_conn user_id]]] +set message(reply_p) [expr {$message(open_p) eq "t" || $message(user_id) eq [ad_conn user_id]}] set message(tree_level) 0 @@ -77,7 +77,7 @@ ##### # More Tcl vars (we might as well use them - Ben) -if { [string equal $forum(presentation_type) flat] } { +if {$forum(presentation_type) eq "flat"} { set order_by "t.posting_date, tree_sortkey" } else { set order_by "tree_sortkey" @@ -93,11 +93,11 @@ set posting_date_ansi [lc_time_system_to_conn $posting_date_ansi] set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] set direct_url "$direct_url_base\#msg_$message_id" - set number [expr [lsearch $message_id_list $message_id] + 1] - set parent_number [expr [lsearch $message_id_list $parent_id] + 1] + set number [expr {[lsearch $message_id_list $message_id] + 1}] + set parent_number [expr {[lsearch $message_id_list $parent_id] + 1}] set parent_direct_url "$direct_url_base\#msg_$parent_id" set parent_root_url [export_vars -base [ad_conn url] {{message_id $parent_id}}] - set reply_p [expr [string equal $open_p "t"] || [string equal $user_id [ad_conn user_id]]] + set reply_p [expr {$open_p eq "t" || $user_id eq [ad_conn user_id]}] # DEDS: get the response ids the tcl way or else we need to hit # the db for each response to count its children @@ -113,7 +113,7 @@ } } elseif {$tree_level < $old_tree_level} { # decrease in level. let us pop the last id. - set message_ids_last [expr [llength $message_ids] - 1] + set message_ids_last [expr {[llength $message_ids] - 1}] set message_ids [lreplace $message_ids $message_ids_last $message_ids_last] } else { foreach one_parent_id $message_ids { Index: openacs-4/packages/forums/lib/message/threads-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/threads-chunk.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/forums/lib/message/threads-chunk.tcl 16 Sep 2008 17:26:15 -0000 1.12 +++ openacs-4/packages/forums/lib/message/threads-chunk.tcl 20 Sep 2008 12:10:28 -0000 1.13 @@ -47,7 +47,7 @@ # moderated 2. User is a moderator or adminsitrator if {$permissions(post_p)} { - if {([forum::new_questions_allowed_p -forum_id $forum_id] && ($forum(posting_policy) == "open" || $forum(posting_policy) == "moderated")) || [template::util::is_true $permissions(admin_p)] || [template::util::is_true $permissions(moderate_p)] } { + if {([forum::new_questions_allowed_p -forum_id $forum_id] && ($forum(posting_policy) eq "open" || $forum(posting_policy) eq "moderated")) || [template::util::is_true $permissions(admin_p)] || [template::util::is_true $permissions(moderate_p)] } { lappend actions [_ forums.Post_a_New_Message] [export_vars -base "${base_url}message-post" { forum_id }] [_ forums.Post_a_New_Message] } } Index: openacs-4/packages/forums/lib/search/search-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/search/search-chunk.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/forums/lib/search/search-chunk.tcl 23 Dec 2007 14:50:15 -0000 1.5 +++ openacs-4/packages/forums/lib/search/search-chunk.tcl 20 Sep 2008 12:10:28 -0000 1.6 @@ -21,7 +21,7 @@ regsub -all {[^[:alnum:]_[:blank:]]} $search_text {} search_text set query search_all_forums - if {![empty_string_p $forum_id]} { + if {$forum_id ne ""} { set query search_one_forum } Index: openacs-4/packages/forums/lib/user/post-history-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/forums/lib/user/post-history-chunk.tcl 23 Dec 2007 14:50:15 -0000 1.5 +++ openacs-4/packages/forums/lib/user/post-history-chunk.tcl 20 Sep 2008 12:10:28 -0000 1.6 @@ -28,7 +28,7 @@ " set query select_messages -if {[string equal $view forum]} { +if {$view eq "forum"} { set query select_messages_by_forum template::list::create \ -html {style "width: 50%; text-align: center; margin: auto"} \ Index: openacs-4/packages/forums/tcl/forum-reply-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forum-reply-procs.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/forums/tcl/forum-reply-procs.tcl 2 Sep 2008 22:11:11 -0000 1.5 +++ openacs-4/packages/forums/tcl/forum-reply-procs.tcl 20 Sep 2008 12:10:28 -0000 1.6 @@ -19,7 +19,7 @@ set object_type [db_string select_object_type {}] - if {[string compare $object_type "forums_message"] == 0} { + if {$object_type eq "forums_message" } { # object is a message set message_id $object_id Index: openacs-4/packages/forums/tcl/forums-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-callback-procs.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/forums/tcl/forums-callback-procs.tcl 15 May 2007 20:14:40 -0000 1.6 +++ openacs-4/packages/forums/tcl/forums-callback-procs.tcl 20 Sep 2008 12:10:28 -0000 1.7 @@ -125,7 +125,7 @@ forum::message::get -message_id $message_id -array message - if { ![empty_string_p $message(parent_id)] } { + if { $message(parent_id) ne "" } { ns_log debug "forum::message::datasource was called with a message_id that has a parent - skipping: $message_id" set empty(object_id) $message_id set empty(title) "" @@ -151,7 +151,7 @@ set root_subject $message(subject) regexp {^(?:Re: )+(.*)$} $subject match subject - if { [string compare $subject $root_subject] != 0 } { + if { $subject ne $root_subject } { # different subject append combined_content "$subject\n\n" } Index: openacs-4/packages/forums/tcl/forums-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-install-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/forums/tcl/forums-install-procs.tcl 3 Jan 2006 14:18:04 -0000 1.7 +++ openacs-4/packages/forums/tcl/forums-install-procs.tcl 20 Sep 2008 12:10:28 -0000 1.8 @@ -59,7 +59,7 @@ -posting_policy $posting_policy \ -package_id $package_id] - if {![string equal $id ""]} { + if {$id ne "" } { set ::install::xml::ids($id) $forum_id } } Index: openacs-4/packages/forums/tcl/forums-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-procs.tcl,v diff -u -N -r1.22 -r1.23 --- openacs-4/packages/forums/tcl/forums-procs.tcl 22 May 2007 09:42:09 -0000 1.22 +++ openacs-4/packages/forums/tcl/forums-procs.tcl 20 Sep 2008 12:10:28 -0000 1.23 @@ -59,7 +59,7 @@ } ad_proc -public forum::attachments_enabled_p {} { - if {[string eq forums [ad_conn package_key]]} { + if {"forums" eq [ad_conn package_key]} { set package_id [site_node_apm_integration::child_package_exists_p \ -package_key attachments ] @@ -99,7 +99,7 @@ # just assuming registered_users is the # right group to be granting write to. - if {![string equal closed $posting_policy]} { + if {"closed" ne $posting_policy } { permission::grant -object_id $forum_id \ -party_id [acs_magic_object registered_users] \ -privilege write @@ -115,7 +115,7 @@ {-forum_id:required} {-party_id ""} } { - if { [empty_string_p $party_id] } { + if { $party_id eq "" } { set party_id [acs_magic_object registered_users] } # Give the public the right to ask new questions @@ -129,7 +129,7 @@ {-forum_id:required} {-party_id ""} } { - if { [empty_string_p $party_id] } { + if { $party_id eq "" } { set party_id [acs_magic_object registered_users] } # Revoke the right from the public to ask new questions @@ -143,7 +143,7 @@ {-forum_id:required} {-party_id ""} } { - if { [empty_string_p $party_id] } { + if { $party_id eq "" } { set party_id [acs_magic_object registered_users] } permission::permission_p -object_id $forum_id \ Index: openacs-4/packages/forums/tcl/forums-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-sc-procs.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/forums/tcl/forums-sc-procs.tcl 17 Nov 2006 20:31:53 -0000 1.9 +++ openacs-4/packages/forums/tcl/forums-sc-procs.tcl 20 Sep 2008 12:10:28 -0000 1.10 @@ -33,7 +33,7 @@ forum::message::get -message_id $message_id -array message - if { ![empty_string_p $message(parent_id)] } { + if { $message(parent_id) ne "" } { ns_log Notice "forum::message::datasource was called with a message_id that has a parent - skipping: $message_id" return {object_id {} name {} charter {} mime {} storage_type {}} } @@ -50,7 +50,7 @@ set root_subject $message(subject) regexp {^(?:Re: )+(.*)$} $subject match subject - if { [string compare $subject $root_subject] != 0 } { + if { $subject ne $root_subject } { # different subject append combined_content "$subject\n\n" } Index: openacs-4/packages/forums/tcl/messages-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-procs.tcl,v diff -u -N -r1.40 -r1.41 --- openacs-4/packages/forums/tcl/messages-procs.tcl 11 Oct 2007 01:05:59 -0000 1.40 +++ openacs-4/packages/forums/tcl/messages-procs.tcl 20 Sep 2008 12:10:28 -0000 1.41 @@ -24,7 +24,7 @@ } { # If no user_id is provided, we set it # to the currently logged-in user - if {[empty_string_p $user_id]} { + if {$user_id eq ""} { set user_id [ad_conn user_id] } @@ -45,7 +45,7 @@ set message_id [package_instantiate_object -var_list $var_list forums_message] get -message_id $message_id -array message - if {[info exists message(state)] && [string equal $message(state) approved]} { + if {[info exists message(state)] && $message(state) eq "approved"} { do_notifications -message_id $message_id -user_id $user_id } @@ -58,7 +58,7 @@ # this procedure. If so, the error is due to a double click # and we should continue without returning an error. - if {![empty_string_p $original_message_id]} { + if {$original_message_id ne ""} { # The was a non-null message_id arguement if {[db_string message_exists_p { *SQL* }]} { return $message_id @@ -86,7 +86,7 @@ set useScreenNameP [parameter::get -parameter "UseScreenNameP" -default 0] if {($useScreenNameP == 0) && ($user_id != 0)} { - if {[empty_string_p $user_id]} { + if {$user_id eq ""} { set user_id [ad_conn user_id] } } else { @@ -265,7 +265,7 @@ callback forum::message_delete -package_id [ad_conn package_id] -message_id $message_id } - if { [forum::use_ReadingInfo_p] && [expr { [db_string is_root "select parent_id from forums_messages where message_id = :message_id"] == "" } ] } { + if { [forum::use_ReadingInfo_p] && [expr { [db_string is_root "select parent_id from forums_messages where message_id = :message_id"] eq "" } ] } { set db_antwort [db_string forums_reading_info__remove_msg { select forums_reading_info__remove_msg ( :message_id @@ -330,7 +330,7 @@ set export_vars [ad_export_vars -override [list [list order_by $new_order_by]] {order_by forum_id}] set toggle_url "[ad_conn url]?${export_vars}" - if { [string equal $order_by posting_date] } { + if {$order_by eq "posting_date"} { # subject selected set subject_link "$subject_label" set child_link "$child_label" @@ -353,11 +353,11 @@ } { upvar $message init_msg - if { [empty_string_p $forum_id] && [empty_string_p $parent] } { + if { $forum_id eq "" && $parent eq "" } { return -code error [_ forums.lt_You_either_have_to] } - if { ![empty_string_p $parent] } { + if { $parent ne "" } { upvar $parent parent_msg set init_msg(parent_id) $parent_msg(message_id) Index: openacs-4/packages/forums/www/forum-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.tcl,v diff -u -N -r1.29 -r1.30 --- openacs-4/packages/forums/www/forum-view.tcl 23 Dec 2007 14:50:15 -0000 1.29 +++ openacs-4/packages/forums/www/forum-view.tcl 20 Sep 2008 12:10:28 -0000 1.30 @@ -16,15 +16,15 @@ # Get forum data if {[catch {forum::get -forum_id $forum_id -array forum} errMsg]} { - if {[string equal $::errorCode NOT_FOUND]} { + if {$::errorCode eq "NOT_FOUND"} { ns_returnnotfound ad_script_abort } error $errMsg $::errorInfo $::errorCode } # If disabled! -if {$forum(enabled_p) != "t"} { +if {$forum(enabled_p) ne "t"} { ad_returnredirect "./" ad_script_abort } @@ -33,7 +33,7 @@ forum::security::permissions -forum_id $forum_id permissions #it is confusing to provide a moderate link for non-moderated forums. -if { $forum(posting_policy) != "moderated" } { +if { $forum(posting_policy) ne "moderated" } { set permissions(moderate_p) 0 } Index: openacs-4/packages/forums/www/message-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-email.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/forums/www/message-email.tcl 13 Dec 2007 14:22:54 -0000 1.15 +++ openacs-4/packages/forums/www/message-email.tcl 20 Sep 2008 12:10:28 -0000 1.16 @@ -47,7 +47,7 @@ } set context [list [list "./forum-view?forum_id=$message(forum_id)" "$message(forum_name)"]] -if {![empty_string_p $message(parent_id)]} { +if {$message(parent_id) ne ""} { lappend context [list "./message-view?message_id=$message(root_message_id)" "[_ forums.Entire_Thread]"] } lappend context [list "./message-view?message_id=$message(message_id)" "$message(subject)"] Index: openacs-4/packages/forums/www/message-post.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post.tcl,v diff -u -N -r1.37 -r1.38 --- openacs-4/packages/forums/www/message-post.tcl 12 Mar 2008 05:26:43 -0000 1.37 +++ openacs-4/packages/forums/www/message-post.tcl 20 Sep 2008 12:10:28 -0000 1.38 @@ -11,7 +11,7 @@ {parent_id ""} } -validate { forum_id_or_parent_id { - if {[empty_string_p $forum_id] && [empty_string_p $parent_id]} { + if {$forum_id eq "" && $parent_id eq ""} { ad_complain [_ forums.lt_You_either_have_to] } } @@ -33,7 +33,7 @@ # Pull out required forum and parent data and # perform security checks # -if {[empty_string_p $parent_id]} { +if {$parent_id eq ""} { # no parent_id, therefore new thread # require thread creation privs forum::security::require_post_forum -forum_id $forum_id @@ -53,10 +53,10 @@ ############################## # Calculate users rights and forums policy # -set anonymous_allowed_p [expr ([empty_string_p $forum_id] || \ +set anonymous_allowed_p [expr ($forum_id eq "" || \ [forum::security::can_post_forum_p \ -forum_id $forum_id -user_id 0]) && \ - ([empty_string_p $parent_id] || \ + ($parent_id eq "" || \ [forum::security::can_post_message_p \ -message_id $parent_id -user_id 0])] @@ -73,10 +73,10 @@ #template::head::add_css -alternate -href /resources/forums/collapse.css -media all -lang $lang -title "collapse" #template::head::add_css -alternate -href /resources/forums/expand.css -media all -lang $lang -title "expand" -if {![string equal [template::form::get_button message] "preview"]} { +if {[template::form::get_button message] ne "preview" } { set context [list [list "./forum-view?forum_id=$forum_id" [ad_quotehtml $forum(name)]]] - if {[empty_string_p $parent_id]} { + if {$parent_id eq ""} { lappend context [_ forums.Post_a_Message] } else { lappend context [list "./message-view?message_id=$parent_message(message_id)" "$parent_message(subject)"] Index: openacs-4/packages/forums/www/message-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.tcl,v diff -u -N -r1.45 -r1.46 --- openacs-4/packages/forums/www/message-view.tcl 16 Sep 2008 17:26:15 -0000 1.45 +++ openacs-4/packages/forums/www/message-view.tcl 20 Sep 2008 12:10:28 -0000 1.46 @@ -28,7 +28,7 @@ forum::get -forum_id $message(forum_id) -array forum # If disabled! -if {$forum(enabled_p) != "t"} { +if {$forum(enabled_p) ne "t"} { ad_returnredirect "./" ad_script_abort } @@ -56,7 +56,7 @@ } # Check if the message is approved -if {!${permissions(moderate_p)} && ![string equal $message(state) approved]} { +if {!${permissions(moderate_p)} && $message(state) ne "approved" } { ad_returnredirect "forum-view?forum_id=$message(forum_id)" ad_script_abort } @@ -71,7 +71,7 @@ set searchbox_p [parameter::get -parameter ForumsSearchBoxP -default 1] # If this is a top-level thread, we allow subscriptions here -if { [empty_string_p $message(parent_id)] } { +if { $message(parent_id) eq "" } { set notification_chunk [notification::display::request_widget \ -type forums_message_notif \ -object_id $message(message_id) \ @@ -88,7 +88,7 @@ } set context [list [list "./forum-view?forum_id=$message(forum_id)" "$message(forum_name)"]] -if {![empty_string_p $message(parent_id)]} { +if {$message(parent_id) ne ""} { lappend context [list "./message-view?message_id=$message(root_message_id)" "$message(root_subject)"] lappend context [_ forums.One_Message] } else { Index: openacs-4/packages/forums/www/admin/subscribe-others-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/subscribe-others-2.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/forums/www/admin/subscribe-others-2.tcl 12 Sep 2006 18:12:36 -0000 1.3 +++ openacs-4/packages/forums/www/admin/subscribe-others-2.tcl 20 Sep 2008 12:10:28 -0000 1.4 @@ -102,7 +102,7 @@ # user_id is blank if the account doesn't exist or if the # email account looks invalid. - if {[empty_string_p $user_id]} { + if {$user_id eq ""} { # shall we create the new user? if {[string is true $create_new_users_p]} { @@ -129,12 +129,12 @@ } - if {![empty_string_p $user_id]} { + if {$user_id ne ""} { # Check if subscribed set request_id [notification::request::get_request_id -type_id $type_id -object_id $forum_id -user_id $user_id] - if {![empty_string_p $request_id]} { + if {$request_id ne ""} { ns_write "
already subscribed ($fname $lname ($email)
" } else { ns_write "subscribing ($fname $lname ($email)
" Index: openacs-4/packages/forums/www/moderate/move-thread-thread.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-thread.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/forums/www/moderate/move-thread-thread.tcl 8 Aug 2006 21:26:53 -0000 1.2 +++ openacs-4/packages/forums/www/moderate/move-thread-thread.tcl 20 Sep 2008 12:10:28 -0000 1.3 @@ -2,7 +2,7 @@ Move a thread to other thread of same forum or other forum. - @author Natalia P�rez (nperper@it.uc3m.es) + @author Natalia Pérez (nperper@it.uc3m.es) @creation-date 2005-03-29 } { @@ -26,10 +26,10 @@ #get the clicked button set action [template::form::get_action confirmed_move] -if {$action == "yes"} { +if {$action eq "yes"} { set confirm_p 1 } -if {$action == "no"} { +if {$action eq "no"} { set confirm_p 2 } Index: openacs-4/packages/forums/www/moderate/move-thread.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/forums/www/moderate/move-thread.tcl 15 May 2007 20:14:41 -0000 1.3 +++ openacs-4/packages/forums/www/moderate/move-thread.tcl 20 Sep 2008 12:10:28 -0000 1.4 @@ -2,7 +2,7 @@ Move a Message to other thread in the same forum. - @author Natalia P�rez (nperper@it.uc3m.es) + @author Natalia Pérez (nperper@it.uc3m.es) @creation-date 2005-03-14 } { @@ -25,10 +25,10 @@ } #get the clicked button set action [template::form::get_action confirmed_move] -if {$action == "yes"} { +if {$action eq "yes"} { set confirm_p 1 } -if {$action == "no"} { +if {$action eq "no"} { set confirm_p 2 } @@ -55,7 +55,7 @@ #get all descendents db_foreach forums::move_thread::get_all_child {} { - #update los ocho primeros d�gitos de tree_sortkey + #update los ocho primeros dígitos de tree_sortkey set join_tree_sortkey $father_tree_sortkey append join_tree_sortkey $father_max_child_sortkey append join_tree_sortkey $child_tree_sortkey Index: openacs-4/packages/forums/www/moderate/move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/forums/www/moderate/move.tcl 8 Apr 2005 08:28:09 -0000 1.1 +++ openacs-4/packages/forums/www/moderate/move.tcl 20 Sep 2008 12:10:28 -0000 1.2 @@ -2,7 +2,7 @@ Move a thread to other forum. - @author Natalia P�rez (nperper@it.uc3m.es) + @author Natalia Pérez (nperper@it.uc3m.es) @creation-date 2005-03-14 } { @@ -26,10 +26,10 @@ #get the clicked button set action [template::form::get_action confirmed_move] -if {$action == "yes"} { +if {$action eq "yes"} { set confirm_p 1 } -if {$action == "no"} { +if {$action eq "no"} { set confirm_p 2 }