Check `BP_User_Query` when using `friends_check_friendship_status()`.

Previously, `friends_check_friendship_status()` did not reference the data
already queried in the members loop via `BP_User_Query`.  As a result, if
a user was logged in and viewing the member directory, this added twenty
additional DB queries to the page.

This commit:
* Adds an additional property - `friendship_status` - to `bp_friends_filter_user_query_populate_extras()`. This property references the various friendship statuses from `BP_Friends_Friendship::check_is_friend()`
* Checks this new property in `friends_check_friendship_status()` before querying the DB
* Adds unit tests

Props r-a-y, boonebgorges.

Fixes #5703.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8514 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Only disable WP_DEBUG on PHP 5.5 Travis CI tests when running WP 3.7

This disabling is meant to allow builds to pass even in the presence of mysqli-
related debug notices. But later versions of WP either suppress the notice, or
support mysqli natively.

See #5708

Props netweb

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8515 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In Travis CI config, move environment setup to before_install, so as not to trigger failed builds

Environment setup on Travis CI can fail in a number of ways - failed git
checkouts, database connection problems, etc - that have nothing specifically
to do with BuddyPress's test configuration. This changeset moves those steps
into the before_install section, with the result that a failed setup routine
will result in an 'errored' rather than 'failed' build. Grunt setup and the
phpunit tests themselves will continue to generate failure messages when
something goes wrong.

See #5708

Props netweb

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

See #5698

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8517 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add 'option' to the whitelist of xprofile field types

The 'option' field type is not full-fledged, in the sense that it has an
associated BP_XProfile_Field_Type class; it is used only to save the values
that are child options of type 'radio', 'select', 'multiselect' and other
option-supporting field types. It is important that 'option' thus be added
manually to the field type whitelist, so that option fields can be created
programatically.

Fixes #5472

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

See #5698

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

See #5698

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8520 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Unit tests for bp_activity_post_update()

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

See #5698

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8522 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use dirname( __FILE__ ) instead of __DIR__ in trunk loader file

As WordPress minimum PHP required version is 5.2.4 and __DIR__ was introduced in 5.3, we need to use dirname( __FILE__ ) so that people can use the trunk version of BuddyPress if their PHP version is lower than 5.3.

props hnla, boonebgorges

Fixes #5702

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8523 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve the format of the "dummy" cached item in BP_XProfile_XProfileData::get_data_for_user()

When a value is not found for a given field/user pair, an empty piece of data
is stored in the cache to avoid an unnecessary requery. However, the value was
not being stored with the proper format, resulting in PHP notices in certain
cases (such as when fields were preloaded into the cache for 'select'/'option'
parent/child relationships)

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

See #5698

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8525 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add unit test for bp_activity_get_activity_id()

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8526 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't use extract() in bp_activity_get_activity_id(). See #5698

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8527 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add unit test for bp_activity_delete_by_item_id()

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

See #5698

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8529 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improved formatting for docblocks in bp-activity-functions.php

See #5022

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8530 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Check groups loop data when using `bp_group_is_user_banned()`.

Previously, `bp_group_is_user_banned() did not reference the data already
queried in the groups loop via `BP_Groups_Group::get_group_extras()`.  As a
result, if a user without the `'bp_moderate'` cap was logged in and viewing
the group directory, this added twenty additional DB queries to the page.

Commit also standardizes the return value of `bp_group_is_user_banned()` to
a boolean.  Previously, it was possible for the function to return either a
string of the integer, null or a boolean.

Fixes #5705.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8531 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use `get_user_by()` for `bp_core_get_userid_from_nicename()` and `bp_core_get_userid()`

Previously, these functions used direct DB queries to grab the user ID when
a `user_nicename` or `user_login` was passed.

This commit switches these direct DB queries to use `get_user_by()`, which
caches the query when a persistent object cache is enabled.

Fixes #5696.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8532 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improved documentation for xprofile_insert_field()

See #5022

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