madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22217: LJSUP-12534: not working Collapse repost...

Committer: sbelyaev
LJSUP-12534: not working Collapse reposts
U   trunk/cgi-bin/LJ/S2/FriendsPage.pm
U   trunk/cgi-bin/ljviews.pl
Modified: trunk/cgi-bin/LJ/S2/FriendsPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/FriendsPage.pm	2012-06-09 07:48:19 UTC (rev 22216)
+++ trunk/cgi-bin/LJ/S2/FriendsPage.pm	2012-06-09 08:36:51 UTC (rev 22217)
@@ -287,10 +287,24 @@
 
             $posters{$posterid} = $poster;
             $friends{$friendid} = $friend;
-            $datakey   = "$friendid $itemid";
+            $datakey  = "repost $friendid $itemid";    
+
+            if (!$logprops{$datakey}) {
+                $logprops{$datakey} = $entry_obj->props;
+ 
+                # mark as repost
+                $logprops{$datakey}->{'repost'}         = 'e';
+                $logprops{$datakey}->{'repost_author'}  = $entry_obj->poster->user; 
+                $logprops{$datakey}->{'repost_subject'} = $entry_obj->subject_html;
+                $logprops{$datakey}->{'repost_url'}     = $entry_obj->url;
+            }
         }
 
-        if ( $remote && $logprops{$datakey}->{'repost'} && $remote->prop('hidefriendsreposts') && ! $remote->prop('opt_ljcut_disable_friends') ) {
+        if ( $remote && 
+             $logprops{$datakey}->{'repost'} && 
+             $remote->prop('hidefriendsreposts') && 
+             ! $remote->prop('opt_ljcut_disable_friends') ) 
+        {
             $text = LJ::Lang::ml(
                 'friendsposts.reposted',
                 {

Modified: trunk/cgi-bin/ljviews.pl
===================================================================
--- trunk/cgi-bin/ljviews.pl	2012-06-09 07:48:19 UTC (rev 22216)
+++ trunk/cgi-bin/ljviews.pl	2012-06-09 08:36:51 UTC (rev 22217)
@@ -1899,6 +1899,18 @@
             $logprops{$itemid} = $entry_obj->props;
             $friends{$friendid} = $journalu;
             $pu = $entry_obj->poster;
+
+            $datakey = "$friendid $itemid";
+
+            if (!$logprops{$datakey}) {
+                $logprops{$datakey} = $entry_obj->props;
+
+                # mark as repost
+                $logprops{$datakey}->{'repost'}         = 'e';
+                $logprops{$datakey}->{'repost_author'}  = $entry_obj->poster->user;
+                $logprops{$datakey}->{'repost_subject'} = $entry_obj->subject_html;
+                $logprops{$datakey}->{'repost_url'}     = $entry_obj->url;
+            }
         }
 
         if ( $logprops{$datakey}->{'repost'} && $remote && $remote->prop('hidefriendsreposts') && ! $remote->prop('opt_ljcut_disable_friends') ) {

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