Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plugin updates

  • Loading branch information...
commit b978be06068ba64990e44bd7a24b8b219717d4c6 1 parent ce0c309
@craigcook craigcook authored
Showing with 11,160 additions and 4,565 deletions.
  1. BIN  languages/buddypress-qmo.mo
  2. +3,094 −3,075 languages/buddypress-qmo.po
  3. +1 −1  plugins/achievements/dpa.pot
  4. +1 −1  plugins/achievements/includes/achievements-admin.php
  5. +1 −1  plugins/achievements/includes/achievements-core.php
  6. +3 −3 plugins/achievements/includes/templates/achievements/create.php
  7. +3 −3 plugins/achievements/includes/templates/achievements/index.php
  8. +3 −3 plugins/achievements/includes/templates/achievements/single/home.php
  9. +3 −3 plugins/achievements/includes/templates/members/single/achievements.php
  10. +4 −4 plugins/achievements/loader.php
  11. +11 −11 plugins/achievements/readme.txt
  12. +1 −1  plugins/bp-group-management/bp-group-management.php
  13. BIN  plugins/bp-group-management/languages/bp-group-management-ro_RO.mo
  14. +183 −0 plugins/bp-group-management/languages/bp-group-management-ro_RO.po
  15. +5 −1 plugins/bp-group-management/readme.txt
  16. +11 −9 plugins/buddypress/bp-activity/bp-activity-classes.php
  17. +11 −8 plugins/buddypress/bp-activity/bp-activity-notifications.php
  18. +1 −1  plugins/buddypress/bp-blogs/bp-blogs-template.php
  19. +8 −2 plugins/buddypress/bp-core/admin/bp-core-schema.php
  20. +8 −4 plugins/buddypress/bp-core/bp-core-avatars.php
  21. +7 −0 plugins/buddypress/bp-core/bp-core-filters.php
  22. +6 −3 plugins/buddypress/bp-core/bp-core-functions.php
  23. +4 −0 plugins/buddypress/bp-core/css/buddybar.dev.css
  24. +3 −2 plugins/buddypress/bp-core/deprecated/1.5.php
  25. +2 −2 plugins/buddypress/bp-forums/bp-forums-functions.php
  26. +6 −5 plugins/buddypress/bp-friends/bp-friends-notifications.php
  27. +14 −11 plugins/buddypress/bp-groups/bp-groups-notifications.php
  28. +166 −139 plugins/buddypress/bp-languages/buddypress.pot
  29. BIN  plugins/buddypress/bp-languages/default.mo
  30. +5,236 −0 plugins/buddypress/bp-languages/default.po
  31. +2 −2 plugins/buddypress/bp-loader.php
  32. +8 −68 plugins/buddypress/bp-members/bp-members-actions.php
  33. +111 −2 plugins/buddypress/bp-members/bp-members-functions.php
  34. +21 −7 plugins/buddypress/bp-members/bp-members-signup.php
  35. +2 −1  plugins/buddypress/bp-messages/bp-messages-notifications.php
  36. +19 −19 plugins/buddypress/bp-messages/js/autocomplete/license.bgiframe.txt
  37. +145 −55 plugins/buddypress/bp-settings/bp-settings-actions.php
  38. +76 −11 plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
  39. +1 −1  plugins/buddypress/bp-themes/bp-default/groups/single/members.php
  40. +280 −280 plugins/buddypress/bp-themes/bp-default/license.txt
  41. +6 −2 plugins/buddypress/bp-themes/bp-default/members/single/settings/general.php
  42. +21 −21 plugins/buddypress/bp-themes/bp-default/readme.txt
  43. +1 −1  plugins/buddypress/bp-themes/bp-default/rtl.css
  44. +1 −1  plugins/buddypress/bp-themes/bp-default/style.css
  45. +280 −280 plugins/buddypress/license.txt
  46. +125 −121 plugins/buddypress/readme.txt
  47. +22 −13 plugins/cms-tree-page-view/functions.php
  48. +15 −16 plugins/cms-tree-page-view/index.php
  49. BIN  plugins/cms-tree-page-view/languages/cms-tree-page-view-da_DK.mo
  50. +321 −0 plugins/cms-tree-page-view/languages/cms-tree-page-view-da_DK.po
  51. BIN  plugins/cms-tree-page-view/languages/cms-tree-page-view-de_DE.mo
  52. +179 −71 plugins/cms-tree-page-view/languages/cms-tree-page-view-de_DE.po
  53. BIN  plugins/cms-tree-page-view/languages/cms-tree-page-view-pl_PL.mo
  54. +3 −3 plugins/cms-tree-page-view/languages/cms-tree-page-view-pl_PL.po
  55. BIN  plugins/cms-tree-page-view/languages/cms-tree-page-view-sv_SE.mo
  56. BIN  plugins/cms-tree-page-view/languages/cms-tree-page-view_ro_RO.mo
  57. +257 −0 plugins/cms-tree-page-view/languages/cms-tree-page-view_ro_RO.po
  58. +29 −2 plugins/cms-tree-page-view/readme.txt
  59. BIN  plugins/my-link-order/mylinkorder-da_DK.mo
  60. +8 −19 plugins/my-link-order/mylinkorder.php
  61. +222 −198 plugins/recently-updated-pages/recently_updated_pages.php
  62. +8 −1 plugins/restrict-categories/readme.txt
  63. +38 −15 plugins/restrict-categories/restrict-categories.php
  64. +163 −62 plugins/widget-logic/widget_logic.php
View
BIN  languages/buddypress-qmo.mo
Binary file not shown
View
6,169 languages/buddypress-qmo.po
3,094 additions, 3,075 deletions not shown
View
2  plugins/achievements/dpa.pot
@@ -87,7 +87,7 @@ msgid ""
"Achievements gives your BuddyPress community fresh impetus by promoting and "
"rewarding social interaction with challenges, badges and points. For "
"information, support, premium enhancements and developer documentation, "
-"visit <a href='http://achievementsapp.wordpress.com/'>our website</a>."
+"visit <a href='http://achievementsapp.com/'>our website</a>."
msgstr ""
#: includes/achievements-admin.php:186
View
2  plugins/achievements/includes/achievements-admin.php
@@ -182,7 +182,7 @@ function dpa_admin_screen() {
<div class="dpa-spacer">
<?php if ( !$is_support_tab ) : ?>
- <p><?php _e( "Achievements gives your BuddyPress community fresh impetus by promoting and rewarding social interaction with challenges, badges and points. For information, support, premium enhancements and developer documentation, visit <a href='http://achievementsapp.wordpress.com/'>our website</a>.", 'dpa' ) ?></p>
+ <p><?php _e( "Achievements gives your BuddyPress community fresh impetus by promoting and rewarding social interaction with challenges, badges and points. For information, support, premium enhancements and developer documentation, visit <a href='http://achievementsapp.com/'>our website</a>.", 'dpa' ) ?></p>
<p><?php printf( __( "To create and manage Achievements, visit the <a href='%s'>Achievements Directory</a>.", 'dpa' ), dpa_get_achievements_permalink() ) ?></p>
<?php else : ?>
<p><?php printf( __( "Have you found a bug or do you have a great idea for the next release? Please make a report on <a href='%s'>BuddyPress.org</a>, or use the form below to get in contact. We're listening.", 'dpa' ), 'http://buddypress.org/community/groups/achievements/forum/' ) ?></p>
View
2  plugins/achievements/includes/achievements-core.php
@@ -6,7 +6,7 @@
* @package Achievements for BuddyPress
* @subpackage core
*
- * $Id: achievements-core.php 1020 2011-10-07 22:56:17Z DJPaul $
+ * $Id: achievements-core.php 1024 2012-01-02 13:53:50Z DJPaul $
*/
/**
View
6 plugins/achievements/includes/templates/achievements/create.php
@@ -1,4 +1,4 @@
-<?php get_header() ?>
+<?php get_header( 'buddypress' ) ?>
<div id="content">
<div class="padder">
@@ -46,6 +46,6 @@
</div><!-- .padder -->
</div><!-- #content -->
- <?php get_sidebar() ?>
+ <?php get_sidebar( 'buddypress' ) ?>
-<?php get_footer() ?>
+<?php get_footer( 'buddypress' ) ?>
View
6 plugins/achievements/includes/templates/achievements/index.php
@@ -1,4 +1,4 @@
-<?php get_header() ?>
+<?php get_header( 'buddypress' ) ?>
<div id="content">
<div class="padder">
@@ -53,6 +53,6 @@
</div><!-- .padder -->
</div><!-- #content -->
- <?php get_sidebar() ?>
+ <?php get_sidebar( 'buddypress' ) ?>
-<?php get_footer() ?>
+<?php get_footer( 'buddypress' ) ?>
View
6 plugins/achievements/includes/templates/achievements/single/home.php
@@ -1,4 +1,4 @@
-<?php get_header() ?>
+<?php get_header( 'buddypress' ) ?>
<div id="content">
<div class="padder">
@@ -51,6 +51,6 @@
</div><!-- .padder -->
</div><!-- #content -->
- <?php get_sidebar() ?>
+ <?php get_sidebar( 'buddypress' ) ?>
-<?php get_footer() ?>
+<?php get_footer( 'buddypress' ) ?>
View
6 plugins/achievements/includes/templates/members/single/achievements.php
@@ -1,4 +1,4 @@
-<?php get_header() ?>
+<?php get_header( 'buddypress' ) ?>
<div id="content">
<div class="padder">
@@ -35,6 +35,6 @@
</div><!-- .padder -->
</div><!-- #content -->
- <?php get_sidebar() ?>
+ <?php get_sidebar( 'buddypress' ) ?>
-<?php get_footer() ?>
+<?php get_footer( 'buddypress' ) ?>
View
8 plugins/achievements/loader.php
@@ -6,16 +6,16 @@
* @package Achievements for BuddyPress
* @subpackage loader
*
- * $Id: loader.php 1011 2011-10-07 18:28:03Z DJPaul $
+ * $Id: loader.php 1026 2012-04-01 12:23:14Z DJPaul $
*/
/*
Plugin Name: Achievements
-Plugin URI: http://achievementsapp.wordpress.com/
+Plugin URI: http://achievementsapp.com/
Description: Achievements gives your BuddyPress community fresh impetus by promoting and rewarding social interaction with challenges, badges and points.
-Version: 2.2
+Version: 2.3
Requires at least: WP 3.0.1, BuddyPress 1.5
-Tested up to: WP 3.3, BuddyPress 1.5.2
+Tested up to: WP 3.3.1, BuddyPress 1.6
License: General Public License version 3
Author: Paul Gibbs
Author URI: http://byotos.com/
View
22 plugins/achievements/readme.txt
@@ -4,15 +4,15 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P3K7Z
Tags: buddypress,achievement,cubepoints,reward,points,score,rank,social,gaming,tokens,status,badge,WoW,Warcraft,games,challenges
License: General Public License version 3
Requires at least: WP 3.0.1, BuddyPress 1.5
-Tested up to: WP 3.3, BuddyPress 1.5.2
-Stable tag: 2.2
+Tested up to: WP 3.3.1, BuddyPress 1.6
+Stable tag: 2.3
Achievements gives your BuddyPress community fresh impetus by promoting and rewarding social interaction with challenges, badges and points.
== Description ==
Inspired by [video game achievement systems](http://en.wikipedia.org/wiki/Achievement_(video_gaming)), Achievements for BuddyPress gives your community fresh impetus by promoting and rewarding social interaction with challenges, badges and points. For example, reward users for commenting on a blog post or uploading a picture to their profile.
-For information, support, premium enhancements and developer documentation, visit http://achievementsapp.wordpress.com/.
+For information, support, premium enhancements and developer documentation, visit http://achievementsapp.com/.
[vimeo http://vimeo.com/15782949]
@@ -25,6 +25,9 @@ For information, support, premium enhancements and developer documentation, visi
1. To get started, visit your site, and select the "Achievements" in the main navigation.
== Changelog ==
+= 2.3 =
+* Improves compatibility with some themes.
+
= 2.2 =
* Fix error when unlocking achievement when not using any of achievements' widgets, and include up-to-date .pot file.
@@ -79,20 +82,17 @@ For information, support, premium enhancements and developer documentation, visi
* Fix "mystery man" avatar activity stream size.
= 2.0 =
-* Everything is brand new for BuddyPress 1.2.6. For information, support, premium enhancements and developer documentation, visit http://achievementsapp.wordpress.com/.
+* Everything is brand new for BuddyPress 1.2.6. For information, support, premium enhancements and developer documentation, visit http://achievementsapp.com/.
= Pre-2.0 =
* The historical release history has been moved to a better place.
== Upgrade Notice ==
-= 2.1 =
-BuddyPress 1.5+ compatibility release. Requires BuddyPress 1.5.
-
-= 2.0.7 =
-Fixes several bugs with the bundled widgets.
+= 2.3 =
+* Improves compatibility with some themes.
== Frequently Asked Questions ==
-For information, support, and developer documentation, visit http://achievementsapp.wordpress.com/.
+For information, support, and developer documentation, visit http://achievementsapp.com/.
== License ==
"Achievements for BuddyPress"
@@ -112,5 +112,5 @@ along with this program. If not, see http://www.gnu.org/licenses/.
== Screenshots ==
1. Achievement detail page
-2. A few of the many Achievement action types
+2. A few of the many Achievement action types
3. Part of the create/edit Achievement page
View
2  plugins/bp-group-management/bp-group-management.php
@@ -3,7 +3,7 @@
Plugin Name: BP Group Management
Plugin URI: http://teleogistic.net/code/buddypress/bp-group-management
Description: Allows site administrators to manage BuddyPress group membership
-Version: 0.5.2
+Version: 0.5.3
Author: Boone Gorges
Author URI: http://teleogistic.net
*/
View
BIN  plugins/bp-group-management/languages/bp-group-management-ro_RO.mo
Binary file not shown
View
183 plugins/bp-group-management/languages/bp-group-management-ro_RO.po
@@ -0,0 +1,183 @@
+# Copyright (C) 2010 Boone Gorges
+# This file is distributed under the same license as the BP Group Management package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: BP Group Management 0.2\n"
+"Report-Msgid-Bugs-To: http://wordpress.org/tag/bp-group-management\n"
+"POT-Creation-Date: 2010-03-07 21:39+0000\n"
+"PO-Revision-Date: 2012-03-20 18:15+0200\n"
+"X-Poedit-Language: Romanian\n"
+"X-Poedit-Country: Romania\n"
+"Language-Team: Web Geeks\n"
+"Last-Translator: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: bp-group-management-bp-functions.php:5
+#: bp-group-management-bp-functions.php:59
+#: bp-group-management-bp-functions.php:243
+#: bp-group-management-bp-functions.php:367
+msgid "Group Management"
+msgstr "Gestionarea grupului"
+
+#: bp-group-management-bp-functions.php:45
+#: bp-group-management-bp-functions.php:163
+#: bp-group-management-bp-functions.php:177
+#: bp-group-management-bp-functions.php:191
+#: bp-group-management-bp-functions.php:205
+#: bp-group-management-bp-functions.php:219
+#: bp-group-management-bp-functions.php:231
+msgid "Sorry, there was an error."
+msgstr "Ne pare rău, a fost o eroare."
+
+#: bp-group-management-bp-functions.php:47
+msgid "Group deleted."
+msgstr "Grupa elimină."
+
+#: bp-group-management-bp-functions.php:65
+msgid "Group ID"
+msgstr "ID de grup"
+
+#: bp-group-management-bp-functions.php:66
+msgid "Group Name"
+msgstr "Nume grup"
+
+#: bp-group-management-bp-functions.php:67
+msgid "Date Created"
+msgstr "Data creat"
+
+#: bp-group-management-bp-functions.php:68
+msgid "Number of Members"
+msgstr "Numărul de membri"
+
+#: bp-group-management-bp-functions.php:104
+msgid "Edit"
+msgstr "Editare"
+
+#: bp-group-management-bp-functions.php:107
+msgid "Delete"
+msgstr "Ştergere"
+
+#: bp-group-management-bp-functions.php:109
+msgid "Visit"
+msgstr "Vizitaţi"
+
+#: bp-group-management-bp-functions.php:165
+msgid "Member kicked and banned"
+msgstr "Membre dat şi interzis"
+
+#: bp-group-management-bp-functions.php:179
+msgid "Member unbanned"
+msgstr "Membru unbanned"
+
+#: bp-group-management-bp-functions.php:193
+msgid "Member demoted"
+msgstr "Membre retrogradat"
+
+#: bp-group-management-bp-functions.php:207
+msgid "Member promoted to moderator"
+msgstr "Membre promovat moderator"
+
+#: bp-group-management-bp-functions.php:221
+msgid "Member promoted to admin"
+msgstr "Membre promovat la admin"
+
+#: bp-group-management-bp-functions.php:233
+msgid "User added to group"
+msgstr "Utilizator adăugate la Grupa"
+
+#: bp-group-management-bp-functions.php:244
+#: bp-group-management-bp-functions.php:368
+msgid "Back to group index"
+msgstr "Înapoi la indexul de grup"
+
+#: bp-group-management-bp-functions.php:248
+msgid "Manage current and banned group members"
+msgstr "Gestionaţi membrii grupului curente şi interzis"
+
+#: bp-group-management-bp-functions.php:277
+msgid "(banned)"
+msgstr "(interzis)"
+
+#: bp-group-management-bp-functions.php:277
+msgid "Remove Ban"
+msgstr "Remove Ban"
+
+#: bp-group-management-bp-functions.php:300
+msgid "Kick and ban this member"
+msgstr "Lovi cu piciorul şi ban acest membru"
+
+#: bp-group-management-bp-functions.php:300
+msgid "Kick & Ban"
+msgstr "Kick & Ban"
+
+#: bp-group-management-bp-functions.php:302
+#: bp-group-management-bp-functions.php:304
+msgid "Demote to Member"
+msgstr "Retrogradarea la membre"
+
+#: bp-group-management-bp-functions.php:304
+#: bp-group-management-bp-functions.php:306
+msgid "Promote to Admin"
+msgstr "Promovarea la Admin"
+
+#: bp-group-management-bp-functions.php:306
+msgid "Promote to Moderator"
+msgstr "Promova Moderator"
+
+#: bp-group-management-bp-functions.php:325
+msgid "Add members to group"
+msgstr "Adăuga membri la grup"
+
+#: bp-group-management-bp-functions.php:342
+msgid "Add"
+msgstr "Adăuga"
+
+#: bp-group-management-bp-functions.php:371
+msgid "Deleting the group"
+msgstr "Şterge grupul"
+
+#: bp-group-management-bp-functions.php:372
+msgid "You are about to delete the group"
+msgstr "Doriţi să ştergeţi grupul"
+
+#: bp-group-management-bp-functions.php:372
+msgid "This action cannot be undone."
+msgstr "Această acţiune nu poate fi anulată."
+
+#: bp-group-management-bp-functions.php:374
+msgid "Delete Group"
+msgstr "Ştergere grup"
+
+#: bp-group-management-bp-functions.php:375
+msgid "Oops, I changed my mind"
+msgstr "Oops, am schimbat mintea mea"
+
+#: bp-group-management-bp-functions.php:477
+#, php-format
+msgid "%s joined the group %s"
+msgstr "%s s-a alăturat grupului %s"
+
+#. Plugin Name of an extension
+msgid "BP Group Management"
+msgstr "Gestionarea grupul BP"
+
+#. Plugin URI of an extension
+msgid "http://teleogistic.net/code/buddypress/bp-group-management"
+msgstr "http://teleogistic.net/code/BuddyPress/BP-Group-management"
+
+#. Description of an extension
+msgid "Allows site administrators to manage BuddyPress group membership"
+msgstr "Permite administratorilor de site-ul pentru a gestiona apartenenţa BuddyPress la grup"
+
+#. Author of an extension
+msgid "Boone Gorges"
+msgstr "Boone Gorges"
+
+#. Author URI of an extension
+msgid "http://teleogistic.net"
+msgstr "http://teleogistic.net"
+
View
6 plugins/bp-group-management/readme.txt
@@ -4,7 +4,7 @@ Tags: buddypress, groups, members, manage
Requires at least: WP 2.8, BuddyPress 1.2
Tested up to: WP 3.1, BuddyPress 1.2.8
Donate link: http://teleogistic.net/donate/
-Stable tag: 0.5.2
+Stable tag: 0.5.3
Allows site administrators to manage BuddyPress group membership
@@ -22,9 +22,13 @@ This plugin creates an admin panel at Dashboard > BuddyPress > Group Management.
* Turkish: gk
* German: Tom
* Dutch: [Anja](http://werkgroepen.net/wordpress/)
+* Romanian, [Web Geek Science](http://webhostinggeeks.com/)
== Changelog ==
+= 0.5.3 =
+* Adds Romanian translation
+
= 0.5.2 =
* Fixes bug that caused problem with site member listing on non-MS WP installations
View
20 plugins/buddypress/bp-activity/bp-activity-classes.php
@@ -133,17 +133,14 @@ function get( $max = false, $page = 1, $per_page = 25, $sort = 'DESC', $search_t
$where_conditions['hidden_sql'] = "a.hide_sitewide = 0";
// Exclude specified items
- if ( $exclude )
+ if ( !empty( $exclude ) ) {
+ $exclude = implode( ',', wp_parse_id_list( $exclude ) );
$where_conditions['exclude'] = "a.id NOT IN ({$exclude})";
+ }
// The specific ids to which you want to limit the query
if ( !empty( $in ) ) {
- if ( is_array( $in ) ) {
- $in = implode ( ',', array_map( 'absint', $in ) );
- } else {
- $in = implode ( ',', array_map( 'absint', explode ( ',', $in ) ) );
- }
-
+ $in = implode( ',', wp_parse_id_list( $in ) );
$where_conditions['in'] = "a.id IN ({$in})";
}
@@ -155,8 +152,13 @@ function get( $max = false, $page = 1, $per_page = 25, $sort = 'DESC', $search_t
$where_sql = 'WHERE ' . join( ' AND ', $where_conditions );
- if ( $per_page && $page ) {
- $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page ), intval( $per_page ) );
+ if ( !empty( $per_page ) && !empty( $page ) ) {
+
+ // Make sure page values are absolute integers
+ $page = absint( $page );
+ $per_page = absint( $per_page );
+
+ $pag_sql = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page );
$activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}" ), $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
} else {
$activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort}" ), $select_sql, $from_sql, $where_sql, $sort ) );
View
19 plugins/buddypress/bp-activity/bp-activity-notifications.php
@@ -53,8 +53,9 @@ function bp_activity_at_message_notification( $activity_id, $receiver_user_id )
if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
$poster_name = bp_core_get_user_displayname( $activity->user_id );
- $message_link = bp_activity_get_permalink( $activity_id );
- $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
+ $message_link = bp_activity_get_permalink( $activity_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $receiver_user_id ) . $settings_slug . '/notifications/';
$poster_name = stripslashes( $poster_name );
$content = bp_activity_filter_kses( strip_tags( stripslashes( $activity->content ) ) );
@@ -138,9 +139,10 @@ function bp_activity_new_comment_notification( $comment_id, $commenter_id, $para
$original_activity = new BP_Activity_Activity( $activity_id );
if ( $original_activity->user_id != $commenter_id && 'no' != bp_get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) {
- $poster_name = bp_core_get_user_displayname( $commenter_id );
- $thread_link = bp_activity_get_permalink( $activity_id );
- $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . bp_get_settings_slug() . '/notifications/';
+ $poster_name = bp_core_get_user_displayname( $commenter_id );
+ $thread_link = bp_activity_get_permalink( $activity_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . $settings_slug . '/notifications/';
$poster_name = stripslashes( $poster_name );
$content = bp_activity_filter_kses( stripslashes($content) );
@@ -183,9 +185,10 @@ function bp_activity_new_comment_notification( $comment_id, $commenter_id, $para
$parent_comment = new BP_Activity_Activity( $parent_id );
if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != bp_get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) {
- $poster_name = bp_core_get_user_displayname( $commenter_id );
- $thread_link = bp_activity_get_permalink( $activity_id );
- $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . bp_get_settings_slug() . '/notifications/';
+ $poster_name = bp_core_get_user_displayname( $commenter_id );
+ $thread_link = bp_activity_get_permalink( $activity_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . $settings_slug . '/notifications/';
// Set up and send the message
$ud = bp_core_get_core_userdata( $parent_comment->user_id );
View
2  plugins/buddypress/bp-blogs/bp-blogs-template.php
@@ -554,7 +554,7 @@ function bp_blogs_validate_blog_signup() {
if ( is_subdomain_install() )
$domain = $blogname . '.' . preg_replace( '|^www\.|', '', $current_site->domain );
- wpmu_create_blog( $domain, $path, $blog_title, $current_user->id, $meta, $wpdb->siteid );
+ wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, $wpdb->siteid );
bp_blogs_confirm_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
return true;
}
View
10 plugins/buddypress/bp-core/admin/bp-core-schema.php
@@ -205,8 +205,14 @@ function bp_core_install_extended_profiles() {
$charset_collate = bp_core_set_charset();
$bp_prefix = bp_core_get_table_prefix();
- bp_update_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) );
- bp_update_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) );
+ // These values should only be updated if they are not already present
+ if ( !$base_group_name = bp_get_option( 'bp-xprofile-base-group-name' ) ) {
+ bp_update_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) );
+ }
+
+ if ( !$fullname_field_name = bp_get_option( 'bp-xprofile-fullname-field-name' ) ) {
+ bp_update_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) );
+ }
$sql[] = "CREATE TABLE {$bp_prefix}bp_xprofile_groups (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
View
12 plugins/buddypress/bp-core/bp-core-avatars.php
@@ -662,6 +662,11 @@ function bp_core_avatar_upload_path() {
if ( defined( 'BP_AVATAR_UPLOAD_PATH' ) ) {
$basedir = BP_AVATAR_UPLOAD_PATH;
} else {
+ if ( !bp_is_root_blog() ) {
+ // Switch dynamically in order to support BP_ENABLE_MULTIBLOG
+ switch_to_blog( bp_get_root_blog_id() );
+ }
+
// Get upload directory information from current site
$upload_dir = wp_upload_dir();
@@ -671,11 +676,10 @@ function bp_core_avatar_upload_path() {
} else {
$basedir = $upload_dir['basedir'];
-
- // If multisite, and current blog does not match root blog, make adjustments
- if ( is_multisite() && bp_get_root_blog_id() != get_current_blog_id() )
- $basedir = get_blog_option( bp_get_root_blog_id(), 'upload_path' );
}
+
+ // Will bail if not switched
+ restore_current_blog();
}
// Stash in $bp for later use
View
7 plugins/buddypress/bp-core/bp-core-filters.php
@@ -2,6 +2,13 @@
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
+// Add some filters to feedback messages
+add_filter( 'bp_core_render_message_content', 'wptexturize' );
+add_filter( 'bp_core_render_message_content', 'convert_smilies' );
+add_filter( 'bp_core_render_message_content', 'convert_chars' );
+add_filter( 'bp_core_render_message_content', 'wpautop' );
+add_filter( 'bp_core_render_message_content', 'shortcode_unautop' );
+
/**
* bp_core_exclude_pages()
*
View
9 plugins/buddypress/bp-core/bp-core-functions.php
@@ -552,11 +552,14 @@ function bp_core_setup_message() {
function bp_core_render_message() {
global $bp;
- if ( isset( $bp->template_message ) && $bp->template_message ) :
- $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error'; ?>
+ if ( !empty( $bp->template_message ) ) :
+ $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
+ $content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
<div id="message" class="<?php echo $type; ?>">
- <p><?php echo stripslashes( esc_attr( $bp->template_message ) ); ?></p>
+
+ <?php echo $content; ?>
+
</div>
<?php
View
4 plugins/buddypress/bp-core/css/buddybar.dev.css
@@ -198,4 +198,8 @@ body#bp-default #admin-bar-logo {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
+}
+#wp-admin-bar-user-info img.avatar {
+ height: 64px;
+ width: 64px;
}
View
5 plugins/buddypress/bp-core/deprecated/1.5.php
@@ -321,8 +321,9 @@ function groups_at_message_notification( $content, $poster_user_id, $group_id, $
if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
$poster_name = bp_core_get_user_displayname( $poster_user_id );
- $message_link = bp_activity_get_permalink( $activity_id );
- $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
+ $message_link = bp_activity_get_permalink( $activity_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $receiver_user_id ) . $settings_slug . '/notifications/';
$poster_name = stripslashes( $poster_name );
$content = bp_groups_filter_kses( stripslashes( $content ) );
View
4 plugins/buddypress/bp-forums/bp-forums-functions.php
@@ -542,8 +542,8 @@ function bp_forums_get_post_extras( $posts ) {
foreach ( (array)$poster_details as $poster ) {
if ( $poster->user_id == $posts[$i]->poster_id ) {
$posts[$i]->poster_email = $poster->user_email;
- $posts[$i]->poster_login = $poster->user_nicename;
- $posts[$i]->poster_nicename = $poster->user_login;
+ $posts[$i]->poster_login = $poster->user_login;
+ $posts[$i]->poster_nicename = $poster->user_nicename;
$posts[$i]->poster_name = $poster->display_name;
}
}
View
11 plugins/buddypress/bp-friends/bp-friends-notifications.php
@@ -14,9 +14,9 @@ function friends_notification_new_request( $friendship_id, $initiator_id, $frien
$initiator_ud = get_userdata( $initiator_id );
$all_requests_link = bp_core_get_user_domain( $friend_id ) . bp_get_friends_slug() . '/requests/';
- $settings_link = bp_core_get_user_domain( $friend_id ) . bp_get_settings_slug() . '/notifications';
-
- $initiator_link = bp_core_get_user_domain( $initiator_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $friend_id ) . $settings_slug . '/notifications';
+ $initiator_link = bp_core_get_user_domain( $initiator_id );
// Set up and send the message
$to = $ud->user_email;
@@ -57,8 +57,9 @@ function friends_notification_accepted_request( $friendship_id, $initiator_id, $
$ud = get_userdata( $initiator_id );
- $friend_link = bp_core_get_user_domain( $friend_id );
- $settings_link = bp_core_get_user_domain( $initiator_id ) . bp_get_settings_slug() . '/notifications';
+ $friend_link = bp_core_get_user_domain( $friend_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $initiator_id ) . $settings_slug . '/notifications';
// Set up and send the message
$to = $ud->user_email;
View
25 plugins/buddypress/bp-groups/bp-groups-notifications.php
@@ -18,8 +18,9 @@ function groups_notification_group_updated( $group_id ) {
// Set up and send the message
$to = $ud->user_email;
- $group_link = site_url( bp_get_groups_root_slug(). '/' . $group->slug );
- $settings_link = bp_core_get_user_domain( $user_id ) . bp_get_settings_slug() . '/notifications/';
+ $group_link = site_url( bp_get_groups_root_slug(). '/' . $group->slug );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $user_id ) . $settings_slug . '/notifications/';
$message = sprintf( __(
'Group details for the group "%1$s" were updated:
@@ -59,8 +60,9 @@ function groups_notification_new_membership_request( $requesting_user_id, $admin
$requesting_ud = bp_core_get_core_userdata($requesting_user_id);
$group_requests = bp_get_group_permalink( $group ) . 'admin/membership-requests';
- $profile_link = bp_core_get_user_domain( $requesting_user_id );
- $settings_link = bp_core_get_user_domain( $requesting_user_id ) . bp_get_settings_slug() . '/notifications/';
+ $profile_link = bp_core_get_user_domain( $requesting_user_id );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $requesting_user_id ) . $settings_slug . '/notifications/';
// Set up and send the message
$to = $ud->user_email;
@@ -108,8 +110,9 @@ function groups_notification_membership_request_completed( $requesting_user_id,
$ud = bp_core_get_core_userdata($requesting_user_id);
- $group_link = bp_get_group_permalink( $group );
- $settings_link = bp_core_get_user_domain( $requesting_user_id ) . bp_get_settings_slug() . '/notifications/';
+ $group_link = bp_get_group_permalink( $group );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $requesting_user_id ) . $settings_slug . '/notifications/';
// Set up and send the message
$to = $ud->user_email;
@@ -165,11 +168,11 @@ function groups_notification_promoted_member( $user_id, $group_id ) {
if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) )
return false;
- $group = new BP_Groups_Group( $group_id );
- $ud = bp_core_get_core_userdata($user_id);
-
- $group_link = bp_get_group_permalink( $group );
- $settings_link = bp_core_get_user_domain( $user_id ) . bp_get_settings_slug() . '/notifications/';
+ $group = new BP_Groups_Group( $group_id );
+ $ud = bp_core_get_core_userdata($user_id);
+ $group_link = bp_get_group_permalink( $group );
+ $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
+ $settings_link = bp_core_get_user_domain( $user_id ) . $settings_slug . '/notifications/';
// Set up and send the message
$to = $ud->user_email;
View
305 plugins/buddypress/bp-languages/buddypress.pot
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BuddyPress \n"
"Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
-"POT-Creation-Date: 2012-02-10 18:36:41+00:00\n"
+"POT-Creation-Date: 2012-03-13 21:36:22+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -21,7 +21,7 @@ msgid "There was an error when deleting that activity"
msgstr ""
#: bp-activity/bp-activity-actions.php:206
-#: bp-themes/bp-default/_inc/ajax.php:160
+#: bp-themes/bp-default/_inc/ajax.php:172
msgid "Please enter some content to post."
msgstr ""
@@ -34,7 +34,7 @@ msgid "There was an error when posting your update, please try again."
msgstr ""
#: bp-activity/bp-activity-actions.php:268
-#: bp-themes/bp-default/_inc/ajax.php:202
+#: bp-themes/bp-default/_inc/ajax.php:217
msgid "Please do not leave the comment area blank."
msgstr ""
@@ -43,8 +43,8 @@ msgid "Reply Posted!"
msgstr ""
#: bp-activity/bp-activity-actions.php:281
-#: bp-themes/bp-default/_inc/ajax.php:207
-#: bp-themes/bp-default/_inc/ajax.php:218
+#: bp-themes/bp-default/_inc/ajax.php:222
+#: bp-themes/bp-default/_inc/ajax.php:233
msgid "There was an error posting that reply, please try again."
msgstr ""
@@ -157,11 +157,11 @@ msgstr ""
msgid "My Activity"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:66
+#: bp-activity/bp-activity-notifications.php:67
msgid "%s mentioned you in an update"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:69 bp-core/deprecated/1.5.php:336
+#: bp-activity/bp-activity-notifications.php:70 bp-core/deprecated/1.5.php:337
msgid ""
"%1$s mentioned you in the group \"%2$s\":\n"
"\n"
@@ -172,7 +172,7 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:79
+#: bp-activity/bp-activity-notifications.php:80
msgid ""
"%1$s mentioned you in an update:\n"
"\n"
@@ -183,25 +183,25 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:90
-#: bp-activity/bp-activity-notifications.php:164
-#: bp-activity/bp-activity-notifications.php:209 bp-core/deprecated/1.5.php:346
+#: bp-activity/bp-activity-notifications.php:91
+#: bp-activity/bp-activity-notifications.php:166
+#: bp-activity/bp-activity-notifications.php:212 bp-core/deprecated/1.5.php:347
#: bp-friends/bp-friends-notifications.php:36
-#: bp-friends/bp-friends-notifications.php:76
-#: bp-groups/bp-groups-notifications.php:32
-#: bp-groups/bp-groups-notifications.php:83
-#: bp-groups/bp-groups-notifications.php:139
-#: bp-groups/bp-groups-notifications.php:187
-#: bp-groups/bp-groups-notifications.php:241
-#: bp-messages/bp-messages-notifications.php:44
+#: bp-friends/bp-friends-notifications.php:77
+#: bp-groups/bp-groups-notifications.php:33
+#: bp-groups/bp-groups-notifications.php:85
+#: bp-groups/bp-groups-notifications.php:142
+#: bp-groups/bp-groups-notifications.php:190
+#: bp-groups/bp-groups-notifications.php:244
+#: bp-messages/bp-messages-notifications.php:45
msgid "To disable these notifications please log in and go to: %s"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:152
+#: bp-activity/bp-activity-notifications.php:154
msgid "%s replied to one of your updates"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:154
+#: bp-activity/bp-activity-notifications.php:156
msgid ""
"%1$s replied to one of your updates:\n"
"\n"
@@ -212,11 +212,11 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:194
+#: bp-activity/bp-activity-notifications.php:197
msgid "%s replied to one of your comments"
msgstr ""
-#: bp-activity/bp-activity-notifications.php:199
+#: bp-activity/bp-activity-notifications.php:202
msgid ""
"%1$s replied to one of your comments:\n"
"\n"
@@ -583,7 +583,7 @@ msgstr ""
msgid "<a href=\"%1$s\">%2$s</a> is your new site. <a href=\"%3$s\">Login</a> as \"%4$s\" using your existing password."
msgstr ""
-#: bp-blogs/bp-blogs-template.php:587 bp-core/bp-core-filters.php:320
+#: bp-blogs/bp-blogs-template.php:587 bp-core/bp-core-filters.php:327
#: bp-themes/bp-default/blogs/create.php:21
#: bp-themes/bp-default/blogs/index.php:23
msgid "Create a Site"
@@ -601,7 +601,7 @@ msgstr ""
msgid "%s's Recent Comments"
msgstr ""
-#: bp-blogs/bp-blogs-template.php:617 bp-core/deprecated/1.5.php:396
+#: bp-blogs/bp-blogs-template.php:617 bp-core/deprecated/1.5.php:397
#: bp-forums/bp-forums-template.php:1313 bp-groups/bp-groups-template.php:2261
#: bp-members/bp-members-template.php:674 bp-themes/bp-default/header.php:35
#: bp-themes/bp-default/searchform.php:5
@@ -825,12 +825,12 @@ msgstr ""
msgid "Associate WordPress Pages with the following BuddyPress Registration pages."
msgstr ""
-#: bp-core/admin/bp-core-schema.php:208
+#: bp-core/admin/bp-core-schema.php:210
msgctxt "First XProfile group name"
msgid "Base"
msgstr ""
-#: bp-core/admin/bp-core-schema.php:209
+#: bp-core/admin/bp-core-schema.php:214
msgctxt "XProfile fullname field name"
msgid "Name"
msgstr ""
@@ -1158,7 +1158,7 @@ msgid "Installation was successful. The available options have now been updated,
msgstr ""
#: bp-core/admin/bp-core-update.php:1234 bp-core/bp-core-functions.php:252
-#: bp-members/bp-members-signup.php:572
+#: bp-members/bp-members-signup.php:583
msgid "BuddyPress"
msgstr ""
@@ -1334,11 +1334,11 @@ msgstr[1] ""
msgid "Are you sure?"
msgstr ""
-#: bp-core/bp-core-filters.php:163 bp-core/bp-core-filters.php:187
+#: bp-core/bp-core-filters.php:170 bp-core/bp-core-filters.php:194
msgid "[User Set]"
msgstr ""
-#: bp-core/bp-core-filters.php:206
+#: bp-core/bp-core-filters.php:213
msgid ""
"Thanks for registering! To complete the activation of your account and blog, please click the following link:\n"
"\n"
@@ -1351,11 +1351,11 @@ msgid ""
"%2$s"
msgstr ""
-#: bp-core/bp-core-filters.php:207
+#: bp-core/bp-core-filters.php:214
msgid "Activate %s"
msgstr ""
-#: bp-core/bp-core-filters.php:239 bp-members/bp-members-signup.php:574
+#: bp-core/bp-core-filters.php:246 bp-members/bp-members-signup.php:585
msgid ""
"Thanks for registering! To complete the activation of your account please click the following link:\n"
"\n"
@@ -1363,39 +1363,39 @@ msgid ""
"\n"
msgstr ""
-#: bp-core/bp-core-filters.php:240 bp-members/bp-members-signup.php:575
+#: bp-core/bp-core-filters.php:247 bp-members/bp-members-signup.php:586
msgid "Activate Your Account"
msgstr ""
#. translators: "displayed user's name | canonicalised component name"
#. translators: "group name | group nav section name"
-#: bp-core/bp-core-filters.php:286 bp-core/bp-core-filters.php:292
+#: bp-core/bp-core-filters.php:293 bp-core/bp-core-filters.php:299
msgid "%1$s | %2$s"
msgstr ""
#. translators: "component item name | component nav section name | root
#. component name"
-#: bp-core/bp-core-filters.php:297
+#: bp-core/bp-core-filters.php:304
msgid "%1$s | %2$s | %3$s"
msgstr ""
-#: bp-core/bp-core-filters.php:302 bp-core/bp-core-filters.php:304
+#: bp-core/bp-core-filters.php:309 bp-core/bp-core-filters.php:311
msgid "%s Directory"
msgstr ""
-#: bp-core/bp-core-filters.php:308
+#: bp-core/bp-core-filters.php:315
#: bp-themes/bp-default/registration/register.php:23
msgid "Create an Account"
msgstr ""
-#: bp-core/bp-core-filters.php:312
+#: bp-core/bp-core-filters.php:319
#: bp-themes/bp-default/registration/activate.php:24
msgid "Activate your Account"
msgstr ""
-#: bp-core/bp-core-filters.php:316 bp-themes/bp-default/groups/create.php:18
+#: bp-core/bp-core-filters.php:323 bp-themes/bp-default/groups/create.php:18
#: bp-themes/bp-default/groups/index.php:23
msgid "Create a Group"
msgstr ""
@@ -1416,80 +1416,80 @@ msgstr ""
msgid "Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %2$s. <a href=\"%1$s\" class=\"button-secondary\">Repair</a>"
msgstr ""
-#: bp-core/bp-core-functions.php:601
+#: bp-core/bp-core-functions.php:604
msgid "sometime"
msgstr ""
-#: bp-core/bp-core-functions.php:602
+#: bp-core/bp-core-functions.php:605
msgid "right now"
msgstr ""
-#: bp-core/bp-core-functions.php:603
+#: bp-core/bp-core-functions.php:606
msgid "%s ago"
msgstr ""
-#: bp-core/bp-core-functions.php:607
+#: bp-core/bp-core-functions.php:610
msgid "year"
msgstr ""
-#: bp-core/bp-core-functions.php:607
+#: bp-core/bp-core-functions.php:610
msgid "years"
msgstr ""
-#: bp-core/bp-core-functions.php:608
+#: bp-core/bp-core-functions.php:611
msgid "month"
msgstr ""
-#: bp-core/bp-core-functions.php:608
+#: bp-core/bp-core-functions.php:611
msgid "months"
msgstr ""
-#: bp-core/bp-core-functions.php:609
+#: bp-core/bp-core-functions.php:612
msgid "week"
msgstr ""
-#: bp-core/bp-core-functions.php:609
+#: bp-core/bp-core-functions.php:612
msgid "weeks"
msgstr ""
-#: bp-core/bp-core-functions.php:610
+#: bp-core/bp-core-functions.php:613
msgid "day"
msgstr ""
-#: bp-core/bp-core-functions.php:610
+#: bp-core/bp-core-functions.php:613
msgid "days"
msgstr ""
-#: bp-core/bp-core-functions.php:611
+#: bp-core/bp-core-functions.php:614
msgid "hour"
msgstr ""
-#: bp-core/bp-core-functions.php:611
+#: bp-core/bp-core-functions.php:614
msgid "hours"
msgstr ""
-#: bp-core/bp-core-functions.php:612
+#: bp-core/bp-core-functions.php:615
msgid "minute"
msgstr ""
-#: bp-core/bp-core-functions.php:612
+#: bp-core/bp-core-functions.php:615
msgid "minutes"
msgstr ""
-#: bp-core/bp-core-functions.php:613
+#: bp-core/bp-core-functions.php:616
msgid "second"
msgstr ""
-#: bp-core/bp-core-functions.php:613
+#: bp-core/bp-core-functions.php:616
msgid "seconds"
msgstr ""
-#: bp-core/bp-core-functions.php:670
+#: bp-core/bp-core-functions.php:673
msgctxt "Separator in time since"
msgid ","
msgstr ""
-#: bp-core/bp-core-functions.php:733
+#: bp-core/bp-core-functions.php:736
msgid "not recently active"
msgstr ""
@@ -1649,7 +1649,7 @@ msgstr ""
msgid "Yahoo Messenger"
msgstr ""
-#: bp-core/deprecated/1.5.php:334
+#: bp-core/deprecated/1.5.php:335
msgid "%1$s mentioned you in the group \"%2$s\""
msgstr ""
@@ -1901,7 +1901,7 @@ msgstr ""
msgid "Viewing post %1$s to %2$s (%3$s total posts)"
msgstr ""
-#: bp-friends/bp-friends-actions.php:29 bp-themes/bp-default/_inc/ajax.php:429
+#: bp-friends/bp-friends-actions.php:29 bp-themes/bp-default/_inc/ajax.php:465
msgid "Friendship could not be requested."
msgstr ""
@@ -1917,7 +1917,7 @@ msgstr ""
msgid "You already have a pending friendship request with this user"
msgstr ""
-#: bp-friends/bp-friends-actions.php:64 bp-themes/bp-default/_inc/ajax.php:419
+#: bp-friends/bp-friends-actions.php:64 bp-themes/bp-default/_inc/ajax.php:455
msgid "Friendship could not be canceled."
msgstr ""
@@ -1942,7 +1942,7 @@ msgid "%d friends accepted your friendship requests"
msgstr ""
#: bp-friends/bp-friends-activity.php:79
-#: bp-friends/bp-friends-notifications.php:66
+#: bp-friends/bp-friends-notifications.php:67
msgid "%s accepted your friendship request"
msgstr ""
@@ -2005,7 +2005,7 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-friends/bp-friends-notifications.php:68
+#: bp-friends/bp-friends-notifications.php:69
msgid ""
"%1$s accepted your friend request.\n"
"\n"
@@ -2086,7 +2086,7 @@ msgstr ""
#: bp-friends/bp-friends-template.php:323
#: bp-friends/bp-friends-template.php:324
-#: bp-themes/bp-default/_inc/ajax.php:431
+#: bp-themes/bp-default/_inc/ajax.php:467
msgid "Friendship Requested"
msgstr ""
@@ -2097,7 +2097,7 @@ msgstr ""
#: bp-friends/bp-friends-template.php:355
#: bp-friends/bp-friends-template.php:356
-#: bp-themes/bp-default/_inc/ajax.php:421
+#: bp-themes/bp-default/_inc/ajax.php:457
msgid "Add Friend"
msgstr ""
@@ -2340,7 +2340,7 @@ msgid "Admin"
msgstr ""
#: bp-groups/bp-groups-loader.php:314 bp-groups/bp-groups-template.php:1580
-#: bp-groups/bp-groups-template.php:1581 bp-themes/bp-default/_inc/ajax.php:506
+#: bp-groups/bp-groups-template.php:1581 bp-themes/bp-default/_inc/ajax.php:556
msgid "Request Membership"
msgstr ""
@@ -2373,7 +2373,7 @@ msgstr ""
msgid "Group Details Updated"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:24
+#: bp-groups/bp-groups-notifications.php:25
msgid ""
"Group details for the group \"%1$s\" were updated:\n"
"\n"
@@ -2382,11 +2382,11 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:68
+#: bp-groups/bp-groups-notifications.php:70
msgid "Membership request for group: %s"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:70
+#: bp-groups/bp-groups-notifications.php:72
msgid ""
"%1$s wants to join the group \"%2$s\".\n"
"\n"
@@ -2400,11 +2400,11 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:119
+#: bp-groups/bp-groups-notifications.php:122
msgid "Membership request for group \"%s\" accepted"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:120
+#: bp-groups/bp-groups-notifications.php:123
msgid ""
"Your membership request for the group \"%1$s\" has been accepted.\n"
"\n"
@@ -2413,11 +2413,11 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:129
+#: bp-groups/bp-groups-notifications.php:132
msgid "Membership request for group \"%s\" rejected"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:130
+#: bp-groups/bp-groups-notifications.php:133
msgid ""
"Your membership request for the group \"%1$s\" has been rejected.\n"
"\n"
@@ -2426,19 +2426,19 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:155
+#: bp-groups/bp-groups-notifications.php:158
msgid "an administrator"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:158
+#: bp-groups/bp-groups-notifications.php:161
msgid "a moderator"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:177
+#: bp-groups/bp-groups-notifications.php:180
msgid "You have been promoted in the group: \"%s\""
msgstr ""
-#: bp-groups/bp-groups-notifications.php:179
+#: bp-groups/bp-groups-notifications.php:182
msgid ""
"You have been promoted to %1$s for the group: \"%2$s\".\n"
"\n"
@@ -2447,11 +2447,11 @@ msgid ""
"---------------------\n"
msgstr ""
-#: bp-groups/bp-groups-notifications.php:227
+#: bp-groups/bp-groups-notifications.php:230
msgid "You have an invitation to the group: \"%s\""
msgstr ""
-#: bp-groups/bp-groups-notifications.php:229
+#: bp-groups/bp-groups-notifications.php:232
msgid ""
"One of your friends %1$s has invited you to the group: \"%2$s\".\n"
"\n"
@@ -2783,12 +2783,12 @@ msgid "New Topic"
msgstr ""
#: bp-groups/bp-groups-template.php:1539 bp-groups/bp-groups-template.php:1540
-#: bp-themes/bp-default/_inc/ajax.php:482
+#: bp-themes/bp-default/_inc/ajax.php:532
msgid "Leave Group"
msgstr ""
#: bp-groups/bp-groups-template.php:1562 bp-groups/bp-groups-template.php:1563
-#: bp-themes/bp-default/_inc/ajax.php:504
+#: bp-themes/bp-default/_inc/ajax.php:554
msgid "Join Group"
msgstr ""
@@ -2872,19 +2872,19 @@ msgstr ""
msgid "No groups matched the current filter."
msgstr ""
-#: bp-members/bp-members-actions.php:87
+#: bp-members/bp-members-actions.php:41
msgid "User marked as spammer. Spam users are visible only to site admins."
msgstr ""
-#: bp-members/bp-members-actions.php:89
+#: bp-members/bp-members-actions.php:43
msgid "User removed as spammer."
msgstr ""
-#: bp-members/bp-members-actions.php:136
+#: bp-members/bp-members-actions.php:76
msgid "%s has been deleted from the system."
msgstr ""
-#: bp-members/bp-members-actions.php:138
+#: bp-members/bp-members-actions.php:78
msgid "There was an error deleting %s from the system. Please try again."
msgstr ""
@@ -2965,7 +2965,7 @@ msgstr ""
msgid "Delete %s's Account"
msgstr ""
-#: bp-members/bp-members-functions.php:671
+#: bp-members/bp-members-functions.php:780
msgid "<strong>ERROR</strong>: Your account has been marked as a spammer."
msgstr ""
@@ -2989,59 +2989,59 @@ msgstr ""
msgid "This is a required field"
msgstr ""
-#: bp-members/bp-members-signup.php:199
+#: bp-members/bp-members-signup.php:207
msgid "Your account is now active!"
msgstr ""
-#: bp-members/bp-members-signup.php:308
+#: bp-members/bp-members-signup.php:319
msgid "Please enter a username"
msgstr ""
-#: bp-members/bp-members-signup.php:319
+#: bp-members/bp-members-signup.php:330
msgid "Only lowercase letters and numbers allowed"
msgstr ""
-#: bp-members/bp-members-signup.php:322
+#: bp-members/bp-members-signup.php:333
msgid "Username must be at least 4 characters"
msgstr ""
-#: bp-members/bp-members-signup.php:325
+#: bp-members/bp-members-signup.php:336
msgid "Sorry, usernames may not contain the character \"_\"!"
msgstr ""
-#: bp-members/bp-members-signup.php:332
+#: bp-members/bp-members-signup.php:343
msgid "Sorry, usernames must have letters too!"
msgstr ""
-#: bp-members/bp-members-signup.php:335
+#: bp-members/bp-members-signup.php:346
msgid "Please check your email address."
msgstr ""
-#: bp-members/bp-members-signup.php:338 bp-members/bp-members-signup.php:346
+#: bp-members/bp-members-signup.php:349 bp-members/bp-members-signup.php:357
msgid "Sorry, that email address is not allowed!"
msgstr ""
-#: bp-members/bp-members-signup.php:351
+#: bp-members/bp-members-signup.php:362
msgid "Sorry, that username already exists!"
msgstr ""
-#: bp-members/bp-members-signup.php:355
+#: bp-members/bp-members-signup.php:366
msgid "Sorry, that email address is already used!"
msgstr ""
-#: bp-members/bp-members-signup.php:394
+#: bp-members/bp-members-signup.php:405
msgid "<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href=\"mailto:%s\">webmaster</a> !"
msgstr ""
-#: bp-members/bp-members-signup.php:479 bp-members/bp-members-signup.php:483
+#: bp-members/bp-members-signup.php:490 bp-members/bp-members-signup.php:494
msgid "Invalid activation key"
msgstr ""
-#: bp-members/bp-members-signup.php:523
+#: bp-members/bp-members-signup.php:534
msgid "%s became a registered member"
msgstr ""
-#: bp-members/bp-members-signup.php:597
+#: bp-members/bp-members-signup.php:608
msgid "<strong>ERROR</strong>: Your account has not been activated. Check your email for the activation link."
msgstr ""
@@ -3121,7 +3121,7 @@ msgid "There was an error deleting messages."
msgstr ""
#: bp-messages/bp-messages-actions.php:104
-#: bp-themes/bp-default/_inc/ajax.php:609
+#: bp-themes/bp-default/_inc/ajax.php:676
msgid "Messages deleted."
msgstr ""
@@ -3194,11 +3194,11 @@ msgstr ""
msgid "My Messages"
msgstr ""
-#: bp-messages/bp-messages-notifications.php:30
+#: bp-messages/bp-messages-notifications.php:31
msgid "New message from %s"
msgstr ""
-#: bp-messages/bp-messages-notifications.php:32
+#: bp-messages/bp-messages-notifications.php:33
msgid ""
"%s sent you a new message:\n"
"\n"
@@ -3328,26 +3328,53 @@ msgid "%d Recipients"
msgstr ""
#: bp-messages/bp-messages-template.php:857
-#: bp-themes/bp-default/_inc/ajax.php:543
+#: bp-themes/bp-default/_inc/ajax.php:601
msgid "Sent %s"
msgstr ""
-#: bp-settings/bp-settings-actions.php:101
-#: bp-settings/bp-settings-actions.php:142
-#: bp-xprofile/bp-xprofile-screens.php:113
-msgid "Changes saved."
+#: bp-settings/bp-settings-actions.php:151
+msgid "That email address is invalid. Check the formatting and try again."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:154
+msgid "That email address is currently unavailable for use."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:157
+msgid "That email address is already taken."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:160
+msgid "Email address cannot be empty."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:170
+msgid "Your current password is invalid."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:173
+msgid "The new password fields did not match."
msgstr ""
-#: bp-settings/bp-settings-actions.php:104
-msgid "Your new passwords did not match."
+#: bp-settings/bp-settings-actions.php:176
+msgid "One of the password fields was empty."
msgstr ""
-#: bp-settings/bp-settings-actions.php:107
-msgid "Your existing password is incorrect."
+#: bp-settings/bp-settings-actions.php:185
+msgid "Your settings have been saved."
msgstr ""
-#: bp-settings/bp-settings-actions.php:110
-msgid "Sorry, that email address is already used or is invalid."
+#: bp-settings/bp-settings-actions.php:191
+msgid "No changes were made to your account."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:193
+msgid "No changes were made to this account."
+msgstr ""
+
+#: bp-settings/bp-settings-actions.php:232
+#: bp-xprofile/bp-xprofile-screens.php:113
+msgid "Changes saved."
msgstr ""
#: bp-settings/bp-settings-loader.php:92 bp-settings/bp-settings-loader.php:158
@@ -3362,78 +3389,78 @@ msgstr ""
msgid "We're sorry, but we can't find the page that you're looking for. Perhaps searching will help."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:177
+#: bp-themes/bp-default/_inc/ajax.php:189
msgid "There was a problem posting your update, please try again."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:275
-#: bp-themes/bp-default/_inc/ajax.php:310
+#: bp-themes/bp-default/_inc/ajax.php:293
+#: bp-themes/bp-default/_inc/ajax.php:332
msgid "There was a problem when deleting. Please try again."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:325
+#: bp-themes/bp-default/_inc/ajax.php:350
#: bp-themes/bp-default/activity/entry.php:72
#: bp-themes/bp-default/functions.php:158
msgid "Remove Favorite"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:334
+#: bp-themes/bp-default/_inc/ajax.php:362
#: bp-themes/bp-default/activity/entry.php:68
#: bp-themes/bp-default/functions.php:157
msgid "Favorite"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:393
+#: bp-themes/bp-default/_inc/ajax.php:425
#: bp-themes/bp-default/groups/create.php:234
#: bp-themes/bp-default/groups/single/send-invites.php:42
msgid "Remove Invite"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:434
+#: bp-themes/bp-default/_inc/ajax.php:470
msgid "Request Pending"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:446
+#: bp-themes/bp-default/_inc/ajax.php:487
msgid "There was a problem accepting that request. Please try again."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:457
+#: bp-themes/bp-default/_inc/ajax.php:503
msgid "There was a problem rejecting that request. Please try again."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:480
+#: bp-themes/bp-default/_inc/ajax.php:530
msgid "Error joining group"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:490
+#: bp-themes/bp-default/_inc/ajax.php:540
msgid "Error requesting membership"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:492
+#: bp-themes/bp-default/_inc/ajax.php:542
msgid "Membership Requested"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:501
+#: bp-themes/bp-default/_inc/ajax.php:551
msgid "Error leaving group"
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:518
+#: bp-themes/bp-default/_inc/ajax.php:572
msgid "There was a problem closing the notice."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:560
+#: bp-themes/bp-default/_inc/ajax.php:618
msgid "There was a problem sending that reply. Please try again."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:570
+#: bp-themes/bp-default/_inc/ajax.php:631
msgid "There was a problem marking messages as unread."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:586
+#: bp-themes/bp-default/_inc/ajax.php:650
msgid "There was a problem marking messages as read."
msgstr ""
-#: bp-themes/bp-default/_inc/ajax.php:602
+#: bp-themes/bp-default/_inc/ajax.php:669
msgid "There was a problem deleting messages."
msgstr ""
@@ -4145,7 +4172,7 @@ msgstr ""
#: bp-themes/bp-default/groups/single/forum/edit.php:60
#: bp-themes/bp-default/groups/single/forum/edit.php:76
#: bp-themes/bp-default/members/single/profile/edit.php:126
-#: bp-themes/bp-default/members/single/settings/general.php:69
+#: bp-themes/bp-default/members/single/settings/general.php:73
#: bp-themes/bp-default/members/single/settings/notifications.php:62
#: bp-xprofile/bp-xprofile-classes.php:274
msgid "Save Changes"
@@ -4504,31 +4531,31 @@ msgstr ""
msgid "General Settings"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:56
+#: bp-themes/bp-default/members/single/settings/general.php:58
msgid "Current Password <span>(required to update email or change current password)</span>"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:57
+#: bp-themes/bp-default/members/single/settings/general.php:59
msgid "Password Lost and Found"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:57
+#: bp-themes/bp-default/members/single/settings/general.php:59
msgid "Lost your password?"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:59
+#: bp-themes/bp-default/members/single/settings/general.php:63
msgid "Account Email"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:62
+#: bp-themes/bp-default/members/single/settings/general.php:66
msgid "Change Password <span>(leave blank for no change)</span>"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:63
+#: bp-themes/bp-default/members/single/settings/general.php:67
msgid "New Password"
msgstr ""
-#: bp-themes/bp-default/members/single/settings/general.php:64
+#: bp-themes/bp-default/members/single/settings/general.php:68
msgid "Repeat New Password"
msgstr ""
View
BIN  plugins/buddypress/bp-languages/default.mo
Binary file not shown
View
5,236 plugins/buddypress/bp-languages/default.po
5,236 additions, 0 deletions not shown
View
4 plugins/buddypress/bp-loader.php
@@ -4,7 +4,7 @@
* Plugin URI: http://buddypress.org
* Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
* Author: The BuddyPress Community
- * Version: 1.5.4
+ * Version: 1.5.5
* Author URI: http://buddypress.org/community/members/
* Network: true
*/
@@ -17,7 +17,7 @@
// Define the BuddyPress version
if ( !defined( 'BP_VERSION' ) )
- define( 'BP_VERSION', '1.5.4' );
+ define( 'BP_VERSION', '1.5.5' );
// Define the database version
if ( !defined( 'BP_DB_VERSION' ) )
View
76 plugins/buddypress/bp-members/bp-members-actions.php
@@ -11,15 +11,6 @@
if ( !defined( 'ABSPATH' ) ) exit;
/**
- * Listens to the $bp component and action variables to determine if the user is viewing the members
- * directory page. If they are, it will set up the directory and load the members directory template.
- *
- * @package BuddyPress Core
- * @global object $bp Global BuddyPress settings object
- * @uses wp_enqueue_script() Loads a JS script into the header of the page.
- * @uses bp_core_load_template() Loads a specific template file.
- */
-/**
* When a site admin selects "Mark as Spammer/Not Spammer" from the admin menu
* this action will fire and mark or unmark the user and their blogs as spam.
* Must be a site admin for this function to run.
@@ -29,82 +20,31 @@
* @global object $wpdb Global WordPress Database object
*/
function bp_core_action_set_spammer_status( $user_id = 0 ) {
- global $wpdb;
-
- // Only super admins can currently spam users
- if ( !is_super_admin() || bp_is_my_profile() )
- return;
// Use displayed user if it's not yourself
- if ( empty( $user_id ) && bp_is_user() )
- $user_id = bp_displayed_user_id();
-
- // Bail if no user ID
if ( empty( $user_id ) )
- return;
-
- // Bail if user ID is super admin
- if ( is_super_admin( $user_id ) )
- return;
+ $user_id = bp_displayed_user_id();
if ( bp_is_current_component( 'admin' ) && ( in_array( bp_current_action(), array( 'mark-spammer', 'unmark-spammer' ) ) ) ) {
// Check the nonce
check_admin_referer( 'mark-unmark-spammer' );
- // Get the functions file
- if ( is_multisite() ) {
- require( ABSPATH . 'wp-admin/includes/ms.php' );
- }
-
// To spam or not to spam
- $is_spam = bp_is_current_action( 'mark-spammer' ) ? 1 : 0;
+ $status = bp_is_current_action( 'mark-spammer' ) ? 'spam' : 'ham';
- // Get the blogs for the user
- $blogs = get_blogs_of_user( $user_id, true );
+ // The heavy lifting
+ bp_core_process_spammer_status( $user_id, $status );
- foreach ( (array) $blogs as $key => $details ) {
-
- // Do not mark the main or current root blog as spam
- if ( 1 == $details->userblog_id || bp_get_root_blog_id() == $details->userblog_id ) {
- continue;
- }
-
- // Update the blog status
- update_blog_status( $details->userblog_id, 'spam', $is_spam );
- }
-
- // Finally, mark this user as a spammer
- if ( is_multisite() ) {
- update_user_status( $user_id, 'spam', $is_spam );
- }
-
- // Always set single site status
- $wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array( 'ID' => $user_id ) );
-
- // Add feedback message
- if ( $is_spam ) {
+ // Add feedback message. @todo - Error reporting
+ if ( 'spam' == $status ) {
bp_core_add_message( __( 'User marked as spammer. Spam users are visible only to site admins.', 'buddypress' ) );
} else {
bp_core_add_message( __( 'User removed as spammer.', 'buddypress' ) );
}
- // Hide this user's activity
- if ( $is_spam && bp_is_active( 'activity' ) ) {
- bp_activity_hide_user_activity( $user_id );
- }
-
- // We need a special hook for is_spam so that components can delete data at spam time
- $bp_action = $is_spam ? 'bp_make_spam_user' : 'bp_make_ham_user';
- do_action( $bp_action, bp_displayed_user_id() );
-
- // Call multisite actions in single site mode for good measure
- if ( !is_multisite() ) {
- $wp_action = $is_spam ? 'make_spam_user' : 'make_ham_user';
- do_action( $wp_action, bp_displayed_user_id() );
- }
-
- // Allow plugins to do neat things
+ // Deprecated. Use bp_core_process_spammer_status.
+ $is_spam = 'spam' == $status;
do_action( 'bp_core_action_set_spammer_status', bp_displayed_user_id(), $is_spam );
// Redirect back to where we came from
View
113 plugins/buddypress/bp-members/bp-members-functions.php
@@ -407,7 +407,7 @@ function bp_core_get_user_displayname( $user_id_or_username ) {
if ( !$fullname = wp_cache_get( 'bp_user_fullname_' . $user_id, 'bp' ) ) {
if ( bp_is_active( 'xprofile' ) ) {
- $fullname = xprofile_get_field_data( stripslashes( $bp->site_options['bp-xprofile-fullname-field-name'] ), $user_id );
+ $fullname = xprofile_get_field_data( 1, $user_id );
if ( empty($fullname) ) {
$ud = bp_core_get_core_userdata( $user_id );
@@ -487,6 +487,115 @@ function bp_core_get_total_member_count() {
}
/**
+ * Processes a spammed or unspammed user
+ *
+ * This function is called in two ways:
+ * - in bp_core_action_set_spammer_status() (when spamming from the front-end)
+ * - by bp_core_mark_user_spam_admin() or bp_core_mark_user_ham_admin() (when spamming from the
+ * Dashboard)
+ *
+ * @since 1.5.5
+ *
+ * @param int $user_id The user being spammed/hammed
+ * @param string $status 'spam' if being marked as spam, 'ham' otherwise
+ */
+function bp_core_process_spammer_status( $user_id, $status ) {
+ global $wpdb;
+
+ // Only super admins can currently spam users
+ if ( !is_super_admin() || bp_is_my_profile() )
+ return;
+
+ // Bail if no user ID
+ if ( empty( $user_id ) )
+ return;
+
+ // Bail if user ID is super admin
+ if ( is_super_admin( $user_id ) )
+ return;
+
+ // Get the functions file
+ if ( is_multisite() ) {
+ require_once( ABSPATH . 'wp-admin/includes/ms.php' );
+ }
+
+ $is_spam = 'spam' == $status;
+
+ // Only you can prevent infinite loops
+ remove_action( 'make_spam_user', 'bp_core_mark_user_spam_admin' );
+ remove_action( 'make_ham_user', 'bp_core_mark_user_ham_admin' );
+
+ // When marking as spam in the Dashboard, these actions are handled by WordPress
+ if ( !is_admin() ) {
+ // Get the blogs for the user
+ $blogs = get_blogs_of_user( $user_id, true );
+
+ foreach ( (array) $blogs as $key => $details ) {
+
+ // Do not mark the main or current root blog as spam
+ if ( 1 == $details->userblog_id || bp_get_root_blog_id() == $details->userblog_id ) {
+ continue;
+ }
+
+ // Update the blog status
+ update_blog_status( $details->userblog_id, 'spam', $is_spam );
+ }
+
+ // Finally, mark this user as a spammer
+ if ( is_multisite() ) {
+ update_user_status( $user_id, 'spam', $is_spam );
+ }
+
+ // Always set single site status
+ $wpdb->update( $wpdb->users, array( 'user_status' => $is_spam ), array( 'ID' => $user_id ) );
+
+ // Call multisite actions in single site mode for good measure
+ if ( !is_multisite() ) {
+ $wp_action = $is_spam ? 'make_spam_user' : 'make_ham_user';
+ do_action( $wp_action, bp_displayed_user_id() );
+ }
+ }
+
+ // Hide this user's activity
+ if ( $is_spam && bp_is_active( 'activity' ) ) {
+ bp_activity_hide_user_activity( $user_id );
+ }
+
+ // We need a special hook for is_spam so that components can delete data at spam time
+ $bp_action = $is_spam ? 'bp_make_spam_user' : 'bp_make_ham_user';
+ do_action( $bp_action, $user_id );
+
+ // Allow plugins to do neat things
+ do_action( 'bp_core_process_spammer_status', $user_id, $is_spam );
+
+ return true;
+}
+
+/**
+ * Hook to WP's make_spam_user and run our custom BP spam functions
+ *
+ * @since 1.5.5
+ *
+ * @param int $user_id The user id passed from the make_spam_user hook
+ */
+function bp_core_mark_user_spam_admin( $user_id ) {
+ bp_core_process_spammer_status( $user_id, 'spam' );
+}
+add_action( 'make_spam_user', 'bp_core_mark_user_spam_admin' );
+
+/**
+ * Hook to WP's make_ham_user and run our custom BP spam functions
+ *
+ * @since 1.5.5
+ *
+ * @param int $user_id The user id passed from the make_ham_user hook
+ */
+function bp_core_mark_user_ham_admin( $user_id ) {
+ bp_core_process_spammer_status( $user_id, 'ham' );
+}
+add_action( 'make_ham_user', 'bp_core_mark_user_ham_admin' );
+
+/**
* Checks if the user has been marked as a spammer.
*
* @package BuddyPress Core
@@ -702,4 +811,4 @@ function bp_core_can_edit_settings() {
return false;
}
-?>
+?>
View
28 plugins/buddypress/bp-members/bp-members-signup.php
@@ -112,8 +112,11 @@ function bp_core_screen_signup() {
// Add any errors to the action for the field in the template for display.
if ( !empty( $bp->signup->errors ) ) {
- foreach ( (array)$bp->signup->errors as $fieldname => $error_message )
- add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo apply_filters(\'bp_members_signup_error_message\', "<div class=\"error\">' . $error_message . '</div>" );' ) );
+ foreach ( (array) $bp->signup->errors as $fieldname => $error_message ) {
+ // addslashes() and stripslashes() to avoid create_function()
+ // syntax errors when the $error_message contains quotes
+ add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo apply_filters(\'bp_members_signup_error_message\', "<div class=\"error\">" . stripslashes( \'' . addslashes( $error_message ) . '\' ) . "</div>" );' ) );
+ }
} else {
$bp->signup->step = 'save-details';
@@ -150,11 +153,16 @@ function bp_core_screen_signup() {
// Finally, sign up the user and/or blog
if ( isset( $_POST['signup_with_blog'] ) && is_multisite() )
- bp_core_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );
+ $wp_user_id = bp_core_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );
else
- bp_core_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta );
-
- $bp->signup->step = 'completed-confirmation';
+ $wp_user_id = bp_core_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta );
+
+ if ( is_wp_error( $wp_user_id ) ) {
+ $bp->signup->step = 'request-details';
+ bp_core_add_message( strip_tags( $wp_user_id->get_error_message() ), 'error' );
+ } else {
+ $bp->signup->step = 'completed-confirmation';
+ }
}
do_action( 'bp_complete_signup' );
@@ -304,6 +312,9 @@ function bp_core_validate_user_signup( $user_name, $user_email ) {
$errors = new WP_Error();
$user_email = sanitize_email( $user_email );
+ // Apply any user_login filters added by BP or other plugins before validating
+ $user_name = apply_filters( 'pre_user_login', $user_name );
+
if ( empty( $user_name ) )
$errors->add( 'user_name', __( 'Please enter a username', 'buddypress' ) );
@@ -390,7 +401,7 @@ function bp_core_signup_user( $user_login, $user_password, $user_email, $usermet
'user_email' => $user_email
) );
- if ( empty( $user_id ) ) {
+ if ( is_wp_error(