Making WordPress.org

Changeset 2623


Ignore:
Timestamp:
02/25/2016 11:38:02 PM (10 years ago)
Author:
kovshenin
Message:

WordCamp.org: Add an updated field to the payment requests index.

Location:
sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php

    r2622 r2623  
    33class Payment_Requests_Dashboard {
    44        public static $list_table;
    5         public static $db_version = 6;
     5        public static $db_version = 7;
    66        public static $import_results = null;
    77
     
    6161                        post_id int(11) unsigned NOT NULL default '0',
    6262                        created int(11) unsigned NOT NULL default '0',
     63                        updated int(11) unsigned NOT NULL default '0',
    6364                        paid int(11) unsigned NOT NULL default '0',
    6465                        category varchar(255) NOT NULL default '',
     
    153154                }
    154155
     156                // One of these timestamps.
     157                while ( true ) {
     158                        $updated_timestamp = absint( get_post_meta( $request->ID, '_wcb_updated_timestamp', time() ) );
     159                        if ( $updated_timestamp ) break;
     160
     161                        $updated_timestamp = strtotime( $request->post_modified_gmt );
     162                        if ( $updated_timestamp ) break;
     163
     164                        $updated_timestamp = strtotime( $request->post_date_gmt );
     165                        if ( $updated_timestamp ) break;
     166
     167                        $updated_timestamp = strtotime( $request->post_date );
     168                        break;
     169                }
     170
    155171                return array(
    156172                        'blog_id' => get_current_blog_id(),
    157173                        'post_id' => $request->ID,
    158174                        'created' => get_post_time( 'U', true, $request->ID ),
     175                        'updated' => $updated_timestamp,
    159176                        'paid'    => absint( get_post_meta( $request->ID, '_camppayments_date_vendor_paid', true ) ),
    160177                        'due' => absint( get_post_meta( $request->ID, '_camppayments_due_by', true ) ),
  • sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-list-table.php

    r2617 r2623  
    8686                } elseif ( 'paid' == $view ) {
    8787                        $where .= " AND `status` = 'wcb-paid' ";
    88                         $orderby = 'created';
     88                        $orderby = 'updated';
    8989                        $order = 'desc';
    9090                } elseif ( 'incomplete' == $view ) {
Note: See TracChangeset for help on using the changeset viewer.