Auto-fetch URL search parameters in bp_has_groups() before parsing $args array

Our previous method, of getting the search term out of $_REQUEST, had the
effect of overriding any search terms that were passed to the bp_has_groups()
function. Among other problems, this made it impossible to get an unfiltered
group list when looking at a page that was using an 's' parameter for something
else.

Fixes #5456

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8116 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce BuddyPress Tools panel

Modeled on the bbPress panel, the BuddyPress Tools panel contains a number of
tools for repairing BuddyPress data. In this first iteration, the following
actions are supported:

- Recalculate total_friend_count for each user
- Recalculate total_group_count for each user
- Recalculate total site members

On non-Multisite (or when BP is only activated on a single site), the menu
appears as Tools > BuddyPress. When BP is network-activated, we create a stub
Tools menu on the Network Admin to account for the fact that one is not
normally there. If WP ever introduces a menu like this, we can use it instead.

Fixes #5296

Props cmmarslender, boonebgorges, imath

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8118 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce Sign Ups Management

In Users Administration Screen, a new view is now available to manage the pending accounts of a site or of the network of sites. The following actions are supported:
- Resend the activation email
- Delete the pending account
- Activate the pending account
The corresponding bulk actions are also supported. A search box is available in order to let the administrator easily find some specific pending accounts.

The registration process have also been modified so that multisite and regular configs handles it in a similar way. A mechnanism is in place to ensure plugin backward compatibility concerning the regular configs.

See #5374

props boonebgorges, imath

Fixes #4651

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8120 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't use mysql_real_escape_string() in BP_Signup

This causes problems on PHP 5.5+, where the mysql_* functions have been
deprecated.

See #5374

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8121 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Better verbiage for "Pending Accounts". See #5374

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8122 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Register the signup table in the members global even if registration is disabled

Conditionally registering the table causes problems for our unit tests. It also
means that we have to worry about table creation when enabling registration
later on.

See #5374

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8123 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce tool on Tools menu for repairing last_activity data

Fixes #5461

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8124 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Generate activity actions dynamically, instead of using static values stored in the database

Activity actions - like 'Joe became a registered member' - have always been
stored as static strings in the activity table. This has been a perennial thorn
in the side of BP site administrators. For one thing, static strings cannot be
translated for multilingual audiences (without unreasonable workarounds).
For another, information in these static strings becomes out of date as users
change their display names, groups change their names, and so on.

This changeset makes it possible for activity types to be registered with a
new $format_callback function, passed to bp_activity_set_action(), which BP
will use to generate the action dynamically when building the activity loop.
This makes the activity stream fully localizable, continually up-to-date, and
generally the bomb dot com.

Existing plugins that do not register format_callback functions will continue
to have their actions pulled directly from the database. Likewise, since a copy
of the static string is saved in the activity table, static strings can be
served if the given component is disabled at any point (and thus the callback
is no longer available).

The original argument for caching the action strings was that generating them
inline was too resource intensive; it often requires pulling up display names,
user permalinks, group links, blog post names, and so forth. To address this
problem, each component can now prefetch required data at the beginning of an
activity loop by hooking to bp_activity_prefetch_object_data, and loading any
relevant data into the cache. The Activity, Friends, Groups, and Blogs
component now do this natively. It's likely that this prefetching will have
other performance benefits, as plugin authors will now be able to access user
data etc inline without performance penalties.

The case of the Blogs component is a special one; it's not practical to
prefetch data from multiple blogs at the beginning of a loop, due to the
resources required by switch_to_blog(). For this reason, the format_callback
functions in the blog component cache some relevant data (like the post name)
in blogmeta, where it's readily accessible within the loop.

Fixes #3856

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8125 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use WP Plugin API rather than call_user_func() to apply format_callback to activity actions

This allows plugin authors to modify or override default formatting callbacks
using the standard remove_filter() and add_filter() API functions.

Hat-tip to nacin for the idea

See #3856

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8127 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix incorrect variable name in test_bp_activity_format_activity_action_new_blog_comment_backpat()

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