[dw-free] Fix up WTF-related ESN events
[commit: http://hg.dwscoalition.org/dw-free/rev/083a0e1d9dc2]
http://bugs.dwscoalition.org/show_bug.cgi?id=317
Birthday and NewUserpic event updates for WTF.
Patch by
janinedog.
http://bugs.dwscoalition.org/show_bug.cgi?id=317
Birthday and NewUserpic event updates for WTF.
Patch by
--------------------------------------------------------------------------------
diff -r cd84ab154e34 -r 083a0e1d9dc2 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Fri Feb 20 10:14:21 2009 +0000
+++ b/bin/upgrading/en.dat Fri Feb 20 10:16:49 2009 +0000
@@ -1248,14 +1248,13 @@ esn.view_poll_status=[[openlink]]View th
esn.discuss_poll=[[openlink]]Discuss the poll[[closelink]]
-esn.add_friend_community=[[openlink]]Add community "[[community]]" to your friends page reading list[[closelink]]
+esn.add_friend_community=[[openlink]]Add community "[[community]]" to your reading page[[closelink]]
esn.comm_join_approve.email_text<<
Dear [[user]],
Your request to join the "[[community]]" community has been approved.
-If you wish to add this community to your friends page reading list,
-click the link below.
+If you wish to add this community to your reading page, click the link below.
[[options]]
Please note that replies to this email are not sent to the community's maintainer(s). If you
@@ -1851,7 +1850,7 @@ event.befriended.me=Someone adds me as a
event.befriended.user=Someone adds [[user]] as a friend
-event.birthday.me=One of my friends has an upcoming birthday
+event.birthday.me=One of the people on my access or subscription lists has an upcoming birthday
event.birthday.user=[[user]]'s birthday is coming up
@@ -1955,7 +1954,7 @@ event.journal_new_entry.community=Someon
event.journal_new_entry.user=[[user]] posts a new entry.
-event.userpic_upload.me=One of my friends uploads a new userpic
+event.userpic_upload.me=One of the accounts I subscribe to uploads a new userpic
event.userpic_upload.user=[[user]] uploads a new userpic
diff -r cd84ab154e34 -r 083a0e1d9dc2 cgi-bin/LJ/Event.pm
--- a/cgi-bin/LJ/Event.pm Fri Feb 20 10:14:21 2009 +0000
+++ b/cgi-bin/LJ/Event.pm Fri Feb 20 10:16:49 2009 +0000
@@ -277,11 +277,15 @@ sub subscriptions {
my $allmatch = 0;
my $zeromeans = $self->zero_journalid_subs_means;
- my @wildcards_from;
- if ($zeromeans eq 'friends') {
- # find friendofs, add to @wildcards_from
+ my @wildcards_from; # used to hold the trusted and/or watched by lists for $self->u
+ if ( $zeromeans eq 'trusted' ) {
+ @wildcards_from = $self->u->trusted_by_userids;
+ } elsif ( $zeromeans eq 'watched' ) {
@wildcards_from = $self->u->watched_by_userids;
- } elsif ($zeromeans eq 'all') {
+ } elsif ( $zeromeans eq 'trusted_or_watched' ) {
+ my %unique_ids = map { $_ => 1 } ( $self->u->trusted_by_userids, $self->u->watched_by_userids );
+ @wildcards_from = keys %unique_ids;
+ } elsif ( $zeromeans eq 'all' ) {
$allmatch = 1;
}
diff -r cd84ab154e34 -r 083a0e1d9dc2 cgi-bin/LJ/Event/Birthday.pm
--- a/cgi-bin/LJ/Event/Birthday.pm Fri Feb 20 10:14:21 2009 +0000
+++ b/cgi-bin/LJ/Event/Birthday.pm Fri Feb 20 10:16:49 2009 +0000
@@ -135,13 +135,13 @@ sub as_email_html {
return _as_email($self, 1, $u);
}
-sub zero_journalid_subs_means { "friends" }
+sub zero_journalid_subs_means { "trusted_or_watched" }
sub subscription_as_html {
my ($class, $subscr) = @_;
my $journal = $subscr->journal;
- return BML::ml('event.birthday.me') # "One of my friends has an upcoming birthday"
+ return BML::ml('event.birthday.me') # "One of the people on my access or subscription lists has an upcoming birthday"
unless $journal;
my $ljuser = $journal->ljuser_display;
diff -r cd84ab154e34 -r 083a0e1d9dc2 cgi-bin/LJ/Event/NewUserpic.pm
--- a/cgi-bin/LJ/Event/NewUserpic.pm Fri Feb 20 10:14:21 2009 +0000
+++ b/cgi-bin/LJ/Event/NewUserpic.pm Fri Feb 20 10:16:49 2009 +0000
@@ -114,13 +114,13 @@ sub as_email_subject {
return sprintf "%s uploaded a new userpic!", $self->event_journal->display_username;
}
-sub zero_journalid_subs_means { "friends" }
+sub zero_journalid_subs_means { "watched" }
sub subscription_as_html {
my ($class, $subscr) = @_;
my $journal = $subscr->journal;
- # "One of my friends uploads a new userpic"
+ # "One of the accounts I subscribe to uploads a new userpic"
# or "$ljuser uploads a new userpic";
return $journal ?
BML::ml('event.userpic_upload.user',
--------------------------------------------------------------------------------
