Changes from tags/1.1.1 at r2062 to tags/1.1.2 at r2062

Show
Ignore:
Location:
tags/1.1.2
Files:
21 modified

Legend:

Unmodified
Added
Removed
  • tags/1.1.2/bp-themes/bp-default/style.css

    r2039 r2060  
    33Theme URI: http://buddypress.org/extend/themes/ 
    44Description: The default theme for BuddyPress. 
    5 Version: 1.1.1 
     5Version: 1.1.2 
    66Author: BuddyPress.org 
    77Author URI: http://buddypress.org 
  • tags/1.1.2/bp-themes/bp-sn-parent/style.css

    r2039 r2060  
    33Theme URI: http://buddypress.org/extend/themes/ 
    44Description: The social network parent theme for BuddyPress. This theme should not be activated and used directly. BuddyPress themes can be downloaded at: <a href="http://buddypress.org/extend/themes/">http://buddypress.org/extend/themes/</a> 
    5 Version: 1.1.1 
     5Version: 1.1.2 
    66Author: BuddyPress.org 
    77Author URI: http://buddypress.org 
  • tags/1.1.2/bp-themes/bp-sn-parent/wire/post-list.php

    r1905 r2050  
    5959                 
    6060                <?php do_action( 'bp_after_wire_post_list' ) ?> 
    61          
     61 
     62                <input type="hidden" name="bp_wire_item_id" id="bp_wire_item_id" value="<?php echo bp_get_wire_item_id() ?>" />  
    6263        </div> 
    6364        <?php else: ?> 
  • tags/1.1.2/bp-themes/bp-sn-parent/wire/post-form.php

    r1905 r2050  
    3838                         
    3939                        <input type="submit" name="wire-post-submit" id="wire-post-submit" value="<?php _e( 'Post &raquo;', 'buddypress' ) ?>" /> 
    40                         <input type="hidden" name="bp_wire_item_id" id="bp_wire_item_id" value="<?php echo bp_get_wire_item_id() ?>" /> 
    4140 
    4241                        <?php wp_nonce_field( 'bp_wire_post' ) ?> 
  • tags/1.1.2/bp-themes/bp-sn-parent/_inc/js/ajax.js

    r2031 r2051  
    7979                        page = page.split('upage='); 
    8080                         
    81                         if ( !j("input#selected_letter").val() ) 
     81                        if ( undefined === j("input#selected_letter").val() ) 
    8282                                var letter = ''; 
    8383                        else 
    8484                                var letter = j("input#selected_letter").val(); 
    8585                                                 
    86                         if ( !j("input#search_terms").val() ) 
     86                        if ( undefined === j("input#search_terms").val() ) 
    8787                                var search_terms = ''; 
    8888                        else 
     
    333333                        page = page.split('gpage='); 
    334334                         
    335                         if ( !j("input#selected_letter").val() ) 
     335                        if ( undefined === j("input#selected_letter").val() ) 
    336336                                var letter = ''; 
    337337                        else 
    338338                                var letter = j("input#selected_letter").val(); 
    339339                                                 
    340                         if ( !j("input#search_terms").val() ) 
     340                        if ( undefined === j("input#search_terms").val() ) 
    341341                                var search_terms = ''; 
    342342                        else 
     
    973973        ); 
    974974 
    975         j("form#status-update-form").livequery('submit',  
    976                 function() { 
    977                         j.post( ajaxurl, { 
    978                                 action: 'status_new_status', 
    979                                 'cookie': encodeURIComponent(document.cookie), 
    980                                 '_wpnonce': j('input#_wpnonce_add_status').val(), 
    981                                 'status-update-input': j('#status-update-input').val() 
    982                         }, 
    983                         function(response) { 
    984                                 if ( response == "1" ) {                         
    985                                         j("div#user-status").slideUp(400, 
    986                                                 function() { 
    987                                                         j.post( ajaxurl, { 
    988                                                                 action: 'status_show_status', 
    989                                                                 'cookie': encodeURIComponent(document.cookie) 
    990                                                         }, 
    991                                                         function(response) {                             
    992                                                                 j("div#user-status").html(response); 
    993                                                                 j("div#user-status").slideDown(400); 
    994                                                                 j(window).unbind('click'); 
    995                                                         }); 
    996                                                 }  
    997                                         ); 
    998                                 } 
    999                         }); 
    1000  
    1001                         return false; 
    1002                 } 
    1003         ); 
    1004  
    1005975        j("a#status-clear-status").livequery('click',  
    1006976                function() { 
     
    10941064                        page = page.split('bpage='); 
    10951065                         
    1096                         if ( !j("input#selected_letter").val() ) 
     1066                        if ( undefined === j("input#selected_letter").val() ) 
    10971067                                var letter = ''; 
    10981068                        else 
    10991069                                var letter = j("input#selected_letter").val(); 
    11001070                                                 
    1101                         if ( !j("input#search_terms").val() ) 
     1071                        if ( undefined === j("input#search_terms").val() ) 
    11021072                                var search_terms = ''; 
    11031073                        else 
  • tags/1.1.2/bp-core/bp-core-signup.php

    r1977 r2045  
    117117                                if ( 'blog' == $active_signup || 'all' == $active_signup ) { 
    118118                                        $usermeta['public'] = ( 'public' == $_POST['signup_blog_privacy'] ) ? true : false; 
    119                                         $usermeta['blogname'] = $_POST['signup_blog_url']; 
    120                                         $usermeta['blog_title'] = $_POST['signup_blog_title']; 
    121119                                } 
    122120                                 
  • tags/1.1.2/bp-core/bp-core-classes.php

    r2005 r2052  
    220220                        return false; 
    221221                 
    222                 like_escape($letter); 
     222                $letter = like_escape( $wpdb->escape( $letter ) ); 
    223223 
    224224                $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT DISTINCT count(u.ID) FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ), $letter ); 
     
    240240                        $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
    241241                 
    242                 like_escape($search_terms);      
     242                $search_terms = like_escape( $wpdb->escape( $search_terms ) );   
    243243 
    244244                $total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT DISTINCT count(u.ID) as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pd.value LIKE '%%$search_terms%%' ORDER BY pd.value ASC", $search_terms ); 
  • tags/1.1.2/bp-core/bp-core-settings.php

    r1990 r2057  
    154154/**** DELETE ACCOUNT ****/ 
    155155 
    156 function bp_core_screen_delete_account() { 
    157         global $current_user, $bp_settings_updated, $pass_error; 
    158          
    159         if ( isset( $_POST['delete-account-button'] ) ) { 
     156function bp_core_screen_delete_account() {       
     157        if ( isset( $_POST['delete-account-understand'] ) ) { 
    160158                check_admin_referer( 'delete-account' ); 
    161                  
     159 
    162160                // delete the users account 
    163161                if ( bp_core_delete_account() ) 
    164162                        bp_core_redirect( site_url() ); 
    165         } 
    166          
    167         $bp_settings_updated = false; 
    168         $pass_error = false; 
    169          
    170         if ( isset($_POST['submit']) ) { 
    171                 check_admin_referer('bp_settings_general'); 
    172                  
    173                 require_once( WPINC . '/registration.php' ); 
    174                  
    175                 // Form has been submitted and nonce checks out, lets do it. 
    176                  
    177                 if ( $_POST['email'] != '' ) { 
    178                         $current_user->user_email = wp_specialchars( trim( $_POST['email'] )); 
    179                 } 
    180  
    181                 if ( $_POST['pass1'] != '' && $_POST['pass2'] != '' ) { 
    182                         if ( $_POST['pass1'] == $_POST['pass2'] && !strpos( " " . $_POST['pass1'], "\\" ) ) { 
    183                                 $current_user->user_pass = $_POST['pass1']; 
    184                         } else { 
    185                                 $pass_error = true; 
    186                         } 
    187                 } else if ( empty( $_POST['pass1'] ) && !empty( $_POST['pass2'] ) || !empty( $_POST['pass1'] ) && empty( $_POST['pass2'] ) ) { 
    188                         $pass_error = true; 
    189                 } else { 
    190                         unset( $current_user->user_pass ); 
    191                 } 
    192                  
    193                 if ( !$pass_error && wp_update_user( get_object_vars( $current_user ) ) ) 
    194                         $bp_settings_updated = true; 
    195163        } 
    196164         
  • tags/1.1.2/bp-xprofile/deprecated/bp-xprofile-deprecated.php

    r2025 r2045  
    677677                'public' => $_POST['blog_public'], 
    678678                'lang_id' => 1, // deprecated 
    679                 'blogname' => $_POST['blogname'], 
    680                 'blog_title' => $_POST['blog_title'] 
    681679        ); 
    682680         
  • tags/1.1.2/bp-xprofile/bp-xprofile-templatetags.php

    r1978 r2056  
    470470                         
    471471                        case 'datebox': 
    472                          
    473                                 if ( $field->data->value != '' ) { 
     472 
     473                                if ( !empty( $field->data->value ) ) { 
    474474                                        $day = date("j", $field->data->value); 
    475475                                        $month = date("F", $field->data->value); 
  • tags/1.1.2/bp-friends/bp-friends-classes.php

    r1905 r2052  
    150150                        $user_id = $bp->loggedin_user->id; 
    151151                 
    152                 like_escape($filter); 
     152                $filter = like_escape( $wpdb->escape( $filter ) ); 
    153153                 
    154154                if ( $limit && $page ) 
     
    222222                global $wpdb, $bp; 
    223223                 
    224                 like_escape($filter); 
     224                $filter = like_escape( $wpdb->escape( $filter ) ); 
    225225                $usermeta_table = $wpdb->base_prefix . 'usermeta'; 
    226226                $users_table = $wpdb->base_prefix . 'users'; 
     
    247247                global $wpdb, $bp; 
    248248                 
    249                 like_escape($filter); 
     249                $filter = like_escape( $wpdb->escape( $filter ) ); 
    250250                $usermeta_table = $wpdb->prefix . 'usermeta'; 
    251251                $users_table = $wpdb->base_prefix . 'users'; 
  • tags/1.1.2/bp-loader.php

    r2039 r2060  
    55Description: BuddyPress will add social networking features to a new or existing WordPress MU installation. 
    66Author: The BuddyPress Community 
    7 Version: 1.1.1 
     7Version: 1.1.2 
    88Author URI: http://buddypress.org/developers/ 
    99Site Wide Only: true 
    1010*/ 
    1111 
    12 define( 'BP_VERSION', '1.1.1' ); 
     12define( 'BP_VERSION', '1.1.2' ); 
    1313 
    1414/*** 
  • tags/1.1.2/bp-blogs.php

    r1995 r2054  
    309309} 
    310310 
    311 function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) { 
     311function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = true ) { 
    312312        global $bp; 
    313313         
     
    329329         
    330330        /* Only record this activity if the blog is public */ 
    331         if ( (int)$_POST['blog_public'] && !$no_activity ) {     
     331        if ( (int)$_POST['blog_public'] || !$no_activity ) { 
    332332                /* Record this in activity streams */ 
    333333                bp_blogs_record_activity( array( 
     
    352352        if ( !$user_id ) 
    353353                $user_id = (int)$post->post_author; 
    354  
    355354         
    356355        /* This is to stop infinate loops with Donncha's sitewide tags plugin */ 
    357         if ( (int)get_site_option('tags_blog_id') == (int)$blog_id ) 
     356        if ( (int)get_site_option( 'tags_blog_id' ) == (int)$blog_id ) 
    358357                return false; 
    359358         
     
    375374                        bp_blogs_update_blogmeta( $recorded_post->blog_id, 'last_activity', time() ); 
    376375 
    377                         $post_permalink = bp_post_get_permalink( $post, $blog_id ); 
    378  
    379                         $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); 
    380                         $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>"; 
     376                        if ( (int)get_blog_option( $blog_id, 'blog_public' ) ) { 
     377                                /* Record this in activity streams */ 
     378                                $post_permalink = bp_post_get_permalink( $post, $blog_id ); 
     379 
     380                                $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); 
     381                                $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>"; 
    381382                         
    382                         /* Record this in activity streams */ 
    383                         bp_blogs_record_activity( array( 
    384                                 'user_id' => (int)$post->post_author, 
    385                                 'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),  
    386                                 'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ), 
    387                                 'component_action' => 'new_blog_post', 
    388                                 'item_id' => $recorded_post_id, 
    389                                 'recorded_time' => strtotime( $post->post_date ) 
    390                         ) ); 
     383                                bp_blogs_record_activity( array( 
     384                                        'user_id' => (int)$post->post_author, 
     385                                        'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),  
     386                                        'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ), 
     387                                        'component_action' => 'new_blog_post', 
     388                                        'item_id' => $recorded_post_id, 
     389                                        'recorded_time' => strtotime( $post->post_date ) 
     390                                )); 
     391                        } 
    391392                } 
    392393        } else { 
     
    408409                        bp_blogs_record_post( $post_id );                                
    409410                } 
    410                  
    411                 /* Now re-record the post in the activity streams */             
    412                 $post_permalink = bp_post_get_permalink( $post, $blog_id ); 
    413                  
    414  
    415                 $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); 
    416                 $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>"; 
    417                  
    418                 /* Record this in activity streams */ 
    419                 bp_blogs_record_activity( array( 
    420                         'user_id' => (int)$post->post_author, 
    421                         'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),  
    422                         'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ), 
    423                         'component_action' => 'new_blog_post', 
    424                         'item_id' => $existing_post->id, 
    425                         'recorded_time' => strtotime( $post->post_date ) 
    426                 ) ); 
     411 
     412                if ( (int)get_blog_option( $blog_id, 'blog_public' ) ) { 
     413                        /* Now re-record the post in the activity streams */             
     414                        $post_permalink = bp_post_get_permalink( $post, $blog_id ); 
     415 
     416                        $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); 
     417                        $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>"; 
     418                 
     419                        /* Record this in activity streams */ 
     420                        bp_blogs_record_activity( array( 
     421                                'user_id' => (int)$post->post_author, 
     422                                'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),  
     423                                'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ), 
     424                                'component_action' => 'new_blog_post', 
     425                                'item_id' => $existing_post->id, 
     426                                'recorded_time' => strtotime( $post->post_date ) 
     427                        ) ); 
     428                } 
    427429        } 
    428430 
     
    458460        bp_blogs_update_blogmeta( $recorded_comment->blog_id, 'last_activity', time() ); 
    459461 
    460         $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id ); 
    461         $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                  
    462         $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>'; 
    463  
    464         /* Record this in activity streams */ 
    465         bp_blogs_record_activity( array( 
    466                 'user_id' => $recorded_comment->user_id, 
    467                 'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),  
    468                 'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ), 
    469                 'component_action' => 'new_blog_comment', 
    470                 'item_id' => $comment_id, 
    471                 'secondary_item_id' => $recorded_comment->blog_id, 
    472                 'recorded_time' =>  $recorded_comment->date_created 
    473         ) ); 
    474          
     462        if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) ) { 
     463                /* Record in activity streams */ 
     464                $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id ); 
     465                $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                  
     466                $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>'; 
     467 
     468                /* Record this in activity streams */ 
     469                bp_blogs_record_activity( array( 
     470                        'user_id' => $recorded_comment->user_id, 
     471                        'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),  
     472                        'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ), 
     473                        'component_action' => 'new_blog_comment', 
     474                        'item_id' => $comment_id, 
     475                        'secondary_item_id' => $recorded_comment->blog_id, 
     476                        'recorded_time' =>  $recorded_comment->date_created 
     477                ) ); 
     478        } 
     479 
    475480        return $recorded_comment; 
    476481} 
     
    489494        bp_blogs_delete_activity( array( 'item_id' => $comment_id, 'secondary_item_id' => $recorded_comment->blog_id, 'component_name' => $bp->blogs->slug, 'component_action' => 'new_blog_comment' ) ); 
    490495 
    491         $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id ); 
    492         $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $recorded_comment->user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                        
    493         $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>'; 
    494  
    495         /* Record this in activity streams */ 
    496         bp_blogs_record_activity( array( 
    497                 'user_id' => $recorded_comment->user_id, 
    498                 'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),  
    499                 'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ), 
    500                 'component_action' => 'new_blog_comment', 
    501                 'item_id' => $comment_id, 
    502                 'secondary_item_id' => $recorded_comment->blog_id, 
    503                 'recorded_time' =>  $recorded_comment->date_created  
    504         ) ); 
     496        if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) ) { 
     497                /* Record in activity streams */ 
     498                $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id ); 
     499                $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $recorded_comment->user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                        
     500                $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>'; 
     501 
     502                /* Record this in activity streams */ 
     503                bp_blogs_record_activity( array( 
     504                        'user_id' => $recorded_comment->user_id, 
     505                        'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),  
     506                        'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ), 
     507                        'component_action' => 'new_blog_comment', 
     508                        'item_id' => $comment_id, 
     509                        'secondary_item_id' => $recorded_comment->blog_id, 
     510                        'recorded_time' =>  $recorded_comment->date_created  
     511                ) ); 
     512        } 
    505513} 
    506514add_action( 'wp_set_comment_status', 'bp_blogs_approve_comment', 10, 2 ); 
     
    514522function bp_blogs_add_user_to_blog( $user_id, $role, $blog_id ) { 
    515523        if ( $role != 'subscriber' ) { 
    516                 bp_blogs_record_blog( $blog_id, $user_id, $no_activity = true ); 
     524                bp_blogs_record_blog( $blog_id, $user_id ); 
    517525        } 
    518526} 
  • tags/1.1.2/bp-activity/bp-activity-filters.php

    r1925 r2052  
    33/* Apply WordPress defined filters */ 
    44add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 ); 
     5add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 ); 
     6 
    57add_filter( 'bp_get_activity_content', 'force_balance_tags' ); 
    68add_filter( 'bp_get_activity_content', 'wptexturize' ); 
  • tags/1.1.2/bp-activity/bp-activity-templatetags.php

    r1980 r2052  
    352352                        else 
    353353                                unset($selected); 
     354                         
     355                        $component_name = attribute_escape( $component_name ); 
    354356 
    355357                        switch ( $style ) { 
     
    379381                        $translatable_component_names = array( __( 'profile', 'buddypress'), __( 'friends', 'buddypress' ), __( 'groups', 'buddypress' ), __( 'status', 'buddypress' ), __( 'blogs', 'buddypress' ) ); 
    380382                         
    381                         $component_links[] = $before . '<a href="' . $link . '">' . ucwords( __( $component_name, 'buddypress' ) ) . '</a>' . $after; 
     383                        $component_links[] = $before . '<a href="' . attribute_escape( $link ) . '">' . ucwords( __( $component_name, 'buddypress' ) ) . '</a>' . $after; 
    382384                } 
    383385 
     
    385387 
    386388                if ( isset( $_GET['afilter'] ) ) 
    387                         $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . $link . '"">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>'; 
     389                        $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . attribute_escape( $link ) . '"">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>'; 
    388390                 
    389391                return apply_filters( 'bp_get_activity_filter_links', implode( "\n", $component_links ) ); 
  • tags/1.1.2/bp-blogs/bp-blogs-classes.php

    r1905 r2052  
    181181                        bp_blogs_setup_globals(); 
    182182                 
    183                 like_escape($letter); 
     183                $letter = like_escape( $wpdb->escape( $letter ) ); 
    184184                                 
    185185                if ( $limit && $page ) { 
     
    199199                        bp_blogs_setup_globals(); 
    200200                 
    201                 like_escape($filter); 
     201                $filter = like_escape( $wpdb->escape( $filter ) ); 
    202202                 
    203203                if ( $limit && $page ) { 
  • tags/1.1.2/readme.txt

    r2039 r2060  
    44Requires at least: WordPress MU 2.8.4 
    55Tested up to: WordPress MU 2.8.4 
    6 Stable tag: 1.1.1 
     6Stable tag: 1.1.2 
    77 
    88BuddyPress is a suite of WordPress MU social networking plugins and themes. 
  • tags/1.1.2/bp-core.php

    r2035 r2058  
    6666if ( !defined( 'BP_HOME_BLOG_SLUG' ) ) 
    6767        define( 'BP_HOME_BLOG_SLUG', 'blog' ); 
     68         
     69/* Register BuddyPress themes contained within the theme folder */ 
     70if ( function_exists( 'register_theme_folder' ) ) 
     71        register_theme_folder( 'buddypress/bp-themes' ); 
    6872 
    6973 
     
    626630        ); 
    627631 
     632        /*** 
     633         * If this nav item is hidden for the displayed user, and 
     634         * the logged in user is not the displayed user 
     635         * looking at their own profile, don't create the nav item. 
     636         */ 
     637        if ( !$show_for_displayed_user && !bp_is_home() ) 
     638                return false; 
     639                 
    628640        /*** 
    629          * If we are not viewing a user, and this is a root component, don't attach the 
    630          * default subnav function so we can display a directory or something else. 
    631          */ 
     641         * If we are not viewing a user, and this is a root component, don't attach the 
     642         * default subnav function so we can display a directory or something else. 
     643         */ 
    632644        if ( bp_core_is_root_component( $slug ) && !$bp->displayed_user->id ) 
    633645                return; 
     
    15341546 
    15351547        /* Make sure account deletion is not disabled */ 
    1536         if ( ( !(int) get_site_option( 'bp-disable-account-deletion' ) && !is_site_admin() ) ) 
     1548        if ( ( '' != get_site_option( 'bp-disable-account-deletion' ) || (int) get_site_option( 'bp-disable-account-deletion' ) ) && !is_site_admin() ) 
    15371549                return false; 
    15381550 
     
    17041716} 
    17051717 
     1718/** 
     1719 * bp_core_boot_spammer() 
     1720 * 
     1721 * When a user logs in, check if they have been marked as a spammer. If then simply 
     1722 * redirect them to the home page and stop them from logging in. 
     1723 *  
     1724 * @package BuddyPress Core 
     1725 * @param $username The username of the user 
     1726 * @uses delete_usermeta() deletes a row from the wp_usermeta table based on meta_key 
     1727 */ 
     1728function bp_core_boot_spammer( $auth_obj, $username ) { 
     1729        global $bp; 
     1730         
     1731        $user = get_userdatabylogin( $username ); 
     1732 
     1733        if ( (int)$user->spam ) 
     1734                bp_core_redirect( $bp->root_domain ); 
     1735} 
     1736add_filter( 'authenticate', 'bp_core_boot_spammer', 11, 2 ); 
    17061737 
    17071738/** 
  • tags/1.1.2/bp-xprofile.php

    r1995 r2056  
    328328                /* Loop through the posted fields formatting any datebox values then validate the field */ 
    329329                foreach ( $posted_field_ids as $field_id ) {             
    330                          
     330 
    331331                        if ( !isset( $_POST['field_' . $field_id] ) ) { 
    332                                  
    333                                 if ( isset( $_POST['field_' . $field_id . '_day'] ) ) { 
     332 
     333                                if ( is_numeric( $_POST['field_' . $field_id . '_day'] ) ) { 
    334334                                        /* Concatenate the values. */ 
    335335                                        $date_value = $_POST['field_' . $field_id . '_day'] . ' ' .   
    336336                                                              $_POST['field_' . $field_id . '_month'] . ' ' . 
    337337                                                                  $_POST['field_' . $field_id . '_year']; 
    338                                                  
     338 
    339339                                        /* Turn the concatenated value into a timestamp */ 
    340340                                        $_POST['field_' . $field_id] = strtotime( $date_value ); 
    341341                                } 
    342                                  
     342 
    343343                        } 
    344                          
     344 
    345345                        if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST['field_' . $field_id] ) ) 
    346346                                $errors = true; 
    347347                } 
    348                  
     348 
    349349                if ( $errors ) 
    350350                        bp_core_add_message( __( 'Please make sure you fill in all required fields in this profile field group before saving.', 'buddypress' ), 'error' );                       
  • tags/1.1.2/bp-groups/bp-groups-classes.php

    r1929 r2052  
    247247                        $user_id = $bp->displayed_user->id; 
    248248                 
    249                 like_escape($filter); 
     249                $filter = like_escape( $wpdb->escape( $filter ) ); 
    250250                 
    251251                if ( $limit && $page ) 
     
    269269                global $wpdb, $bp; 
    270270                 
    271                 like_escape($filter); 
     271                $filter = like_escape( $wpdb->escape( $filter ) ); 
    272272                 
    273273                if ( $limit && $page ) 
     
    463463                        $hidden_sql = $wpdb->prepare( " AND status != 'hidden'"); 
    464464                 
    465                 like_escape($letter); 
    466                                  
     465                $letter = like_escape( $wpdb->escape( $letter ) ); 
     466 
    467467                if ( $limit && $page ) { 
    468468                        $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 
     
    699699 
    700700                if ( $filter ) { 
    701                         like_escape($filter); 
     701                        $filter = like_escape( $wpdb->escape( $filter ) ); 
    702702                        $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                  
    703703                } 
     
    719719 
    720720                if ( $filter ) { 
    721                         like_escape($filter); 
     721                        like_escape( $wpdb->escape( $filter ) ); 
    722722                        $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                  
    723723                } 
     
    739739                         
    740740                if ( $filter ) { 
    741                         like_escape($filter); 
     741                        $filter = like_escape( $wpdb->escape( $filter ) ); 
    742742                        $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                  
    743743                } 
     
    759759 
    760760                if ( $filter ) { 
    761                         like_escape($filter); 
     761                        $filter = like_escape( $wpdb->escape( $filter ) ); 
    762762                        $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                  
    763763                } 
     
    779779 
    780780                if ( $filter ) { 
    781                         like_escape($filter); 
     781                        $filter = like_escape( $wpdb->escape( $filter ) ); 
    782782                        $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                  
    783783                } 
     
    799799 
    800800                if ( $filter ) { 
    801                         like_escape($filter); 
     801                        $filter = like_escape( $wpdb->escape( $filter ) ); 
    802802                        $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                  
    803803                } 
  • tags/1.1.2/bp-groups/bp-groups-templatetags.php

    r2032 r2053  
    16501650        function bp_get_new_group_description() { 
    16511651                global $bp; 
    1652                 return apply_filters( 'bp_get_new_group_description', $bp->groups->current_group->name ); 
     1652                return apply_filters( 'bp_get_new_group_description', $bp->groups->current_group->description ); 
    16531653        } 
    16541654 
     
    16581658        function bp_get_new_group_news() { 
    16591659                global $bp; 
    1660                 return apply_filters( 'bp_get_new_group_news', $bp->groups->current_group->name ); 
     1660                return apply_filters( 'bp_get_new_group_news', $bp->groups->current_group->news ); 
    16611661        } 
    16621662