Imported from http://svn.buddypress.org/tags/2.1.1/