Committer: nnikulochkina
LJSUP-13074: Implement Paid Repost lifecycleU trunk/cgi-bin/LJ/Hooks/SUP.pm
Modified: trunk/cgi-bin/LJ/Hooks/SUP.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/SUP.pm 2012-07-26 14:47:41 UTC (rev 12360) +++ trunk/cgi-bin/LJ/Hooks/SUP.pm 2012-07-27 07:06:37 UTC (rev 12361) @@ -1013,6 +1013,13 @@ # entry is valid - it is not deleted yet LJ::WishList->clean_post_id($ju, $entry->ditemid); + + # If repost offer exists, revoke it + if($entry->repost_offer) { + my $repost_offer = LJ::Pay::Repost::Offer->load($jid, $entry->repost_offer); + $repost_offer->revoke if $repost_offer->is_active; + } + }); ##