Committer: sbelyaev
LJSUP-12919: Need new notificationU trunk/bin/upgrading/en_LJ.dat U trunk/cgi-bin/LJ/Pay/SelfPromo.pm
Modified: trunk/bin/upgrading/en_LJ.dat =================================================================== --- trunk/bin/upgrading/en_LJ.dat 2012-07-24 14:25:35 UTC (rev 12337) +++ trunk/bin/upgrading/en_LJ.dat 2012-07-24 14:29:24 UTC (rev 12338) @@ -2529,6 +2529,30 @@ esn.subscriptions.unsubscribe.user_not_found|staleness=1 esn.subscriptions.unsubscribe.user_not_found=User was not found +esn.selfpromo.buyout.entry.body|staleness=1 +esn.selfpromo.buyout.entry.body=In 'Entry promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +esn.selfpromo.buyout.entry.subject|staleness=1 +esn.selfpromo.buyout.entry.subject==In 'Entry promo' ([[country]]) new stake [[stakes]] + +esn.selfpromo.buyout.journal.body|staleness=1 +esn.selfpromo.buyout.journal.body=In 'Journal promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +esn.selfpromo.buyout.journal.subject|staleness=1 +esn.selfpromo.buyout.journal.subject=In 'Journal promo' ([[country]]) new stake [[stakes]] + +esn.selfpromo.buyout.community.body|staleness=1 +esn.selfpromo.buyout.community.body=In 'Community promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +esn.selfpromo.buyout.community.subject|staleness=1 +esn.selfpromo.buyout.community.subject=In 'Community promo' ([[country]]) new stake [[stakes]] + +esn.notificationpromo.buyout.entry.body|staleness=1 +esn.notificationpromo.buyout.entry.body=In 'Notification promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +esn.notificationpromo.buyout.entry.subject|staleness=1 +esn.notificationpromo.buyout.entry.subject=In 'Notification promo' ([[country]]) new stake [[stakes]] + esn.supofficialpost.alert=There is a new [[sitenameabbrev]] announcement in [[username]]. esn.supofficialpost.subject=[[sitenameshort]] News: [[subject]] @@ -5161,6 +5185,18 @@ notification.sms.officialpost=There is a new [[abbrev]] announcement in '[[journal]].' [[mobile_url]] +notification.sms.pay.selfpromo.buyout.journal|staleness=1 +notification.sms.pay.selfpromo.buyout.journal=In 'Journal promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +notification.sms.pay.selfpromo.buyout.entry|staleness=1 +notification.sms.pay.selfpromo.buyout.entry=In 'Entry promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +notification.sms.pay.selfpromo.buyout.community|staleness=1 +notification.sms.pay.selfpromo.buyout.community=In 'Community promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + +notification.sms.pay.notificationpromo.buyout.community|staleness=1 +notification.sms.pay.notificationpromo.buyout.community=In 'Notification promo' ([[country]]) new stake [[stakes]]. [[target]], [[user]] with SC=[[soc]] + notification.sms.usermessagerecvd|staleness=1 notification.sms.usermessagerecvd=[[user]] sent you a message on LiveJournal Modified: trunk/cgi-bin/LJ/Pay/SelfPromo.pm =================================================================== --- trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-07-24 14:25:35 UTC (rev 12337) +++ trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-07-24 14:29:24 UTC (rev 12338) @@ -8,6 +8,7 @@ use LJ::Pay::PromotedObject qw(:types); use LJ::Pay::Promotion; use LJ::Pay::SelfPromo::History; +use LJ::Event::PromoBuyout; #use LJ::Pay::SelfPromo::Lock; #use LJ::Pay::SelfPromo::Error; @@ -391,6 +392,16 @@ my $new_promotion = LJ::Pay::Promotion::Auction->create_active($slot, $promoted_object, $cost, $rcpt_u); + if ($cost >= $LJ::LARGE_PROMO_NOTIFICATION_COST) { + foreach my $username (@LJ::LARGE_PROMO_NOTIFICATION_USERS) { + my $nt_u = LJ::load_user($username); + my $notify_event = LJ::Event::PromoBuyout->new($nt_u, + $new_promotion->promoid, + $new_promotion->class); + $notify_event->fire; + } + } + $item->set_subitem(join('-', ($slot->slot_id, $new_promotion->promoid))); # $item->save();