Skip to:
Content

BuddyPress.org

Changeset 7989


Ignore:
Timestamp:
02/25/2014 04:32:30 PM (11 years ago)
Author:
boonebgorges
Message:

Insert default values when updating last activity

This prevents errors on certain configs.

Fixes #5424

Props imath

Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-classes.php

    r7860 r7989  
    14121412                    'component'     => buddypress()->members->id,
    14131413                    'type'          => 'last_activity',
     1414                    'action'        => '',
     1415                    'content'       => '',
     1416                    'primary_link'  => '',
     1417                    'item_id'       => 0,
    14141418                    'date_recorded' => $time,
    14151419                ),
     
    14201424                    '%s',
    14211425                    '%s',
     1426                    '%s',
     1427                    '%s',
     1428                    '%s',
     1429                    '%d',
    14221430                    '%s',
    14231431                )
  • trunk/bp-core/bp-core-update.php

    r7904 r7989  
    351351
    352352    // The "NOT IN" clause prevents duplicates
    353     $sql = "INSERT INTO {$bp->members->table_name_last_activity} (`user_id`, `component`, `type`, `date_recorded` ) (
    354           SELECT user_id, '{$bp->members->id}' as component, 'last_activity' as type, meta_value AS date_recorded
     353    $sql = "INSERT INTO {$bp->members->table_name_last_activity} (`user_id`, `component`, `type`, `action`, `content`, `primary_link`, `item_id`, `date_recorded` ) (
     354          SELECT user_id, '{$bp->members->id}' as component, 'last_activity' as type, '' as action, '' as content, '' as primary_link, 0 as item_id, meta_value AS date_recorded
    355355          FROM {$wpdb->usermeta}
    356356          WHERE
Note: See TracChangeset for help on using the changeset viewer.