[dw-free] remove LJ::did_post from DW::Controller subclasses
[commit: http://hg.dwscoalition.org/dw-free/rev/2d35bfea266d]
http://bugs.dwscoalition.org/show_bug.cgi?id=3969
Remove LJ::did_post form DW::Controller subclasses.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3969
Remove LJ::did_post form DW::Controller subclasses.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/Controller/InviteCodes.pm
- cgi-bin/DW/Controller/Rename.pm
- cgi-bin/DW/Controller/Search/Interests.pm
- cgi-bin/DW/Controller/Shop.pm
-------------------------------------------------------------------------------- diff -r 993ddcd9fc22 -r 2d35bfea266d cgi-bin/DW/Controller/InviteCodes.pm --- a/cgi-bin/DW/Controller/InviteCodes.pm Tue Oct 18 18:09:56 2011 +0800 +++ b/cgi-bin/DW/Controller/InviteCodes.pm Tue Oct 18 18:19:19 2011 +0800 @@ -36,7 +36,7 @@ my $remote = $rv->{remote}; # check whether we requested more invite codes - if ( LJ::did_post() ) { + if ( $r->did_post ) { my $args = $r->post_args; return error_ml( 'error.invalidform' ) unless LJ::check_form_auth( $args->{lj_form_auth} ); diff -r 993ddcd9fc22 -r 2d35bfea266d cgi-bin/DW/Controller/Rename.pm --- a/cgi-bin/DW/Controller/Rename.pm Tue Oct 18 18:09:56 2011 +0800 +++ b/cgi-bin/DW/Controller/Rename.pm Tue Oct 18 18:19:19 2011 +0800 @@ -317,7 +317,7 @@ token => $token, }; - if ( LJ::did_post() ) { + if ( $r->did_post ) { my ( $post_ok, $rv ) = handle_admin_post( $token, $post_args, journal => $u, from_user => $token->fromuser, diff -r 993ddcd9fc22 -r 2d35bfea266d cgi-bin/DW/Controller/Search/Interests.pm --- a/cgi-bin/DW/Controller/Search/Interests.pm Tue Oct 18 18:09:56 2011 +0800 +++ b/cgi-bin/DW/Controller/Search/Interests.pm Tue Oct 18 18:19:19 2011 +0800 @@ -28,7 +28,7 @@ sub interest_handler { my $r = DW::Request->get; - my $did_post = LJ::did_post(); + my $did_post = $r->did_post; my $args = $did_post ? $r->post_args : $r->get_args; return error_ml( 'bml.badinput.body' ) unless LJ::text_in( $args ); return error_ml( 'error.invalidform' ) diff -r 993ddcd9fc22 -r 2d35bfea266d cgi-bin/DW/Controller/Shop.pm --- a/cgi-bin/DW/Controller/Shop.pm Tue Oct 18 18:09:56 2011 +0800 +++ b/cgi-bin/DW/Controller/Shop.pm Tue Oct 18 18:19:19 2011 +0800 @@ -86,7 +86,7 @@ $rv->{has_points} = $remote->shop_points; my $r = DW::Request->get; - if ( LJ::did_post() ) { + if ( $r->did_post ) { my $args = $r->post_args; die "invalid auth\n" unless LJ::check_form_auth( $args->{lj_form_auth} ); @@ -191,7 +191,7 @@ $rv->{errs} = \%errs; my $r = DW::Request->get; - if ( LJ::did_post() ) { + if ( $r->did_post ) { my $args = $r->post_args; die "invalid auth\n" unless LJ::check_form_auth( $args->{lj_form_auth} ); --------------------------------------------------------------------------------