Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v diff -u -r1.89.2.2 -r1.89.2.3 --- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 10 Sep 2015 08:21:12 -0000 1.89.2.2 +++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 20 Oct 2015 08:19:13 -0000 1.89.2.3 @@ -1421,8 +1421,10 @@ switch $member_state { approved { - set PasswordExpirationDays [parameter::get -parameter PasswordExpirationDays -package_id [ad_acs_kernel_id] -default 0] - + set PasswordExpirationDays [parameter::get \ + -parameter PasswordExpirationDays \ + -package_id [ad_acs_kernel_id] \ + -default 0] if { $email_verified_p == "f" } { if { !$no_dialogue_p } { @@ -1435,12 +1437,19 @@ set result(account_message) [_ acs-subsite.Error_sending_verification_mail] } } - } elseif { [acs_user::ScreenName] eq "require" && $screen_name eq "" } { + + } elseif { [acs_user::ScreenName] eq "require" + && $screen_name eq "" + } { set message "Please enter a screen name now." - set result(account_url) [export_vars -no_empty -base "[subsite::get_element -element url]user/basic-info-update" { message return_url {edit_p 1} }] - } elseif { $PasswordExpirationDays > 0 && \ - ($password_age_days eq "" || $password_age_days > $PasswordExpirationDays) } { + set result(account_url) [export_vars -no_empty \ + -base "[subsite::get_element -element url]user/basic-info-update" { + message return_url {edit_p 1} + }] + } elseif { $PasswordExpirationDays > 0 + && ($password_age_days eq "" || $password_age_days > $PasswordExpirationDays) + } { set message [_ acs-subsite.Password_regular_change_now] set result(account_url) [export_vars -base "[subsite::get_element -element url]user/password-update" { return_url message }] } else { @@ -1567,12 +1576,14 @@ # TODO: When doing RBM's parameter, make sure that we still require both first_names and last_names, or none of them if { ([info exists user(first_names)] && $user(first_names) ne "") - && [string first "<" $user(first_names)] != -1 } { + && [string first "<" $user(first_names)] != -1 + } { set element_messages(first_names) [_ acs-subsite.lt_You_cant_have_a_lt_in] } if { ([info exists user(last_name)] && $user(last_name) ne "") - && [string first "<" $user(last_name)] != -1 } { + && [string first "<" $user(last_name)] != -1 + } { set element_messages(last_name) [_ acs-subsite.lt_You_cant_have_a_lt_in_1] } Index: openacs-4/packages/acs-authentication/tcl/local-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/local-procs.tcl,v diff -u -r1.39.2.2 -r1.39.2.3 --- openacs-4/packages/acs-authentication/tcl/local-procs.tcl 10 Sep 2015 08:21:12 -0000 1.39.2.2 +++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl 20 Oct 2015 08:19:13 -0000 1.39.2.3 @@ -499,17 +499,25 @@ # LARS TODO: Move this out of the local driver and into the auth framework # Send password confirmation email to user - if { [set email_reg_confirm_p [parameter::get -parameter EmailRegistrationConfirmationToUserP -package_id [ad_conn subsite_id] -default 1]] != 0 } { - if { $generated_pwd_p || \ - [parameter::get -parameter RegistrationProvidesRandomPasswordP -package_id [ad_conn subsite_id] -default 0] || \ - $email_reg_confirm_p } { - + if { [set email_reg_confirm_p [parameter::get \ + -parameter EmailRegistrationConfirmationToUserP \ + -package_id [ad_conn subsite_id] -default 1]] != 0 + } { + if { $generated_pwd_p + || [parameter::get \ + -parameter RegistrationProvidesRandomPasswordP \ + -package_id [ad_conn subsite_id] -default 0] + || $email_reg_confirm_p + } { with_catch errmsg { auth::password::email_password \ -username $username \ -authority_id $authority_id \ -password $password \ - -from [parameter::get -parameter NewRegistrationEmailAddress -package_id [ad_conn subsite_id] -default [ad_system_owner]] \ + -from [parameter::get \ + -parameter NewRegistrationEmailAddress \ + -package_id [ad_conn subsite_id] \ + -default [ad_system_owner]] \ -subject_msg_key "acs-subsite.email_subject_Registration_password" \ -body_msg_key "acs-subsite.email_body_Registration_password" } { Index: openacs-4/packages/acs-authentication/tcl/password-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/password-procs.tcl,v diff -u -r1.19.2.2 -r1.19.2.3 --- openacs-4/packages/acs-authentication/tcl/password-procs.tcl 10 Sep 2015 08:21:13 -0000 1.19.2.2 +++ openacs-4/packages/acs-authentication/tcl/password-procs.tcl 20 Oct 2015 08:19:13 -0000 1.19.2.3 @@ -449,11 +449,12 @@ # Check the result code and provide canned responses switch $result(password_status) { ok { - if { ([info exists result(password)] && $result(password) ne "") && \ - (!$admin_p || [parameter::get \ - -parameter EmailChangedPasswordP \ - -package_id [ad_conn subsite_id] \ - -default 1]) } { + if { [info exists result(password)] && $result(password) ne "" + && (!$admin_p || [parameter::get \ + -parameter EmailChangedPasswordP \ + -package_id [ad_conn subsite_id] \ + -default 1]) + } { # We have retrieved or reset a forgotten password that we should email to the user with_catch errmsg { auth::password::email_password \ Index: openacs-4/packages/acs-authentication/tcl/sync-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/sync-procs.tcl,v diff -u -r1.35.2.2 -r1.35.2.3 --- openacs-4/packages/acs-authentication/tcl/sync-procs.tcl 10 Sep 2015 08:21:13 -0000 1.35.2.2 +++ openacs-4/packages/acs-authentication/tcl/sync-procs.tcl 20 Oct 2015 08:19:13 -0000 1.35.2.3 @@ -721,9 +721,9 @@ array set param $parameters - if { ($param(SnapshotURL) ne "" && [clock format [clock seconds] -format "%d"] eq "01") || \ - $param(IncrementalURL) eq "" } { - + if { ($param(SnapshotURL) ne "" && [clock format [clock seconds] -format "%d"] eq "01") + || $param(IncrementalURL) eq "" + } { # On the first day of the month, we get a snapshot set url $param(SnapshotURL) set result(snapshot_p) "t" @@ -799,9 +799,9 @@ array set param $parameters - if { ($param(SnapshotPath) ne "" && [clock format [clock seconds] -format "%d"] eq "01") || \ - $param(IncrementalPath) eq "" } { - + if { ($param(SnapshotPath) ne "" && [clock format [clock seconds] -format "%d"] eq "01") + || $param(IncrementalPath) eq "" + } { # On the first day of the month, we get a snapshot set path $param(SnapshotPath) set result(snapshot_p) "t" Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl,v diff -u -r1.18.2.2 -r1.18.2.3 --- openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 10 Sep 2015 08:21:26 -0000 1.18.2.2 +++ openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 20 Oct 2015 08:19:13 -0000 1.18.2.3 @@ -349,8 +349,9 @@ } else { # Message is supposed to exist in DB # Is it new or changed? - if { ![info exists base_messages($message_key)] || \ - $base_messages($message_key) ne $db_messages($message_key) } { + if { ![info exists base_messages($message_key)] + || $base_messages($message_key) ne $db_messages($message_key) + } { # Added || updated aa_log "Adding/updating message $message_key" lang::message::register \ Index: openacs-4/packages/calendar/www/view-one-day-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.tcl,v diff -u -r1.41.2.1 -r1.41.2.2 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 10 Sep 2015 08:30:16 -0000 1.41.2.1 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 20 Oct 2015 08:19:13 -0000 1.41.2.2 @@ -141,34 +141,38 @@ scan [lc_time_fmt $ansi_start_date "%H"] %d start_hour scan [lc_time_fmt $ansi_end_date "%H"] %d end_hour - if { $start_hour < $adjusted_start_display_hour && \ - [string equal \ - [string range $ansi_start_date 0 9] \ - [string range $ansi_end_date 0 9]] } { + if { $start_hour < $adjusted_start_display_hour + && [string range $ansi_start_date 0 9] eq [string range $ansi_end_date 0 9] + } { set adjusted_start_display_hour $start_hour } - if { $end_hour > $adjusted_end_display_hour && \ - [string equal \ - [string range $ansi_start_date 0 9] \ - [string range $ansi_end_date 0 9]] } { + if { $end_hour > $adjusted_end_display_hour + && [string range $ansi_start_date 0 9] eq [string range $ansi_end_date 0 9] + } { set adjusted_end_display_hour $end_hour } - set top [expr ($start_hour * ($hour_height_inside+$hour_height_sep)) \ - + ($start_minutes*$hour_height_inside/60)] - set bottom [expr ($end_hour * ($hour_height_inside+$hour_height_sep)) \ - + ($end_minutes*$hour_height_inside/60)] + set top [expr {($start_hour * ($hour_height_inside+$hour_height_sep)) + + ($start_minutes*$hour_height_inside/60)}] + set bottom [expr {($end_hour * ($hour_height_inside+$hour_height_sep)) + + ($end_minutes*$hour_height_inside/60)}] set height [expr {$bottom - $top - 2}] set bump_right $bump_right_base foreach {previous_start previous_end} $previous_intervals { - if { ($start_seconds >= $previous_start && $start_seconds < $previous_end) || ($previous_start >= $start_seconds && $previous_start < $end_seconds) } { + if { ($start_seconds >= $previous_start && $start_seconds < $previous_end) + || ($previous_start >= $start_seconds && $previous_start < $end_seconds) + } { incr bump_right $bump_right_delta } } - set event_url [export_vars -base [site_node::get_url_from_object_id -object_id $cal_package_id]cal-item-view {return_url {cal_item_id $item_id}}] + set event_url [export_vars \ + -base [site_node::get_url_from_object_id \ + -object_id $cal_package_id]cal-item-view { + return_url {cal_item_id $item_id} + }] multirow append items 0 "calendar-${system_type}Item" \ "$name ($start_time - $end_time)" \ @@ -193,7 +197,8 @@ for {set i 1} {$i <= $num_items } {incr i} { if { [multirow get items $i all_day_p] } { multirow set items $i height \ - [expr ($adjusted_end_display_hour-$adjusted_start_display_hour+1)*($hour_height_inside+$hour_height_sep)] + [expr {($adjusted_end_display_hour - $adjusted_start_display_hour + 1) + * ($hour_height_inside + $hour_height_sep)}] } else { set currval [multirow get items $i top] multirow set items $i top \ Index: openacs-4/packages/calendar/www/view-week-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display.tcl,v diff -u -r1.27.2.1 -r1.27.2.2 --- openacs-4/packages/calendar/www/view-week-display.tcl 10 Sep 2015 08:30:16 -0000 1.27.2.1 +++ openacs-4/packages/calendar/www/view-week-display.tcl 20 Oct 2015 08:19:14 -0000 1.27.2.2 @@ -52,7 +52,7 @@ set first_day_of_week [lc_get firstdayofweek] set first_us_weekday [lindex [lc_get -locale en_US day] $first_day_of_week] -set last_us_weekday [lindex [lc_get -locale en_US day] [expr {[expr {$first_day_of_week + 6}] % 7}]] +set last_us_weekday [lindex [lc_get -locale en_US day] [expr {($first_day_of_week + 6) % 7}]] db_1row select_weekday_info {} db_1row select_week_info {} @@ -122,7 +122,7 @@ } if { $day_of_week != $loop_day_of_week } { - set day_width_$loop_day_of_week [expr ($day_width) + (($max_bumps+$all_day_events) * $event_bump_delta) + 5] + set day_width_$loop_day_of_week [expr {($day_width) + (($max_bumps+$all_day_events) * $event_bump_delta) + 5}] set event_left_base 0 for {set i 0} {$i < $day_of_week} {incr i} { incr event_left_base [set day_width_$i] @@ -146,26 +146,24 @@ set bottom_hour $end_hour set bottom_minutes $end_minutes - if { $start_hour < $adjusted_start_display_hour && \ - [string equal \ - [string range $ansi_start_date 0 9] \ - [string range $ansi_end_date 0 9]] } { + if { $start_hour < $adjusted_start_display_hour + && [string range $ansi_start_date 0 9] eq [string range $ansi_end_date 0 9] + } { set adjusted_start_display_hour $start_hour } - if { $end_hour > $adjusted_end_display_hour && \ - [string equal \ - [string range $ansi_start_date 0 9] \ - [string range $ansi_end_date 0 9]] } { + if { $end_hour > $adjusted_end_display_hour + && [string range $ansi_start_date 0 9] eq [string range $ansi_end_date 0 9] + } { set adjusted_end_display_hour $end_hour } } - set top [expr ($top_hour * ($hour_height_inside+$hour_height_sep)) \ - + ($top_minutes*$hour_height_inside/60)] - set bottom [expr ($bottom_hour * ($hour_height_inside+$hour_height_sep)) \ - + ($bottom_minutes*$hour_height_inside/60)] + set top [expr {($top_hour * ($hour_height_inside+$hour_height_sep)) + + ($top_minutes*$hour_height_inside/60)}] + set bottom [expr {($bottom_hour * ($hour_height_inside+$hour_height_sep)) + + ($bottom_minutes*$hour_height_inside/60)}] set height [expr {$bottom - $top - 3}] set left $event_left_base @@ -184,18 +182,23 @@ #Regular event. set name "$name ($start_time - $end_time)" foreach {previous_start previous_end} $previous_intervals { - if { ($start_seconds >= $previous_start && $start_seconds < $previous_end) || ($previous_start >= $start_seconds && $previous_start < $end_seconds) } { + if { ($start_seconds >= $previous_start && $start_seconds < $previous_end) + || ($previous_start >= $start_seconds && $previous_start < $end_seconds) + } { incr bumps } } if { $bumps > $max_bumps } { set max_bumps $bumps } } - incr top [expr {$bumps*5}] - incr left [expr {$bumps*$event_bump_delta}] + incr top [expr {$bumps * 5}] + incr left [expr {$bumps * $event_bump_delta}] - set event_url [export_vars -base [site_node::get_url_from_object_id -object_id $cal_package_id]cal-item-view {return_url {cal_item_id $item_id}}] + set event_url [export_vars \ + -base [site_node::get_url_from_object_id -object_id $cal_package_id]cal-item-view { + return_url {cal_item_id $item_id} + }] multirow append items \ "$name" \ @@ -225,14 +228,15 @@ } # Set day width for the final iteration of the loop -set day_width_$loop_day_of_week [expr ($day_width) + (($max_bumps+$all_day_events) * $event_bump_delta) + 5] +set day_width_$loop_day_of_week [expr {($day_width) + (($max_bumps+$all_day_events) * $event_bump_delta) + 5}] #Now correct the top attribute for the adjusted start. set num_items [multirow size items] for {set i 1} {$i <= $num_items } {incr i} { if { [multirow get items $i no_time_p] } { multirow set items $i height \ - [expr ($adjusted_end_display_hour-$adjusted_start_display_hour+1)*($hour_height_inside+$hour_height_sep)] + [expr {($adjusted_end_display_hour - $adjusted_start_display_hour + 1) + * ($hour_height_inside + $hour_height_sep)}] } else { set currval [multirow get items $i top] multirow set items $i top \ @@ -276,16 +280,14 @@ set nav_url_base [export_vars -base [ad_conn url] -entire_form -exclude {date view}] for {set i 0} {$i < 7} {incr i} { - set weekday_secs [expr {$first_weekday_date_secs + ($i*86400)}] - set trimmed_month \ - [string trimleft [clock format $weekday_secs -format "%m"] 0] - set trimmed_day \ - [string trimleft [clock format $weekday_secs -format "%d"] 0] - set weekday_date [clock format $weekday_secs -format "%Y-%m-%d"] - set weekday_url [export_vars -base [ad_conn url] -url -entire_form {{view day} {date $weekday_date}}] + set weekday_secs [expr {$first_weekday_date_secs + ($i*86400)}] + set trimmed_month [string trimleft [clock format $weekday_secs -format "%m"] 0] + set trimmed_day [string trimleft [clock format $weekday_secs -format "%d"] 0] + set weekday_date [clock format $weekday_secs -format "%Y-%m-%d"] + set weekday_url [export_vars -base [ad_conn url] -url -entire_form {{view day} {date $weekday_date}}] #TODO: localize_me set weekday_monthday "$trimmed_month/$trimmed_day" - set i_day [expr { [expr { $i + $first_day_of_week }] % 7 }] + set i_day [expr { ($i + $first_day_of_week) % 7 }] multirow append days_of_week [set day_width_$i] [lindex $week_days $i_day] $weekday_monthday $weekday_date $weekday_url $i } 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 -r1.43.2.1 -r1.43.2.2 --- openacs-4/packages/forums/www/message-post.tcl 12 Sep 2015 11:06:28 -0000 1.43.2.1 +++ openacs-4/packages/forums/www/message-post.tcl 20 Oct 2015 08:19:14 -0000 1.43.2.2 @@ -63,12 +63,12 @@ ############################## # Calculate users rights and forums policy # -set anonymous_allowed_p [expr {($forum_id eq "" || \ - [forum::security::can_post_forum_p \ - -forum_id $forum_id -user_id 0]) && \ - ($parent_id eq "" || \ - [forum::security::can_post_message_p \ - -message_id $parent_id -user_id 0])}] +set anonymous_allowed_p [expr {($forum_id eq "" + || [forum::security::can_post_forum_p \ + -forum_id $forum_id -user_id 0]) + && ($parent_id eq "" + || [forum::security::can_post_message_p \ + -message_id $parent_id -user_id 0])}] set attachments_enabled_p [forum::attachments_enabled_p] Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl,v diff -u -r1.21.2.1 -r1.21.2.2 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 12 Sep 2015 19:00:44 -0000 1.21.2.1 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 20 Oct 2015 08:19:14 -0000 1.21.2.2 @@ -117,8 +117,7 @@ subscription with subscr_id or impl_name + summary_context_id provided. If the assert flag is set, create the directory. } { - if {!([info exists summary_context_id] && \ - [info exists impl_name])} { + if {!([info exists summary_context_id] && [info exists impl_name]) } { if {![info exists subscr_id]} { error "rss_gen_report_dir needs either subscr_id or impl_id+summary_context_id" } else { @@ -147,8 +146,7 @@ it doesn't exist @return a Unix file path. } { - if {!([info exists summary_context_id] && \ - [info exists impl_name])} { + if {!([info exists summary_context_id] && [info exists impl_name])} { if {![info exists subscr_id]} { error "rss_gen_report_file needs either subscr_id or impl_id+summary_context_id" } else {