Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r20210: LJSUP-9804: Problem with writing propert...

Committer: amyshkin
LJSUP-9804: Problem with writing properties data for entries on Omega/Alpha/Beta servers
U   trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2011-10-04 05:29:53 UTC (rev 20209)
+++ trunk/cgi-bin/LJ/Entry.pm	2011-10-04 05:48:25 UTC (rev 20210)
@@ -1691,7 +1691,7 @@
             while (my ($jid, $jitemid, $propid, $value) = $sth->fetchrow_array) {
                 my $id = "$jid:$jitemid";
 #                my $propname = $LJ::CACHE_PROPID{'log'}->{$propid}->{name};
-                $ret->{prop}->{$id}->{$propid} = $value;
+                $ret->{'prop'}->{$id}->{$propid} = $value;
                 $gotid{$id} = 1;
             }
 
@@ -2329,9 +2329,14 @@
     my %new_href;
 
     for my $key ( keys %$href ) {
-        my $prop = delete $href->{$key};
-        next unless exists $LJ::CACHE_PROPID{'log'}->{$key};
-        $new_href{ $LJ::CACHE_PROPID{'log'}->{$key}->{'name'} } = $prop;
+        my $prop = $href->{$key};
+
+        if ( $key eq 'replycount' ) {
+            $new_href{ 'replycount' } = $prop;
+        }
+        elsif ( exists $LJ::CACHE_PROPID{'log'}->{$key} ) {
+            $new_href{ $LJ::CACHE_PROPID{'log'}->{$key}->{'name'} } = $prop;
+        }
     }
 
     %$href = %new_href;

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