changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[ljcom] r6972: LJSUP-3069: Find you Friends page - bugf...

Committer: ssafronova
LJSUP-3069: Find you Friends page - bugfix

U   trunk/cgi-bin/LJ/Widget/FindFriendsResultsInvite.pm
Modified: trunk/cgi-bin/LJ/Widget/FindFriendsResultsInvite.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/FindFriendsResultsInvite.pm	2009-01-11 04:08:28 UTC (rev 6971)
+++ trunk/cgi-bin/LJ/Widget/FindFriendsResultsInvite.pm	2009-01-11 10:28:00 UTC (rev 6972)
@@ -41,18 +41,19 @@
 
     foreach my $frid (keys %$post) {
         next unless $frid =~ /email(\d+)/;
-        next if $1 > @$emails;
-        my $email = $emails->[$1 - 1]->[1];
+        my $index = $1;
+        next if $index > @$emails;
+        my $email = $emails->[$index - 1]->[1];
 
         if ($email) { # first time we check contents of abook contact
             my @errs;
             LJ::check_email($email, \@errs);
             if (@errs) {
-                push @errors, join('', @errs);
+                push @errors, [$email, join('', @errs)];
                 next;
             }
         } else {
-            push @errors, $class->ml('widget.findfriendsresultsinvite.empty.email');
+            push @errors, [$emails->[$index - 1]->[0], $class->ml('widget.findfriendsresultsinvite.empty.email')];
             next;
         }
 
@@ -102,7 +103,7 @@
             });
 
         } else { # over rate limit
-            push @errors, $class->ml('widget.findfriendsresultsinvite.over.rate');
+            push @errors, [$email, $class->ml('widget.findfriendsresultsinvite.over.rate')];
             last; # no more addresses are possible
         }
 

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments