sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r12391: LJSUP-12390: Save backlinks to the previ...

Committer: vtroitsky
LJSUP-12390: Save backlinks to the previous promo object for auction based promos
U   trunk/bin/upgrading/update-db-local.pl
U   trunk/cgi-bin/LJ/Pay/SelfPromo.pm
Modified: trunk/bin/upgrading/update-db-local.pl
===================================================================
--- trunk/bin/upgrading/update-db-local.pl	2012-08-01 12:42:03 UTC (rev 12390)
+++ trunk/bin/upgrading/update-db-local.pl	2012-08-01 12:44:13 UTC (rev 12391)
@@ -2558,6 +2558,13 @@
         });
     }
 
+    unless (column_type("selfpromo", "prev_promoid")) {
+        do_alter("selfpromo", qq{
+            ALTER TABLE selfpromo
+                ADD COLUMN prev_promoid int(11) NOT NULL DEFAULT '0';
+        });
+    }
+
 });
 
 1;  # true

Modified: trunk/cgi-bin/LJ/Pay/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/SelfPromo.pm	2012-08-01 12:42:03 UTC (rev 12390)
+++ trunk/cgi-bin/LJ/Pay/SelfPromo.pm	2012-08-01 12:44:13 UTC (rev 12391)
@@ -402,7 +402,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);
+        my $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)) );
 

Tags: ljcom, pl, pm, sunnyman, vtroitsky
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