Skip to:
Content

BuddyPress.org

Ticket #5424: 5424.diff

File 5424.diff, 1.6 KB (added by imath, 11 years ago)
  • bp-core/bp-core-classes.php

     
    14111411                                        'user_id'       => $user_id,
    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                                ),
    14161420
     
    14201424                                        '%s',
    14211425                                        '%s',
    14221426                                        '%s',
     1427                                        '%s',
     1428                                        '%s',
     1429                                        '%d',
     1430                                        '%s',
    14231431                                )
    14241432                        );
    14251433                }
  • bp-core/bp-core-update.php

     
    350350        /** Migrate 'last_activity' data *************************************/
    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
    357357                    meta_key = 'last_activity'