Committer: vtroitsky
LJSUP-13467: Selfpromo/CommPromo model refactoring required for Journal Promo.U trunk/cgi-bin/LJ/Pay/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Pay/SelfPromo.pm =================================================================== --- trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-10-15 07:01:15 UTC (rev 12751) +++ trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-10-15 08:22:01 UTC (rev 12752) @@ -398,6 +398,8 @@ # and what to email, which really depends on the item type my ( $email_subject, $email_body ); + my $new_promotion; + if ( $type eq 'buyout' ) { my $object = $promoted_object; @@ -406,7 +408,7 @@ my $cost = $item->get_amt * LJ::Pay::Wallet::EXCHANGE_RATE(); - my $new_promotion = LJ::Pay::Promotion::Auction->create_active($slot, $promoted_object, $cost, $rcpt_u, $current_promotion); + $new_promotion = LJ::Pay::Promotion::Auction->create_active($slot, $promoted_object, $cost, $rcpt_u, $current_promotion); $item->update( subitem => join('-', ($slot->slot_id, $new_promotion->promoid)) ); @@ -489,6 +491,8 @@ } $class->debug_msg($slot, "delivery successful"); + + return $new_promotion; } =item admin_cancel_promo