Plugin Directory

Changeset 186197


Ignore:
Timestamp:
12/22/2009 05:36:00 PM (16 years ago)
Author:
are79
Message:

are-paypal-ipn.php - expiration_unit is inserted togather with expire

File:
1 edited

Legend:

Unmodified
Added
Removed
  • are-paypal/trunk/are-paypal-ipn.php

    r163742 r186197  
    206206    $items = $wpdb->get_results("SELECT * FROM . $appcfg->paied_items_table WHERE post_id='$post_id'");
    207207    $expire='';
     208    $expiration_unit = 'D';
    208209    if ($items){
    209210        $expire=$items[0]->expire;
     211        $expiration_unit = $items[0]->expiration_unit;
    210212    }
    211213    if ($post_id=="-1"){
    212         $expire=get_option($appcfg->prefix.'_BlogExpire');
    213     }
    214     $wpdb->query("INSERT INTO $appcfg->paied_users_table(post_id,user_id,expire) VALUES('$post_id','$user_id','$expire')");
     214        $expire = get_option($appcfg->prefix.'_BlogExpire');
     215        $expiration_unit = get_option($appcfg->prefix.'_BlogExpirationUnits');
     216    }
     217    $wpdb->query("INSERT INTO $appcfg->paied_users_table(post_id,user_id,expire,expiration_unit) VALUES('$post_id','$user_id','$expire','$expiration_unit')");
    215218    $bonuses = $wpdb->get_results("SELECT post2_id FROM . $appcfg->bonus_posts_table WHERE post1_id='$post_id'");
    216219    foreach($bonuses as $bonus) {
Note: See TracChangeset for help on using the changeset viewer.