wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17402: LJSV-1099

Committer: gprochaev
LJSV-1099

U   trunk/htdocs/community/pending.bml
Modified: trunk/htdocs/community/pending.bml
===================================================================
--- trunk/htdocs/community/pending.bml	2010-09-17 07:23:32 UTC (rev 17401)
+++ trunk/htdocs/community/pending.bml	2010-09-17 07:32:07 UTC (rev 17402)
@@ -79,8 +79,8 @@
                     $ignored++;
                     next;
                 }
-                unless ($us->{$id}->is_validated) {
-                    push @not_validated, $us->{$id}->userid;
+                if ($POST{"approve"} && !$us->{$id}->is_validated) {
+                    push @not_validated, $us->{$id};
                     next;
                 }
                 next unless $POST{"pending_$id"} eq 'on';
@@ -94,6 +94,7 @@
             }
             if ($POST{"approve"}) {
                 $ret .= "<?p " . BML::ml('.success.added', { num => $added }) . " p?>" if $added;
+                $ret .= "<?p " . BML::ml('.success.not_validated', { list => join ",", map { $_->ljuser_display } @not_validated }) . " p?>" if scalar @not_validated;
             } else {
                 $ret .= "<h3>".$ML{'.following_users'}."</h3>";
                 $ret .= '<p class="i-bubble b-bubble-alert b-bubble-noarrow b-bubble-intext">' . $ML{'.you_can_remove'} . '</p>';
@@ -149,13 +150,10 @@
 
             $previous = $POST{'previous'};
             $ignored = $POST{'ignored'};
-            @not_validated = split /,/, $POST{'validated'};
-            my $not_valid_users = LJ::load_userids(@not_validated);
             $ret .= "<?p " . BML::ml('.success.rejected', { num => $rejected }) . " p?>" if $rejected;
             $ret .= "<?p " . BML::ml('.success.ignored', { num => $ignored }) . " p?>" if $ignored;
             $ret .= "<?p " . BML::ml('.success.previous', { num => $previous }) . " p?>" if $previous;
             $ret .= "<?p " . BML::ml('.success.banned', { num => $banned }) . " p?>" if $banned;
-            $ret .= "<?p " . BML::ml('.success.not_validated', { list => join ",", map { $_->ljuser_display } values %$not_valid_users }) . " p?>" if scalar @not_validated;
             $ret .= "<?p " . BML::ml('.success.ban_skipped', { num => $ban_skipped }) . " p?>" if $ban_skipped;
 
         }

Tags: bml, livejournal, wisest-owl
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