[livejournal] r17334: LJSUP-6762
Committer: gprochaev
[LJSUP-6762] If from email to join the community click the "Reject" there open the page with an errorU trunk/cgi-bin/Apache/LiveJournal.pm U trunk/cgi-bin/LJ/Event/CommunityJoinRequest.pm U trunk/htdocs/reject.bml
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm 2010-09-10 04:30:26 UTC (rev 17333)
+++ trunk/cgi-bin/Apache/LiveJournal.pm 2010-09-10 05:28:12 UTC (rev 17334)
@@ -1061,7 +1061,7 @@
}
# reject
- if ($uri =~ m!^/reject/(\w+\.\w+)!) {
+ if ($uri =~ m!^/reject/(\w+\.\w+\.\d+)!) {
return redir("$LJ::SITEROOT/reject.bml?$1");
}
Modified: trunk/cgi-bin/LJ/Event/CommunityJoinRequest.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/CommunityJoinRequest.pm 2010-09-10 04:30:26 UTC (rev 17333)
+++ trunk/cgi-bin/LJ/Event/CommunityJoinRequest.pm 2010-09-10 05:28:12 UTC (rev 17334)
@@ -100,7 +100,7 @@
my $communityname = $self->comm->user;
my $community = $is_html ? ($self->comm->ljuser_display) : ($self->comm->display_username);
my $auth_url = $self->authurl;
- my $rej_url = $auth_url;
+ my $rej_url = $auth_url.".".$u->userid;
$rej_url =~ s/approve/reject/;
my $lang = $u->prop('browselang');
Modified: trunk/htdocs/reject.bml
===================================================================
--- trunk/htdocs/reject.bml 2010-09-10 04:30:26 UTC (rev 17333)
+++ trunk/htdocs/reject.bml 2010-09-10 05:28:12 UTC (rev 17334)
@@ -10,9 +10,9 @@
my $qs = BML::get_query_string();
return LJ::bad_input($ML{'.error.invalidargument'})
- unless $qs && $qs =~ /^(\d+)\.(.+)$/;
+ unless $qs && $qs =~ /^(\d+)\.(.+)\.(\d+)$/;
- my ($aaid, $auth) = ($1, $2);
+ my ($aaid, $auth, $mnt) = ($1, $2, $3);
my $aa = LJ::is_valid_authaction($aaid, $auth);
return LJ::bad_input($ML{'.error.invalidargument'})
unless $aa;
@@ -33,7 +33,7 @@
return LJ::bad_input($ML{'.error.internerr.invalidaction'}) unless $targetid;
return "<?h1 $ML{'Error'} h1?><?p $ML{'.error.rejecting'} p?>"
- unless LJ::reject_pending_member($aa->{userid}, $targetid);
+ unless LJ::reject_pending_member($aa->{userid}, $targetid, $mnt);
# return success
my $commname = LJ::get_username($aa->{userid});
