changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[ljcom] r7555: LJSUP-4585

Committer: gproschaev
LJSUP-4585


U   branches/shop/bin/maint/expiring.pl
U   branches/shop/bin/maint/pay.pl
U   branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Addon/Sized.pm
U   branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm
U   branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Rename.pm
U   branches/shop/cgi-bin/paylib.pl
U   branches/shop/htdocs/rename/use.bml
Modified: branches/shop/bin/maint/expiring.pl
===================================================================
--- branches/shop/bin/maint/expiring.pl	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/bin/maint/expiring.pl	2009-08-10 03:22:27 UTC (rev 7555)
@@ -206,7 +206,7 @@
         if ($u->{'statusvis'} eq "V") {
             my $bonus_msg;
             if (@$bonus_ref) {
-                my $item = LJ::Pay::Payment::PayItem->new_memonly(item => $_->{'item'}, amt => $_->{'size'});
+                my $item = LJ::Pay::Payment::PayItem->new_memonly(item => $_->{'item'}, subitem => $_->{'size'});
                 $bonus_msg = "Additionally, the following add-ons have been deactivated " .
                              "from your account.  Any remaining time has been saved and will " .
                              "be reapplied if you later decide to renew your paid account.\n\n" .
@@ -299,7 +299,7 @@
 
         # and send them an email, if they're not self-deleted/suspended
         if ($u->{'statusvis'} eq "V") {
-            my $item_obj = LJ::Pay::Payment::PayItem->new_memonly(item => $item, amt => $size);
+            my $item_obj = LJ::Pay::Payment::PayItem->new_memonly(item => $item, subitem => $size);
             my $name = $item_obj->product_name("short");
             my $uri = $get_item_uri->($item);
 
@@ -431,7 +431,7 @@
 
             print "Mailing user $u->{user} about $days days of $item...\n";
 
-            my $item_obj = LJ::Pay::Payment::PayItem->new_memonly(item => $item, amt => $size);
+            my $item_obj = LJ::Pay::Payment::PayItem->new_memonly(item => $item, subitem => $size);
             my $bonus_name = $item_obj->product_name("short");
             my $uri = $get_item_uri->($item, $u->{journaltype} ne 'P');
 

Modified: branches/shop/bin/maint/pay.pl
===================================================================
--- branches/shop/bin/maint/pay.pl	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/bin/maint/pay.pl	2009-08-10 03:22:27 UTC (rev 7555)
@@ -69,7 +69,7 @@
         }
 
         if ($p->{'forwhat'} eq "rename") {
-            my $token = LJ::Pay::new_rename_token($dbh, $p->{'payid'})
+            my $token = LJ::Pay::Payment::PayItem::Rename::new_rename_token($p->{'payid'})
               or next;
 
             LJ::send_mail({

Modified: branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Addon/Sized.pm
===================================================================
--- branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Addon/Sized.pm	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Addon/Sized.pm	2009-08-10 03:22:27 UTC (rev 7555)
@@ -232,7 +232,8 @@
     return 0 unless defined $LJ::Pay::Payment::PayItem::Addon::bonus{$self->{item}}->{items}->{$self->{subitem}}
         and defined $LJ::Pay::Payment::PayItem::Addon::bonus{$self->{item}}->{items}->{$self->{subitem}}->{qty}->{$self->{qty}};
 
-    my $dispname = LJ::Pay::product_name($item, "short");
+    my $item_obj = LJ::Pay::Payment::PayItem->new_memonly(item => $self->{item});
+    my $dispname = $item_obj->product_name("short");
     my $rcptuser = LJ::load_userid($self->{'rcptid'});
     return 0 unless $rcptuser;
 

Modified: branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm
===================================================================
--- branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/PaidAccount.pm	2009-08-10 03:22:27 UTC (rev 7555)
@@ -314,7 +314,7 @@
         $bonus_added = "Additionally, the following previously deactivated bonus features\n" .
                        "have been reactivated so you can use the time remaining on them:\n\n" .
                        join("\n", map {
-                            my $item = LJ::Pay::Payment::PayItem->new_memonly(item => $_->{'item'}, qty => $_->{'size'});
+                            my $item = LJ::Pay::Payment::PayItem->new_memonly(item => $_->{'item'}, subitem => $_->{'size'});
                             "   - " . $item->product_name("short") . ": $_->{'daysleft'} days applied";
                         } sort { $a->{'item'} cmp $b->{'item'} } @$bonus_ref) . "\n\n";
     }

Modified: branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Rename.pm
===================================================================
--- branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Rename.pm	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/cgi-bin/LJ/Pay/Payment/PayItem/Rename.pm	2009-08-10 03:22:27 UTC (rev 7555)
@@ -6,8 +6,6 @@
 
 sub new_rename_token
 {
-    &nodb;
-
     my $payid = shift;
 
     my $dbh = LJ::get_db_writer();
@@ -62,7 +60,7 @@
     my $dbh = LJ::get_db_writer()
         or die "Could not contact global database master";
 
-    ($self->{'token'}, $self->{'tokenid'}) = new_rename_token($dbh, $payment->{'payid'});
+    ($self->{'token'}, $self->{'tokenid'}) = new_rename_token($payment->{'payid'});
 
     return (0, undef, undef) unless $self->{'token'}; # not ok (may not mark item as 'done'), no mail message
 

Modified: branches/shop/cgi-bin/paylib.pl
===================================================================
--- branches/shop/cgi-bin/paylib.pl	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/cgi-bin/paylib.pl	2009-08-10 03:22:27 UTC (rev 7555)
@@ -74,7 +74,6 @@
 sub add_paid_time      { return LJ::Pay::Payment::PayItem::PaidAccount::add_paid_time(@_); }
 sub get_account_exp    { return LJ::Pay::Payment::PayItem::PaidAccount::get_account_exp(@_); }
 sub remove_paid_time   { return LJ::Pay::Payment::PayItem::PaidAccount::remove_paid_time(@_); }
-sub new_rename_token   { return LJ::Pay::Payment::PayItem::Rename::new_rename_token(@_); }
 sub clothing_availability { return LJ::Pay::Payment::PayItem::Clothes::clothing_availability(@_); }
 sub can_apply_sized_bonus { return LJ::Pay::Payment::PayItem::Addon::Sized::can_apply_sized_bonus(@_); }
 sub get_bonus_dim      { return LJ::Pay::Payment::PayItem::Addon::Sized::get_bonus_dim(@_); }

Modified: branches/shop/htdocs/rename/use.bml
===================================================================
--- branches/shop/htdocs/rename/use.bml	2009-08-07 09:31:28 UTC (rev 7554)
+++ branches/shop/htdocs/rename/use.bml	2009-08-10 03:22:27 UTC (rev 7555)
@@ -286,7 +286,7 @@
     # now is time to actually do the real rename.  if there is no $ren row
     # yet and the user is entitled to a free username, we'll generate a code now
     if (! $ren && $free_rename) {
-        my $token = LJ::Pay::new_rename_token(0);
+        my $token = LJ::Pay::Payment::PayItem::Rename::new_rename_token(0);
         unless ($token) {
             $err{'token'} = "Error generating rename token";
 

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