wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r13056: LJSUP-14629: prevent deliver an items ol...

Committer: wisest-owl
LJSUP-14629: prevent deliver an items older 6 months

U   trunk/bin/maint/pay.pl
Modified: trunk/bin/maint/pay.pl
===================================================================
--- trunk/bin/maint/pay.pl	2012-12-17 11:00:24 UTC (rev 13055)
+++ trunk/bin/maint/pay.pl	2012-12-17 11:45:22 UTC (rev 13056)
@@ -474,6 +474,18 @@
             warn "cannot load cart: $@";
         } else {
 
+            my @date_sent_mysql = $pp->get_datesent =~ /^(\d{1,4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)$/; 
+            my $date_sent_dt = DateTime->new (
+                year    => $date_sent_mysql[0],
+                month   => $date_sent_mysql[1],
+                day     => $date_sent_mysql[2],
+                hour    => $date_sent_mysql[3],
+                minute  => $date_sent_mysql[4],
+                second  => $date_sent_mysql[5],
+            );
+
+            next if $date_sent_dt->epoch < $now - 2_592_000 * ($LJ::PAY_MAX_OLD_DELIVER || 6); ## 6 month old
+
             # prevent shop3 goods from being delivered here
             next if $pp->payvar_get('shop_version');
 

Tags: ljcom, pl, wisest-owl
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