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

[livejournal] r20018: LJSUP-8061: Add ability to hide reposted...

Committer: amyshkin
LJSUP-8061: Add ability to hide reposted entries in the friends page.
U   trunk/htdocs/update.bml
Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-09-12 07:35:35 UTC (rev 20017)
+++ trunk/htdocs/update.bml	2011-09-12 07:37:05 UTC (rev 20018)
@@ -189,14 +189,16 @@
                 $event = $entry->event_raw;
                 LJ::EmbedModule->add_user_to_embed($entry->poster->username, \$event);
 
-                $event = LJ::Lang::ml("repost.wrapper", {
-                                            username => $entry->poster->username,
-                                            url      => $entry->url,
-                                            subject  => $subject,
-                                            text     => $event,
-                                            });
+                $event = LJ::Lang::ml(
+                    "repost.wrapper",
+                    {
+                        username => $entry->poster->username,
+                        url      => $entry->url,
+                        subject  => $subject,
+                        text     => $event,
+                });
                 $reposted_from = $entry->url;
-                $repost_hidden = LJ::repost_auth($POST{'repost_type'} || $GET{'repost_type'} || 'd', $entry->poster->username, $entry->url);
+                $repost_hidden = LJ::repost_auth($POST{'repost_type'} || $GET{'repost_type'} || 'd', $entry->poster->username, $entry->url, $subject);
             }
         }
     }
@@ -511,13 +513,16 @@
         $req{prop_interface} = "web";
 
         if ( $POST{'repost_params'} ) {
-            my ( $type, $username, $url, $auth ) = split(/:/, $POST{'repost_params'} );
+            my ( $type, $username, $url, $subject, $auth ) = split(/:/, $POST{'repost_params'} );
 
-            $req{'prop_repost_url'}    = LJ::durl($url);
-            $req{'prop_repost_author'} = LJ::durl($username);
-            $req{'prop_repost'}        = $auth eq LJ::repost_auth($type, $username, $url, 1)
+            $req{'prop_repost_url'}     = LJ::durl($url);
+            $req{'prop_repost_author'}  = LJ::durl($username);
+            $req{'prop_repost_subject'} = LJ::durl($subject);
+
+            my $new_auth = LJ::repost_auth($type, $req{'prop_repost_author'}, $req{'prop_repost_url'}, $subject, 1);
+            $req{'prop_repost'}        = $auth eq $new_auth
                 ? $type
-                : '0';
+                : 'N';
         }
 
         foreach my $k (keys %req) {

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