Abstract away the last call to Apache->request.

        Patch by kareila. 

diffs (14 lines):

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,
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to