Changeset 3365
- Timestamp:
- 11/06/2010 07:04:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r3337 r3365 247 247 $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id . '/'; 248 248 } 249 } else 249 } else { 250 250 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id; 251 } 251 252 252 253 $redirect = apply_filters( 'bp_activity_permalink_redirect_url', $redirect, &$activity ); -
trunk/bp-activity/bp-activity-classes.php
r3345 r3365 179 179 return false; 180 180 181 $pag_sql = ''; 181 182 if ( $per_page && $page ) 182 183 $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page ), intval( $per_page ) ); … … 337 338 global $bp, $wpdb; 338 339 340 $activity_comments = array(); 341 339 342 /* Now fetch the activity comments and parse them into the correct position in the activities array. */ 340 343 foreach( (array)$activities as $activity ) { … … 345 348 /* Merge the comments with the activity items */ 346 349 foreach( (array)$activities as $key => $activity ) 347 $activities[$key]->children = $activity_comments[$activity->id]; 350 if ( isset( $activity_comments[$activity->id] ) ) 351 $activities[$key]->children = $activity_comments[$activity->id]; 348 352 349 353 return $activities; -
trunk/bp-activity/bp-activity-templatetags.php
r3337 r3365 642 642 global $activities_template, $bp; 643 643 644 if ( ! $activities_template->activity->children )644 if ( !isset( $activities_template->activity->children ) || !$activities_template->activity->children ) 645 645 return false; 646 646 … … 690 690 global $activities_template, $bp; 691 691 692 if ( ! $activities_template->activity->children )692 if ( !isset( $activities_template->activity->children ) || !$activities_template->activity->children ) 693 693 return 0; 694 694 … … 724 724 function bp_get_activity_comment_form_nojs_display() { 725 725 global $activities_template; 726 if ( $_GET['ac'] == $activities_template->activity->id . '/' )726 if ( isset( $_GET['ac'] ) && $_GET['ac'] == $activities_template->activity->id . '/' ) 727 727 return 'style="display: block"'; 728 728 … … 932 932 return false; 933 933 934 return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug . '/?r=' . bp_core_get_username( $bp->displayed_user-> user_id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );934 return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug . '/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ); 935 935 } 936 936 -
trunk/bp-core.php
r3358 r3365 1341 1341 global $bp; 1342 1342 1343 if ( $bp->template_message ) {1343 if ( isset( $bp->template_message ) && $bp->template_message ) { 1344 1344 $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error'; 1345 1345 ?> … … 1937 1937 function bp_core_add_ajax_hook() { 1938 1938 /* Theme only, we already have the wp_ajax_ hook firing in wp-admin */ 1939 if ( !defined( 'WP_ADMIN' ) )1939 if ( !defined( 'WP_ADMIN' ) && isset( $_REQUEST['action'] ) ) 1940 1940 do_action( 'wp_ajax_' . $_REQUEST['action'] ); 1941 1941 } -
trunk/bp-core/bp-core-adminbar.php
r3358 r3365 7 7 return false; 8 8 9 if ( (int)$bp->site_options['hide-loggedout-adminbar'] && !is_user_logged_in() )9 if ( isset( $bp->site_options['hide-loggedout-adminbar'] ) && (int)$bp->site_options['hide-loggedout-adminbar'] && !is_user_logged_in() ) 10 10 return false; 11 11 … … 76 76 77 77 foreach( (array)$bp->bp_options_nav[$nav_item['slug']] as $subnav_item ) { 78 $link = str_replace( $bp->displayed_user->domain, $bp->loggedin_user->domain, $subnav_item['link'] ); 79 $name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item['name'] ); 78 $link = $subnav_item['link']; 79 $name = $subnav_item['name']; 80 81 if ( isset( $bp->displayed_user->domain ) ) 82 $link = str_replace( $bp->displayed_user->domain, $bp->loggedin_user->domain, $subnav_item['link'] ); 83 84 if ( isset( $bp->displayed_user->userdata->user_login ) ) 85 $name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item['name'] ); 86 80 87 $alt = ( 0 == $sub_counter % 2 ) ? ' class="alt"' : ''; 81 88 echo '<li' . $alt . '><a id="bp-admin-' . $subnav_item['css_id'] . '" href="' . $link . '">' . $name . '</a></li>'; -
trunk/bp-core/bp-core-signup.php
r3362 r3365 614 614 /* Kill the wp-signup.php if custom registration signup templates are present */ 615 615 function bp_core_wpsignup_redirect() { 616 if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') && $_GET['action'] != 'register' ) 616 $action = ''; 617 if ( isset( $_GET['action'] ) ) 618 $action = $_GET['action']; 619 620 if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php' ) && $action != 'register' ) 617 621 return false; 618 622 -
trunk/bp-core/bp-core-templatetags.php
r3360 r3365 1308 1308 global $bp; 1309 1309 1310 $bp->ajax_querystring = apply_filters( 'bp_ajax_querystring', $query_string, $object ); 1311 return $bp->ajax_querystring; 1310 if ( !isset( $bp->ajax_querystring ) ) 1311 $bp->ajax_querystring = ''; 1312 1313 return apply_filters( 'bp_ajax_querystring', $bp->ajax_querystring, $object ); 1312 1314 } 1313 1315 … … 1650 1652 global $bp; 1651 1653 1652 if ( BP_XPROFILE_SLUG == $bp->current_component ||$bp->core->profile->slug == $bp->current_component )1654 if ( defined( 'BP_XPROFILE_SLUG' ) && BP_XPROFILE_SLUG == $bp->current_component || isset( $bp->core->profile->slug ) && $bp->core->profile->slug == $bp->current_component ) 1653 1655 return true; 1654 1656 … … 1686 1688 global $bp; 1687 1689 1688 if ( BP_GROUPS_SLUG == $bp->current_component && $bp->groups->current_group )1690 if ( BP_GROUPS_SLUG == $bp->current_component && isset( $bp->groups->current_group ) && $bp->groups->current_group ) 1689 1691 return true; 1690 1692 -
trunk/bp-forums.php
r3357 r3365 36 36 global $bp; 37 37 38 if ( file_exists( $bp->forums->bbconfig ) )38 if ( isset( $bp->forums->bbconfig ) && file_exists( $bp->forums->bbconfig ) ) 39 39 return true; 40 40 -
trunk/bp-groups/bp-groups-classes.php
r3300 r3365 293 293 global $wpdb, $bp; 294 294 295 $pag_sql = ''; 295 296 if ( $limit && $page ) 296 297 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 297 298 299 $hidden_sql = ''; 298 300 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 299 301 $hidden_sql = "AND g.status != 'hidden'"; 300 302 303 $search_sql = ''; 301 304 if ( $search_terms ) { 302 305 $search_terms = like_escape( $wpdb->escape( $search_terms ) ); … … 313 316 } 314 317 318 $group_ids = array(); 315 319 if ( !empty( $populate_extras ) ) { 316 320 foreach ( (array)$paged_groups as $group ) $group_ids[] = $group->id; … … 605 609 global $wpdb, $bp; 606 610 611 $hidden_sql = ''; 607 612 if ( !is_super_admin() ) 608 613 $hidden_sql = "WHERE status != 'hidden'"; -
trunk/bp-groups/bp-groups-templatetags.php
r3335 r3365 148 148 /* Type */ 149 149 if ( 'my-groups' == $bp->current_action ) { 150 if ( 'most-popular' == $order ) 150 if ( 'most-popular' == $order ) { 151 151 $type = 'popular'; 152 else if ( 'alphabetically' == $order )152 } elseif ( 'alphabetically' == $order ) { 153 153 $type = 'alphabetical'; 154 } else if ( 'invites' == $bp->current_action ) { 154 } 155 } elseif ( 'invites' == $bp->current_action ) { 155 156 $type = 'invites'; 156 } else if ($bp->groups->current_group->slug ) {157 } elseif ( isset( $bp->groups->current_group->slug ) && $bp->groups->current_group->slug ) { 157 158 $type = 'single-group'; 158 159 $slug = $bp->groups->current_group->slug; -
trunk/bp-messages/bp-messages-templatetags.php
r3300 r3365 505 505 return false; 506 506 507 return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( $bp->displayed_user-> user_id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );507 return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ); 508 508 } 509 509 -
trunk/bp-themes/bp-default/_inc/ajax.php
r3364 r3365 60 60 $query_string = empty( $qs ) ? '' : join( '&', (array)$qs ); 61 61 62 return apply_filters( 'bp_dtheme_ajax_querystring', $query_string, $object, $_BP_COOKIE['bp-' . $object . '-filter'], $_BP_COOKIE['bp-' . $object . '-scope'], $_BP_COOKIE['bp-' . $object . '-page'], $_BP_COOKIE['bp-' . $object . '-search-terms'], $_BP_COOKIE['bp-' . $object . '-extras'] ); 62 $object_filter = ''; 63 if ( isset( $_BP_COOKIE['bp-' . $object . '-filter'] ) ) 64 $object_filter = $_BP_COOKIE['bp-' . $object . '-filter']; 65 66 $object_scope = ''; 67 if ( isset( $_BP_COOKIE['bp-' . $object . '-scope'] ) ) 68 $object_scope = $_BP_COOKIE['bp-' . $object . '-scope']; 69 70 $object_page = ''; 71 if ( isset( $_BP_COOKIE['bp-' . $object . '-page'] ) ) 72 $object_page = $_BP_COOKIE['bp-' . $object . '-page']; 73 74 $object_search_terms = ''; 75 if ( isset( $_BP_COOKIE['bp-' . $object . '-search-terms'] ) ) 76 $object_search_terms = $_BP_COOKIE['bp-' . $object . '-search-terms']; 77 78 $object_extras = ''; 79 if ( isset( $_BP_COOKIE['bp-' . $object . '-extras'] ) ) 80 $object_extras = $_BP_COOKIE['bp-' . $object . '-extras']; 81 82 return apply_filters( 'bp_dtheme_ajax_querystring', $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras ); 63 83 } 64 84 add_filter( 'bp_ajax_querystring', 'bp_dtheme_ajax_querystring', 10, 2 ); -
trunk/bp-themes/bp-default/functions.php
r3325 r3365 34 34 'show_all' => __( 'Show all', 'buddypress' ), 35 35 'comments' => __( 'comments', 'buddypress' ), 36 'close' => __( 'Close', 'buddypress' ), 37 'mention_explain' => sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) ) 36 'close' => __( 'Close', 'buddypress' ) 38 37 ); 38 39 if ( bp_is_profile_component() && !bp_is_directory() ) 40 $params['mention_explain'] = sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) ); 41 39 42 wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params ); 40 43 -
trunk/bp-xprofile.php
r3346 r3365 18 18 function xprofile_setup_globals() { 19 19 global $bp, $wpdb; 20 21 if ( isset( $bp->profile->id ) ) 22 return; 20 23 21 24 if ( !defined( 'BP_XPROFILE_SLUG' ) ) … … 601 604 global $bp; 602 605 606 // This is required because of a call to bp_core_get_user_displayname() in bp_core_setup_globals() 607 if ( !isset( $bp->profile->id ) ) 608 xprofile_setup_globals(); 609 603 610 if ( !$user_id ) 604 611 $user_id = $bp->displayed_user->id; -
trunk/bp-xprofile/bp-xprofile-cssjs.php
r2884 r3365 7 7 8 8 function xprofile_add_admin_js() { 9 if ( strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {9 if ( isset( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) { 10 10 wp_enqueue_script( 'jquery-ui-core' ); 11 11 wp_enqueue_script( 'jquery-ui-tabs' );
Note: See TracChangeset
for help on using the changeset viewer.