afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-08-29 02:42 pm

[dw-free] Remove journal link from notification for being circled by openid users

[commit: http://hg.dwscoalition.org/dw-free/rev/c5c762ecee25]

http://bugs.dwscoalition.org/show_bug.cgi?id=671

No journal; no link.

Patch by [personal profile] wyntarvox.

Files modified:
  • cgi-bin/LJ/Event/AddedToCircle.pm
--------------------------------------------------------------------------------
diff -r ee87f2e81269 -r c5c762ecee25 cgi-bin/LJ/Event/AddedToCircle.pm
--- a/cgi-bin/LJ/Event/AddedToCircle.pm	Sat Aug 29 13:32:06 2009 +0000
+++ b/cgi-bin/LJ/Event/AddedToCircle.pm	Sat Aug 29 14:41:29 2009 +0000
@@ -84,27 +84,51 @@ sub _as_email {
     };
 
     if ( $self->trusted ) {
-        return LJ::Lang::get_text( $lang, 'esn.addedtocircle.trusted.email_text', undef, $vars ) .
-            $self->format_options( $is_html, $lang, $vars,
-            {
-                'esn.add_trust'       => [ $u->trusts( $self->fromuser ) ? 0 : 1, "$LJ::SITEROOT/manage/circle/add?user=$postername&action=access" ],
-                'esn.read_journal'    => [ 2, $journal_url ],
-                'esn.view_profile'    => [ 3, $journal_profile ],
-                'esn.edit_friends'    => [ 4, "$LJ::SITEROOT/manage/circle/edit" ],
-                'esn.edit_groups'     => [ 5, "$LJ::SITEROOT/manage/circle/editfilters" ],
-            }
-        );
+        if ( $self->fromuser->is_identity ) {
+            return LJ::Lang::get_text( $lang, 'esn.addedtocircle.trusted.email_text', undef, $vars ) .
+                $self->format_options( $is_html, $lang, $vars,
+                {
+                    'esn.add_trust'       => [ $u->trusts( $self->fromuser ) ? 0 : 1, "$LJ::SITEROOT/manage/circle/add?user=$postername&action=access" ],
+                    'esn.view_profile'    => [ 2, $journal_profile ],
+                    'esn.edit_friends'    => [ 3, "$LJ::SITEROOT/manage/circle/edit" ],
+                    'esn.edit_groups'     => [ 4, "$LJ::SITEROOT/manage/circle/editfilters" ],
+                }
+            );
+        } else {
+            return LJ::Lang::get_text( $lang, 'esn.addedtocircle.trusted.email_text', undef, $vars ) .
+                $self->format_options( $is_html, $lang, $vars,
+                {
+                    'esn.add_trust'       => [ $u->trusts( $self->fromuser ) ? 0 : 1, "$LJ::SITEROOT/manage/circle/add?user=$postername&action=access" ],
+                    'esn.read_journal'    => [ 2, $journal_url ],
+                    'esn.view_profile'    => [ 3, $journal_profile ],
+                    'esn.edit_friends'    => [ 4, "$LJ::SITEROOT/manage/circle/edit" ],
+                    'esn.edit_groups'     => [ 5, "$LJ::SITEROOT/manage/circle/editfilters" ],
+                }
+            );
+        }
     } else { # watched
-        return LJ::Lang::get_text( $lang, 'esn.addedtocircle.watched.email_text', undef, $vars ) .
-            $self->format_options( $is_html, $lang, $vars,
-            {
-                'esn.add_watch'       => [ $u->watches( $self->fromuser ) ? 0 : 1, "$LJ::SITEROOT/manage/circle/add?user=$postername&action=subscribe" ],
-                'esn.read_journal'    => [ 2, $journal_url ],
-                'esn.view_profile'    => [ 3, $journal_profile ],
-                'esn.edit_friends'    => [ 4, "$LJ::SITEROOT/manage/circle/edit" ],
-                'esn.edit_groups'     => [ 5, "$LJ::SITEROOT/manage/circle/editfilters" ],
-            }
-        );
+        if ( $self->fromuser->is_identity ) {
+            return LJ::Lang::get_text( $lang, 'esn.addedtocircle.watched.email_text', undef, $vars ) .
+                $self->format_options( $is_html, $lang, $vars,
+                {
+                    'esn.add_watch'       => [ $u->watches( $self->fromuser ) ? 0 : 1, "$LJ::SITEROOT/manage/circle/add?user=$postername&action=subscribe" ],
+                    'esn.view_profile'    => [ 2, $journal_profile ],
+                    'esn.edit_friends'    => [ 3, "$LJ::SITEROOT/manage/circle/edit" ],
+                    'esn.edit_groups'     => [ 4, "$LJ::SITEROOT/manage/circle/editfilters" ],
+                }
+            );
+        } else {
+            return LJ::Lang::get_text( $lang, 'esn.addedtocircle.watched.email_text', undef, $vars ) .
+                $self->format_options( $is_html, $lang, $vars,
+                {
+                    'esn.add_watch'       => [ $u->watches( $self->fromuser ) ? 0 : 1, "$LJ::SITEROOT/manage/circle/add?user=$postername&action=subscribe" ],
+                    'esn.read_journal'    => [ 2, $journal_url ],
+                    'esn.view_profile'    => [ 3, $journal_profile ],
+                    'esn.edit_friends'    => [ 4, "$LJ::SITEROOT/manage/circle/edit" ],
+                    'esn.edit_groups'     => [ 5, "$LJ::SITEROOT/manage/circle/editfilters" ],
+                }
+            );
+        }
     }
 }
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org