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

[livejournal] r17875: LJSUP-7507. Minor fix

Committer: gprochaev
LJSUP-7507. Minor fix

U   trunk/cgi-bin/LJ/Browse/Parser.pm
Modified: trunk/cgi-bin/LJ/Browse/Parser.pm
===================================================================
--- trunk/cgi-bin/LJ/Browse/Parser.pm	2010-12-07 13:38:46 UTC (rev 17874)
+++ trunk/cgi-bin/LJ/Browse/Parser.pm	2010-12-08 05:11:02 UTC (rev 17875)
@@ -39,15 +39,16 @@
 
             ## resize and crop first image from post if exist
             if ($tag eq 'img') {
-                my $r = LJ::crop_picture_from_web(
+                my $r = $images_crop_cnt ? LJ::crop_picture_from_web(
                     source      => $attr->{'src'},
                     size        => '200x200',
                     cancel_size => '200x0',
                     username    => $LJ::PHOTOS_FEAT_POSTS_FB_USERNAME,
                     password    => $LJ::PHOTOS_FEAT_POSTS_FB_PASSWORD,
                     galleries   => [ $LJ::PHOTOS_FEAT_POSTS_FB_GALLERY ],
-                );
-                if ($images_crop_cnt-- && $r && ($r->{'status'} ne 'small') && $r->{'url'}) {
+                ) : {};
+                if ($images_crop_cnt && $r && ($r->{'status'} ne 'small') && $r->{'url'}) {
+                    $images_crop_cnt--;
                     push @images, $r->{url};
                     next;
                 } elsif ($r && $r->{'status'} ne 'small') {

Tags: livejournal, pm, 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