madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22539: LJSUP-12836: Create additional notificat...

Committer: sbelyaev
LJSUP-12836: Create additional notification on day of birthday
U   trunk/bin/upgrading/en.dat
U   trunk/bin/worker/birthday-notify
U   trunk/cgi-bin/LJ/Event/Birthday.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2012-07-31 20:39:54 UTC (rev 22538)
+++ trunk/bin/upgrading/en.dat	2012-08-01 11:37:02 UTC (rev 22539)
@@ -1744,6 +1744,9 @@
 esn.bday.alert|staleness=1
 esn.bday.alert=[[who]]'s birthday is on [[bdate]]!
 
+esn.bday.alert_today|staleness=1
+esn.bday.alert_today==Today is [[who]]'s birthday!
+
 esn.bday.email|staleness=1
 esn.bday.email<<
 Hi [[user]],
@@ -1766,7 +1769,7 @@
 esn.bday.subject=[[bdayuser]]'s birthday is coming up!
 
 esn.bday.subject_today|staleness=1
-esn.bday.subject_today=[[bdayuser]]'s birthday is today!
+esn.bday.subject_today=Today is [[bdayuser]]'s birthday!
 
 esn.befriended.alert|staleness=1
 esn.befriended.alert=[[who]] has added you as a friend.
@@ -2641,7 +2644,7 @@
 html.notify.bday=[[who]]'s birthday is on [[bdate]]!
 
 html.notify.bday_today|staleness=1
-html.notify.bday_today=[[who]]'s birthday is today!
+html.notify.bday_today=Today is [[who]]'s birthday!
 
 event.befriended.me|staleness=1
 event.befriended.me=Someone adds me as a friend
@@ -3857,8 +3860,9 @@
 notification.sms.befriended=User '[[friend]]' has added you to their friends list. [[mobile_url]]
 
 notification.sms.birthday=[[user]]'s birthday is on [[bday]]! [[mobile_url]]
-notification.sms.birthday=[[user]]'s birthday is today! [[mobile_url]]
 
+notification.sms.birthday_today=Today is [[user]]'s birthday! [[mobile_url]]
+
 notification.sms.communityinvite|staleness=1
 notification.sms.communityinvite=[[inviter]] sent you an invitation to join the community [[comm]]. Visit the invitation page to accept
 

Modified: trunk/bin/worker/birthday-notify
===================================================================
--- trunk/bin/worker/birthday-notify	2012-07-31 20:39:54 UTC (rev 22538)
+++ trunk/bin/worker/birthday-notify	2012-08-01 11:37:02 UTC (rev 22539)
@@ -137,6 +137,9 @@
         LJ::Event::Birthday->new($u)->fire;
 
         my $birthday_time = $bdays->{$u->id} - time() - 86400;
+        if ($birthday_time < 86400) {
+            $birthday_time = 1;
+        }
         LJ::Event::Birthday->new($u, $birthday_time)->fire;
         $ct++;
     }

Modified: trunk/cgi-bin/LJ/Event/Birthday.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/Birthday.pm	2012-07-31 20:39:54 UTC (rev 22538)
+++ trunk/cgi-bin/LJ/Event/Birthday.pm	2012-08-01 11:37:02 UTC (rev 22539)
@@ -60,16 +60,11 @@
     my $lang_var =  $self->arg1 ? 'notification.sms.birthday_today' : 
                                   'notification.sms.birthday';
 
-# [[user]]'s birthday is on [[bday]]!
     return LJ::Lang::get_text($lang, $lang_var, undef, {
         user       => $self->bdayuser->display_username(1),
         bday       => $self->bday,
         mobile_url => $tinyurl,
     });
-
-#    return sprintf("%s's birthday is on %s!",
-#                   $self->bdayuser->display_username,
-#                   $self->bday);
 }
 
 sub as_alert {
@@ -268,9 +263,9 @@
     $job->run_after($self->arg1)
         if $self->arg1;
 
-
     my $h = $sclient->insert($job);
     return $h ? 1 : 0;
 }
 
 1;
+

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