Imported from http://svn.buddypress.org/tags/1.8-RC1/