From 46249ac00800c0f9c4e9a1c6a21bb67f72d62ef1 Mon Sep 17 00:00:00 2001 From: Jamie McCarthy Date: Tue, 16 Mar 2004 17:54:25 +0000 Subject: [PATCH] Some slashstyle whitespace changes; two security fixes for stuff introduced just a few minutes ago :) --- Slash/Utility/Environment/Environment.pm | 1 + themes/slashcode/htdocs/comments.pl | 5 +++-- themes/slashcode/htdocs/users.pl | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Slash/Utility/Environment/Environment.pm b/Slash/Utility/Environment/Environment.pm index 8b0d15a69..ed8899a5d 100755 --- a/Slash/Utility/Environment/Environment.pm +++ b/Slash/Utility/Environment/Environment.pm @@ -1491,6 +1491,7 @@ Hashref of cleaned-up data. nosubscriberbonus_present ordernum pid postanon_present posttype ratio retrieve + show_m1s show_m2s seclev start startat threshold thresh_count thresh_secs thresh_hps uid uthreshold voters width diff --git a/themes/slashcode/htdocs/comments.pl b/themes/slashcode/htdocs/comments.pl index b7bbf4196..d165df833 100755 --- a/themes/slashcode/htdocs/comments.pl +++ b/themes/slashcode/htdocs/comments.pl @@ -372,8 +372,9 @@ sub displayComments { }); } - if(defined $form->{show_m2s} and $user->{is_admin}){ - $slashdb->setUser($user->{uid}, { m2_with_comm_mod => $form->{show_m2s}} ); + if (defined($form->{show_m2s}) && $user->{is_admin}) { + $slashdb->setUser($user->{uid}, + { m2_with_comm_mod => $form->{show_m2s} }); } if ($form->{cid}) { diff --git a/themes/slashcode/htdocs/users.pl b/themes/slashcode/htdocs/users.pl index b80a76b32..5f8d54316 100755 --- a/themes/slashcode/htdocs/users.pl +++ b/themes/slashcode/htdocs/users.pl @@ -815,7 +815,9 @@ sub showInfo { my($points, $nickmatch_flag, $uid, $nick); my($mod_flag, $karma_flag, $n) = (0, 0, 0); - if($admin_flag and defined $form->{show_m2s} or defined $form->{show_m1s}){ + if ($admin_flag + && (defined($form->{show_m2s}) || defined($form->{show_m1s})) + ) { my $update_hr = {}; $update_hr->{m2_with_mod} = $form->{show_m2s} if defined $form->{show_m2s}; $update_hr->{mod_with_comm} = $form->{show_m1s} if defined $form->{show_m1s};