Ensures metaboxes are collapsible in various Administration screens

When editing an activity, editing a group or editing a profile from the corresponding WordPress Administration screens, metaboxes are now fully collapsible.

Fixes #5364

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8030 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8030

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8031 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove unused variables and eliminate PHP notices from BP_Core_Login_Widget::update()

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8032 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Whitespace

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8033 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8033

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8034 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't remove 'updated_profile' from registered activity actions

This activity type was reintroduced in r7998. See #4636

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8035 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8035

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8036 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Set bp_notifications_add_notification() arguments correctly in case of a new_membership_request

The group id needs to be the item_id argument of bp_notifications_add_notification() in case a member requested to join the group. The patch also makes sure the link to the user notification settings page is the one of the administrator of the group in the email sent to inform him of a new membership request.

Fixes #5446

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8037 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8037

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8038 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Templates: correct mis-named action in members/single/friends.php template.

Fixes #5311, props modemlooper

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8039 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
More generous tests for blog meta cache

The current test assumes we know exhaustively what the blog meta keys will be.
The new technique only checks to make sure that our whitelist is present in the
cache, which is all we really need to check to verify that the cache priming
is working.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8040 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Declare $wpdb global in testcase go_to() method

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8041 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add 'include_blog_ids' param to bp_has_blogs() stack

The key 'include_blog_ids' was chosen because of the somewhat odd schema of
the blogs table: the primary key in that table is not the blog, but is for the
user-blog relationship. 'include_blog_ids' underscores that results will be
limited by the 'blog_id' table.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8042 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8042

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8043 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce 'inviter_id' and 'invite_sent' params to BP_Group_Member_Query

These additional parameters make it possible to use BP_Group_Member_Query for
unconfirmed group memberships, as in the case of invitations and requests. This
will allow it to be swapped for the internals of bp_group_has_members(). See

Props dcavins for an initial patch

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8044 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Swap bp_group_has_invites() internals for BP_Group_Member_Query, and introduce pagination arguments

See #5423

Props boonebgorges, dcavins

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8045 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8045

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8046 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add object caching when fetching a single user's last activity.

Previously, BP_Core_User::get_last_activity() was not being cached.
This resulted in an unnecessary query being run on every page load due
to the usage of bp_core_record_activity() on the 'wp_head' action.

This commit caches calls to BP_Core_User::get_last_activity() when a
single user ID is passed and resets the cache when the user's last
activity is updated on BP_Core_User::update_last_activity().

See #5128

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8047 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Prevent the last displayed activity on stream to be reloaded after a posted update

Since the introduction of the heartbeat feature to automatically check for new activities, when posting an update: an offset argument is used to load all new activities. This offset is given by the last activity id displayed on the stream, to be sure that specific activity is not reloaded, we need to increment this id by 1.

Fixes #5447

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8048 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Make sure a deleted message thread is no more viewable by the user

When a user deletes a message thread, the message is no more shown in its inbox or outbox, but typing the url of the message thread will load the message giving the impression, it has not been deleted. Reason is a message is completely deleted as soon as all recipients and senders deleted it. So we need to make sure the user will be redirected to his inbox if he tries to view a message thread he deleted.

Props henrywright

Fixes #5254

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8049 cdf35c40-ae34-48e0-9cc9-0c9da1808c22