Skip to:
Content

BuddyPress.org

Changeset 9129


Ignore:
Timestamp:
11/10/2014 03:45:40 PM (10 years ago)
Author:
boonebgorges
Message:

Use a unique variable name in activate heartbeat JS.

The name 'firstrow' was colliding with the "What's new" JS.

Props andemann.
Fixes #6003.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r9094 r9129  
    16031603
    16041604    // Set the last id to request after
     1605    var first_item_recorded = 0;
    16051606    jq( document ).on( 'heartbeat-send.buddypress', function( e, data ) {
    16061607
    1607         firstrow = 0;
     1608        first_item_recorded = 0;
    16081609
    16091610        // First row is default latest activity id
     
    16131614
    16141615            if ( timestamp ) {
    1615                 firstrow = timestamp[1];
    1616             }
    1617         }
    1618 
    1619         if ( 0 === activity_last_recorded || Number( firstrow ) > activity_last_recorded ) {
    1620             activity_last_recorded = Number( firstrow );
     1616                first_item_recorded = timestamp[1];
     1617            }
     1618        }
     1619
     1620        if ( 0 === activity_last_recorded || Number( first_item_recorded ) > activity_last_recorded ) {
     1621            activity_last_recorded = Number( first_item_recorded );
    16211622        }
    16221623
Note: See TracChangeset for help on using the changeset viewer.