Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[livejournal] r23209: LJSUP-14095: Send a Gift link

Committer: esavintcev
LJSUP-14095: Send a Gift link
U   trunk/bin/upgrading/en.dat
U   trunk/cgi-bin/LJ/Event/Birthday.pm
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2012-10-29 12:20:31 UTC (rev 23208)
+++ trunk/bin/upgrading/en.dat	2012-10-29 12:30:03 UTC (rev 23209)
@@ -5356,6 +5356,8 @@
 s2theme.themename.notheme|staleness=1
 s2theme.themename.notheme=(Layout Default)
 
+send.a.gift=Send a Gift
+
 setting.adultcontent.error.invalid|staleness=1
 setting.adultcontent.error.invalid=Invalid adult content setting.
 

Modified: trunk/cgi-bin/LJ/Event/Birthday.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/Birthday.pm	2012-10-29 12:20:31 UTC (rev 23208)
+++ trunk/cgi-bin/LJ/Event/Birthday.pm	2012-10-29 12:30:03 UTC (rev 23209)
@@ -99,10 +99,15 @@
 
 sub as_html_actions {
     my ($self) = @_;
+    my $u    = shift;
 
+    my $lang = ($u && $u->prop('browselang')) || $LJ::DEFAULT_LANG;
+    my $lang_var = 'send.a.gift';
+    my $giftlink = LJ::Lang::get_text($lang,$lang_var);
+
     my $gifturl = $self->bdayuser->gift_url({ item => 'vgift' });
     my $ret .= "<div class='actions'>";
-    $ret .= " <a href='$gifturl'>Send a Gift</a>";
+    $ret .= " <a href='$gifturl'>$giftlink</a>";
     unless ($LJ::DISABLED{wishlist_v2}) {
     if (LJ::WishList->have_current($self->bdayuser)) {
         $ret .= " View user's <a href='".$self->bdayuser->wishlist_url."'>Wishlist</a>";

Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-10-29 12:20:31 UTC (rev 23208)
+++ trunk/cgi-bin/LJ/User.pm	2012-10-29 12:30:03 UTC (rev 23209)
@@ -2130,7 +2130,7 @@
     croak "invalid user object passed" unless LJ::isu($u);
     my $item = $opts->{item} ? delete $opts->{item} : '';
 
-    return "$LJ::SITEROOT/shop/view.bml?item=$item&gift=1&for=$u->{'user'}";
+    return "$LJ::SITEROOT/shop/vgift.bml?to=$u->{'user'}";
 }
 
 # return the URL to the send message page

Tags: dat, esavintcev, livejournal, pm, savintsev_egor
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