[dw-free] Fix minor inconsistencies in status_history
[commit: http://hg.dwscoalition.org/dw-free/rev/a3ea1c10f5fa]
http://bugs.dwscoalition.org/show_bug.cgi?id=167
Fix up some statushistory logging to be more useful/correct.
Patch by
janinedog.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=167
Fix up some statushistory logging to be more useful/correct.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/MassPrivacy.pm
- cgi-bin/LJ/User.pm
- htdocs/changeemail.bml
-------------------------------------------------------------------------------- diff -r ddc27e4eb1e3 -r a3ea1c10f5fa cgi-bin/LJ/MassPrivacy.pm --- a/cgi-bin/LJ/MassPrivacy.pm Fri Mar 20 06:18:47 2009 +0000 +++ b/cgi-bin/LJ/MassPrivacy.pm Sat Mar 21 22:57:14 2009 +0000 @@ -112,15 +112,12 @@ sub handle { # better logging - # Used when logging to statushistory - my $sys_u = LJ::load_user('system'); # only print 200 characters of error message to log # allow some space at the end for error location message if (@errs) { my $errmsg = join(', ', @errs); $errmsg = substr($errmsg, 0, 200) . "... "; - LJ::statushistory_add($u->{'userid'}, $sys_u, - "mass_privacy", "Error: $errmsg"); + LJ::statushistory_add( $u, $u, "mass_privacy", "Error: $errmsg" ); die $errmsg; } @@ -146,11 +143,10 @@ sub handle { 'body' => $msg, }); - LJ::statushistory_add($u->{'userid'}, $sys_u, - "mass_privacy", "Success: $okay_ct " . - $privacy{$opts->{s_security}} . " entries " . - $timeframe . "have now " . "been changed to be " . - $privacy{$opts->{e_security}}); + LJ::statushistory_add( $u, $u, "mass_privacy", "Success: $okay_ct " . + $privacy{$opts->{s_security}} . " entries " . + $timeframe . "have now " . "been changed to be " . + $privacy{$opts->{e_security}} ); return 1; } diff -r ddc27e4eb1e3 -r a3ea1c10f5fa cgi-bin/LJ/User.pm --- a/cgi-bin/LJ/User.pm Fri Mar 20 06:18:47 2009 +0000 +++ b/cgi-bin/LJ/User.pm Sat Mar 21 22:57:14 2009 +0000 @@ -289,7 +289,7 @@ sub create_syndicated { die $dbh->errstr if $dbh->err; my $remote = LJ::get_remote(); - LJ::statushistory_add($remote, $u, "synd_create", "acct: " . $u->user); + LJ::statushistory_add( $u, $remote, "synd_create", "acct: " . $u->user ); return $u; } diff -r ddc27e4eb1e3 -r a3ea1c10f5fa htdocs/changeemail.bml --- a/htdocs/changeemail.bml Fri Mar 20 06:18:47 2009 +0000 +++ b/htdocs/changeemail.bml Sat Mar 21 22:57:14 2009 +0000 @@ -123,7 +123,7 @@ body<= $loginfo .= ", blocked: " . $blocked; $loginfo .= ", success: " . ((scalar @errors) ? 'false' : 'true'); - LJ::statushistory_add($u->{userid}, $u->{userid}, 'email_changed', $loginfo); + LJ::statushistory_add( $u, $remote, 'email_changed', $loginfo ); LJ::infohistory_add($u, 'email', $old_email, $u->{status}); --------------------------------------------------------------------------------