fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-10-11 01:08 pm

[dw-free] clean up log messages that appear when global warnings are on

[commit: http://hg.dwscoalition.org/dw-free/rev/11ca108e2963]

http://bugs.dwscoalition.org/show_bug.cgi?id=3040

Abstract away the last call to Apache->request.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r da48f24b7db5 -r 11ca108e2963 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Mon Oct 11 20:52:19 2010 +0800
+++ b/cgi-bin/LJ/User.pm	Mon Oct 11 21:08:07 2010 +0800
@@ -5568,8 +5568,8 @@ sub get_daycounts {
 
     if ( LJ::isu( $remote ) ) {
         # do they have the viewall priv?
-        my $r = eval { Apache->request; }; # web context
-        my %getargs = $r ? $r->args : undef;
+        my $r = DW::Request->get;
+        my %getargs = %{ $r->get_args };
         if ( defined $getargs{'viewall'} and $getargs{'viewall'} eq '1' ) {
             $viewall = $remote->has_priv( 'canview', '*' );
             LJ::statushistory_add( $u->userid, $remote->userid,
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org