Changeset 9315
- Timestamp:
- 01/08/2015 09:43:47 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-actions.php
r9308 r9315 92 92 93 93 // Set redirect to users' activity stream 94 } else 94 } elseif ( ! empty( $activity->user_id ) ) { 95 95 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/'; 96 96 } … … 340 340 341 341 // Post to groups object 342 } else 342 } elseif ( 'groups' == $object && bp_is_active( 'groups' ) ) { 343 343 if ( (int) $item_id ) { 344 344 $activity_id = groups_post_update( array( 'content' => $content, 'group_id' => $item_id ) ); … … 812 812 813 813 // Unpublishing a previously published post. 814 } else 814 } elseif ( 'publish' === $old_status ) { 815 815 // Some form of pending status - only remove the activity entry 816 816 bp_activity_post_type_unpublish( $post->ID, $post ); -
trunk/src/bp-activity/bp-activity-classes.php
r9308 r9315 170 170 // If no callback is available, use the literal string from 171 171 // the database row 172 } else 172 } elseif ( ! empty( $row->action ) ) { 173 173 $this->action = $row->action; 174 174 … … 1278 1278 1279 1279 // A true cache miss 1280 } else 1280 } elseif ( empty( $comments ) ) { 1281 1281 1282 1282 // Select the user's fullname with the query -
trunk/src/bp-activity/bp-activity-template.php
r9308 r9315 653 653 if ( isset( $_GET['afilter'] ) && apply_filters( 'bp_activity_enable_afilter_support', false ) ) 654 654 $filter = array( 'object' => $_GET['afilter'] ); 655 else 655 elseif ( ! empty( $user_id ) || ! empty( $object ) || ! empty( $action ) || ! empty( $primary_id ) || ! empty( $secondary_id ) || ! empty( $offset ) || ! empty( $since ) ) 656 656 $filter = array( 'user_id' => $user_id, 'object' => $object, 'action' => $action, 'primary_id' => $primary_id, 'secondary_id' => $secondary_id, 'offset' => $offset, 'since' => $since ); 657 657 else … … 4309 4309 4310 4310 // On individual group pages, default to 'group' 4311 } else 4311 } elseif ( bp_is_active( 'groups' ) && bp_is_group() ) { 4312 4312 $context = 'group'; 4313 4313 -
trunk/src/bp-core/bp-core-avatars.php
r9308 r9315 316 316 if ( false !== $params['width'] ) { 317 317 // Width has been specified. No modification necessary. 318 } else 318 } elseif ( 'thumb' == $params['type'] ) { 319 319 $params['width'] = bp_core_avatar_thumb_width(); 320 320 } else { … … 326 326 if ( false !== $params['height'] ) { 327 327 // Height has been specified. No modification necessary. 328 } else 328 } elseif ( 'thumb' == $params['type'] ) { 329 329 $params['height'] = bp_core_avatar_thumb_height(); 330 330 } else { … … 425 425 if ( empty( $bp->grav_default->{$params['object']} ) ) { 426 426 $default_grav = 'wavatar'; 427 } else 427 } elseif ( 'mystery' == $bp->grav_default->{$params['object']} ) { 428 428 $default_grav = apply_filters( 'bp_core_mysteryman_src', 'mm', $params['width'] ); 429 429 } else { … … 435 435 if ( 'user' == $params['object'] ) { 436 436 $params['email'] = bp_core_get_user_email( $params['item_id'] ); 437 } else 437 } elseif ( 'group' == $params['object'] || 'blog' == $params['object'] ) { 438 438 $params['email'] = $params['item_id'] . '-' . $params['object'] . '@' . bp_get_root_domain(); 439 439 } … … 497 497 if ( 'user' == $object ) 498 498 $item_id = bp_displayed_user_id(); 499 else 499 elseif ( 'group' == $object ) 500 500 $item_id = buddypress()->groups->current_group->id; 501 else 501 elseif ( 'blog' == $object ) 502 502 $item_id = $current_blog->id; 503 503 … … 510 510 if ( 'user' == $object ) 511 511 $avatar_dir = 'avatars'; 512 else 512 elseif ( 'group' == $object ) 513 513 $avatar_dir = 'group-avatars'; 514 else 514 elseif ( 'blog' == $object ) 515 515 $avatar_dir = 'blog-avatars'; 516 516 … … 831 831 832 832 // If passed a number, assume it was a $user_id 833 } else 833 } elseif ( is_numeric( $user ) ) { 834 834 $id = $user; 835 835 … … 1145 1145 1146 1146 // Use the local default image 1147 } else 1147 } elseif ( 'local' === $type ) { 1148 1148 $avatar = buddypress()->plugin_url . 'bp-core/images/mystery-man.jpg'; 1149 1149 … … 1181 1181 1182 1182 // Use the local default image 1183 } else 1183 } elseif ( 'local' === $type ) { 1184 1184 $avatar = buddypress()->plugin_url . 'bp-core/images/mystery-man-50.jpg'; 1185 1185 … … 1222 1222 1223 1223 // Group's avatar create screen 1224 } else 1224 } elseif ( bp_is_group_create() ) { 1225 1225 /** 1226 1226 * we can't use bp_get_groups_current_create_step() -
trunk/src/bp-core/bp-core-buddybar.php
r9131 r9315 392 392 // In the case of a user page, we try to assume a 393 393 // redirect URL 394 } else 394 } elseif ( bp_is_user() ) { 395 395 396 396 // Redirect to the displayed user's default -
trunk/src/bp-core/bp-core-catchuri.php
r9308 r9315 671 671 // and the current user is logged in. In this case we send to 672 672 // the members directory to avoid redirect loops 673 } else 673 } elseif ( bp_is_register_page() && 'register' == $front_page_component && is_user_logged_in() ) { 674 674 $bp->canonical_stack['canonical_url'] = apply_filters( 'bp_loggedin_register_page_redirect_to', trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) ); 675 675 } -
trunk/src/bp-core/bp-core-classes.php
r9308 r9315 279 279 $sql['orderby'] = "ORDER BY u.user_id"; 280 280 $sql['order'] = "DESC"; 281 } else 281 } elseif ( 'random' == $type ) { 282 282 $sql['orderby'] = "ORDER BY rand()"; 283 283 } else { … … 2036 2036 // No button if viewing your own profile (and not in 2037 2037 // a members loop) 2038 } else 2038 } elseif ( bp_is_my_profile() ) { 2039 2039 return false; 2040 2040 } … … 2834 2834 if ( 'relation' === $key ) { 2835 2835 $relation = $query['relation']; 2836 } else 2836 } elseif ( is_array( $clause ) ) { 2837 2837 // This is a first-order clause 2838 2838 if ( $this->is_first_order_clause( $clause ) ) { … … 2842 2842 if ( ! $where_count ) { 2843 2843 $sql_chunks['where'][] = ''; 2844 } else 2844 } elseif ( 1 === $where_count ) { 2845 2845 $sql_chunks['where'][] = $clause_sql['where'][0]; 2846 2846 } else { … … 2905 2905 $relation = $query; 2906 2906 2907 } else 2907 } elseif ( ! is_array( $query ) ) { 2908 2908 continue; 2909 2909 2910 2910 // First-order clause. 2911 } else 2911 } elseif ( $this->is_first_order_clause( $query ) ) { 2912 2912 if ( isset( $query['value'] ) && array() === $query['value'] ) { 2913 2913 unset( $query['value'] ); … … 2939 2939 * simplifies the logic around combining key-only queries. 2940 2940 */ 2941 } else 2941 } elseif ( 1 === count( $clean_queries ) ) { 2942 2942 $clean_queries['relation'] = 'OR'; 2943 2943 -
trunk/src/bp-core/bp-core-cssjs.php
r8772 r9315 126 126 127 127 // Less than 2x full-width: cropper defaults to full-width 128 } else 128 } elseif ( $image[0] < ( $full_width * 2 ) ) { 129 129 $padding_w = round( ( $image[0] - $full_width ) / 2 ); 130 130 $crop_left = $padding_w; … … 143 143 144 144 // Less than double full-height: cropper defaults to full-height 145 } else 145 } elseif ( $image[1] < ( $full_height * 2 ) ) { 146 146 $padding_h = round( ( $image[1] - $full_height ) / 2 ); 147 147 $crop_top = $padding_h; -
trunk/src/bp-core/bp-core-filters.php
r9308 r9315 376 376 * meta['password'] is not set, the activation url must be WordPress one 377 377 */ 378 } else 378 } elseif ( buddypress()->members->admin->signups_page == get_current_screen()->id ) { 379 379 $is_hashpass_in_meta = maybe_unserialize( $meta ); 380 380 -
trunk/src/bp-core/bp-core-functions.php
r9308 r9315 113 113 if ( isset( $index->' . $key . ' ) ) { 114 114 $values[ $indexi ] = $index->' . $key . '; 115 } else 115 } elseif ( isset( $index["' . $key . '"] ) ) { 116 116 $values[ $indexi ] = $index["' . $key . '"]; 117 117 } … … 127 127 if ( 0 > $cmp ) { 128 128 $retval = -1; 129 } else 129 } elseif ( 0 < $cmp ) { 130 130 $retval = 1; 131 131 } else { -
trunk/src/bp-core/bp-core-theme-compatibility.php
r9308 r9315 289 289 // Brute-force check for a BP template 290 290 // Examples are clones of bp-default 291 } else 291 } elseif ( locate_template( 'members/members-loop.php', false, false ) ) { 292 292 $theme_compat = false; 293 293 } -
trunk/src/bp-friends/bp-friends-actions.php
r7556 r9315 41 41 } 42 42 43 } else 43 } elseif ( 'is_friend' == $friendship_status ) { 44 44 bp_core_add_message( __( 'You are already friends with this user', 'buddypress' ), 'error' ); 45 45 } else { … … 79 79 } 80 80 81 } else 81 } elseif ( 'is_friends' == $friendship_status ) { 82 82 bp_core_add_message( __( 'You are not yet friends with this user', 'buddypress' ), 'error' ); 83 83 } else { -
trunk/src/bp-friends/bp-friends-template.php
r9308 r9315 271 271 if ( empty( $user_id ) && isset( $friends_template->friendship->friend ) ) 272 272 $user_id = $friends_template->friendship->friend->id; 273 else 273 elseif ( empty( $user_id ) && !isset( $friends_template->friendship->friend ) ) 274 274 $user_id = bp_displayed_user_id(); 275 275 -
trunk/src/bp-groups/bp-groups-actions.php
r9308 r9315 35 35 36 36 // User doesn't have access, so set up redirect args 37 } else 37 } elseif ( is_user_logged_in() ) { 38 38 $no_access_args = array( 39 39 'message' => __( 'You do not have access to this group.', 'buddypress' ), … … 184 184 if ( 'private' == $_POST['group-status'] ) 185 185 $group_status = 'private'; 186 else 186 elseif ( 'hidden' == $_POST['group-status'] ) 187 187 $group_status = 'hidden'; 188 188 -
trunk/src/bp-groups/bp-groups-activity.php
r9308 r9315 166 166 167 167 // Name and description changed - to keep things short, don't describe changes in detail. 168 } else 168 } elseif ( isset( $changed['name'] ) && isset( $changed['description'] ) ) { 169 169 $action = sprintf( __( '%1$s changed the name and description of the group %2$s', 'buddypress' ), $user_link, $group_link ); 170 170 171 171 // Name only. 172 } else 172 } elseif ( ! empty( $changed['name']['old'] ) && ! empty( $changed['name']['new'] ) ) { 173 173 $action = sprintf( __( '%1$s changed the name of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['name']['old'] ), esc_html( $changed['name']['new'] ) ); 174 174 175 175 // Description only. 176 } else 176 } elseif ( ! empty( $changed['description']['old'] ) && ! empty( $changed['description']['new'] ) ) { 177 177 $action = sprintf( __( '%1$s changed the description of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['description']['old'] ), esc_html( $changed['description']['new'] ) ); 178 178 -
trunk/src/bp-groups/bp-groups-admin.php
r9308 r9315 103 103 bp_core_redirect( $redirect_to ); 104 104 105 } else 105 } elseif ( 'edit' == $doaction && ! empty( $_GET['gid'] ) ) { 106 106 // columns screen option 107 107 add_screen_option( 'layout_columns', array( 'default' => 2, 'max' => 2, ) ); … … 309 309 if ( 'admin' == $existing_role || 'mod' == $existing_role ) { 310 310 $result = groups_demote_member( $user_id, $group_id ); 311 } else 311 } elseif ( 'banned' == $existing_role ) { 312 312 $result = groups_unban_member( $user_id, $group_id ); 313 313 } … … 420 420 421 421 // Display the group deletion confirmation screen 422 } else 422 } elseif ( 'delete' == $doaction && ! empty( $_GET['gid'] ) ) { 423 423 bp_groups_admin_delete(); 424 424 … … 457 457 if ( ! empty( $errors ) ) { 458 458 $messages[] = __( 'An error occurred when trying to update your group details.', 'buddypress' ); 459 } else 459 } elseif ( ! empty( $updated ) ) { 460 460 $messages[] = __( 'The group has been updated successfully.', 'buddypress' ); 461 461 } -
trunk/src/bp-groups/bp-groups-classes.php
r9308 r9315 1296 1296 1297 1297 // invite_sent means the user has been invited 1298 } else 1298 } elseif ( $user_status[ $gid ]->invite_sent ) { 1299 1299 $is_invited = '1'; 1300 1300 … … 1612 1612 1613 1613 // The string 'any' matches any non-zero value (inviter_id != 0) 1614 } else 1614 } elseif ( 'any' === $inviter_id ) { 1615 1615 $sql['where'][] = "inviter_id != 0"; 1616 1616 … … 3370 3370 $this->params['show_tab'] = 'noone'; 3371 3371 3372 } else 3372 } elseif ( isset( $this->params_raw['enable_nav_item'] ) || isset( $this->params_raw['visibility'] ) ) { 3373 3373 // If enable_nav_item or visibility is passed, 3374 3374 // we assume this is a legacy extension. -
trunk/src/bp-groups/bp-groups-functions.php
r9309 r9315 922 922 923 923 // Otherwise, create a new invitation 924 } else 924 } elseif ( ! groups_is_user_member( $user_id, $group_id ) && ! groups_check_user_has_invite( $user_id, $group_id, 'all' ) ) { 925 925 $invite = new BP_Groups_Member; 926 926 $invite->group_id = $group_id; -
trunk/src/bp-groups/bp-groups-loader.php
r9131 r9315 649 649 $bp->bp_options_title = _x( 'Memberships', 'My Groups page <title>', 'buddypress' ); 650 650 651 } else 651 } elseif ( !bp_is_my_profile() && !bp_is_single_item() ) { 652 652 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 653 653 'item_id' => bp_displayed_user_id(), … … 659 659 // We are viewing a single group, so set up the 660 660 // group navigation menu using the $this->current_group global. 661 } else 661 } elseif ( bp_is_single_item() ) { 662 662 $bp->bp_options_title = $this->current_group->name; 663 663 $bp->bp_options_avatar = bp_core_fetch_avatar( array( -
trunk/src/bp-groups/bp-groups-screens.php
r9308 r9315 72 72 bp_core_redirect( $redirect_to ); 73 73 74 } else 74 } elseif ( bp_is_action_variable( 'reject' ) && is_numeric( $group_id ) ) { 75 75 // Check the nonce 76 76 if ( !check_admin_referer( 'groups_reject_invite' ) ) … … 180 180 181 181 // Sticky a topic 182 else 182 elseif ( bp_is_action_variable( 'stick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 183 183 // Check the nonce 184 184 check_admin_referer( 'bp_forums_stick_topic' ); … … 195 195 196 196 // Un-Sticky a topic 197 else 197 elseif ( bp_is_action_variable( 'unstick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 198 198 // Check the nonce 199 199 check_admin_referer( 'bp_forums_unstick_topic' ); … … 210 210 211 211 // Close a topic 212 else 212 elseif ( bp_is_action_variable( 'close', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 213 213 // Check the nonce 214 214 check_admin_referer( 'bp_forums_close_topic' ); … … 225 225 226 226 // Open a topic 227 else 227 elseif ( bp_is_action_variable( 'open', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 228 228 // Check the nonce 229 229 check_admin_referer( 'bp_forums_open_topic' ); … … 240 240 241 241 // Delete a topic 242 else 242 elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && !bp_action_variable( 3 ) ) { 243 243 // Fetch the topic 244 244 $topic = bp_forums_get_topic_details( $topic_id ); … … 265 265 266 266 // Editing a topic 267 else 267 elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 2 ) && !bp_action_variable( 3 ) ) { 268 268 // Fetch the topic 269 269 $topic = bp_forums_get_topic_details( $topic_id ); … … 293 293 294 294 // Delete a post 295 } else 295 } elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && $post_id = bp_action_variable( 4 ) ) { 296 296 // Fetch the post 297 297 $post = bp_forums_get_post( $post_id ); … … 317 317 318 318 // Editing a post 319 } else 319 } elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 2 ) && $post_id = bp_action_variable( 4 ) ) { 320 320 321 321 // Fetch the post … … 380 380 if ( empty( $_POST['topic_title'] ) ) { 381 381 $error_message = __( 'Please provide a title for your forum topic.', 'buddypress' ); 382 } else 382 } elseif ( empty( $_POST['topic_text'] ) ) { 383 383 $error_message = __( 'Forum posts cannot be empty. Please enter some text.', 'buddypress' ); 384 384 } … … 493 493 $message = __( 'You are not allowed to send or remove invites', 'buddypress' ); 494 494 $error = 'error'; 495 } else 495 } elseif ( BP_Groups_Member::check_for_membership_request( $friend_id, $group_id ) ) { 496 496 $message = __( 'The member requested to join the group', 'buddypress' ); 497 497 $error = 'error'; 498 } else 498 } elseif ( ! groups_uninvite_user( $friend_id, $group_id ) ) { 499 499 $message = __( 'There was an error removing the invite', 'buddypress' ); 500 500 $error = 'error'; -
trunk/src/bp-groups/bp-groups-template.php
r9308 r9315 234 234 if ( 'invites' == $type ) { 235 235 $this->groups = groups_get_invites_for_user( $user_id, $this->pag_num, $this->pag_page, $exclude ); 236 } else 236 } elseif ( 'single-group' == $type ) { 237 237 $this->single_group = true; 238 238 … … 280 280 $this->group_count = (int) $this->groups['total']; 281 281 $this->groups = $this->groups['groups']; 282 } else 282 } elseif ( 'single-group' == $type ) { 283 283 if ( empty( $group->id ) ) { 284 284 $this->total_group_count = 0; … … 711 711 if ( 'public' == $group->status ) { 712 712 $type = __( "Public Group", "buddypress" ); 713 } else 713 } elseif ( 'hidden' == $group->status ) { 714 714 $type = __( "Hidden Group", "buddypress" ); 715 } else 715 } elseif ( 'private' == $group->status ) { 716 716 $type = __( "Private Group", "buddypress" ); 717 717 } else { … … 1863 1863 // Default to the current group first 1864 1864 $group_id = $bp->groups->current_group->id; 1865 } else 1865 } elseif ( isset( $groups_template->group->id ) ) { 1866 1866 // Then see if we're in the loop 1867 1867 $group_id = $groups_template->group->id; … … 2947 2947 if ( is_user_logged_in() && bp_group_is_invited() ) { 2948 2948 $message = __( 'You must accept your pending invitation before you can access this private group.', 'buddypress' ); 2949 } else 2949 } elseif ( is_user_logged_in() ) { 2950 2950 $message = __( 'This is a private group and you must request group membership in order to join.', 'buddypress' ); 2951 2951 } else { -
trunk/src/bp-groups/bp-groups-widgets.php
r8480 r9315 93 93 if ( 'active' == $instance['group_default'] ) 94 94 printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); 95 else 95 elseif ( 'popular' == $instance['group_default'] ) 96 96 bp_group_member_count(); 97 97 ?> … … 203 203 if ( 'newest-groups' == $_POST['filter'] ) { 204 204 printf( __( 'created %s', 'buddypress' ), bp_get_group_date_created() ); 205 } else 205 } elseif ( 'recently-active-groups' == $_POST['filter'] ) { 206 206 printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); 207 } else 207 } elseif ( 'popular-groups' == $_POST['filter'] ) { 208 208 bp_group_member_count(); 209 209 } -
trunk/src/bp-members/bp-members-admin.php
r9308 r9315 1471 1471 1472 1472 // Handle activated accounts 1473 } else 1473 } elseif ( 'do_activate' == $doaction ) { 1474 1474 1475 1475 // nonce check … … 1498 1498 1499 1499 // Handle sign-ups delete 1500 } else 1500 } elseif ( 'do_delete' == $doaction ) { 1501 1501 1502 1502 // nonce check … … 1876 1876 if ( ! empty( $_POST['allsignups'] ) ) { 1877 1877 $ids = wp_parse_id_list( $_POST['allsignups'] ); 1878 } else 1878 } elseif ( ! empty( $_GET['signup_id'] ) ) { 1879 1879 $ids = absint( $_GET['signup_id'] ); 1880 1880 } -
trunk/src/bp-members/bp-members-functions.php
r9273 r9315 1939 1939 // If a user ID is found, this may be a legacy signup, or one 1940 1940 // created locally for backward compatibility. Process it. 1941 } else 1941 } elseif ( $key == wp_hash( $user_id ) ) { 1942 1942 // Change the user's status so they become active 1943 1943 if ( ! $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_status = 0 WHERE ID = %d", $user_id ) ) ) { … … 2397 2397 if ( isset( $_GLOBALS['pagenow'] ) && false !== strpos( $GLOBALS['pagenow'], 'wp-login.php' ) ) { 2398 2398 $is_login = true; 2399 } else 2399 } elseif ( isset( $_SERVER['SCRIPT_NAME'] ) && false !== strpos( $_SERVER['SCRIPT_NAME'], 'wp-login.php' ) ) { 2400 2400 $is_login = true; 2401 2401 } -
trunk/src/bp-members/bp-members-template.php
r9308 r9315 607 607 if ( 'active' == $members_template->type ) 608 608 $pag = sprintf( _n( 'Viewing 1 active member', 'Viewing %1$s - %2$s of %3$s active members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 609 else 609 elseif ( 'popular' == $members_template->type ) 610 610 $pag = sprintf( _n( 'Viewing 1 member with friends', 'Viewing %1$s - %2$s of %3$s members with friends', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 611 else 611 elseif ( 'online' == $members_template->type ) 612 612 $pag = sprintf( _n( 'Viewing 1 online member', 'Viewing %1$s - %2$s of %3$s online members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 613 613 else … … 2183 2183 if ( empty( $bp->grav_default->user ) ) 2184 2184 $default_grav = 'wavatar'; 2185 else 2185 elseif ( 'mystery' == $bp->grav_default->user ) 2186 2186 $default_grav = $bp->plugin_url . 'bp-core/images/mystery-man.jpg'; 2187 2187 else -
trunk/src/bp-messages/bp-messages-classes.php
r9301 r9315 475 475 if ( $type == 'unread' ) 476 476 $type_sql = " AND unread_count != 0 "; 477 else 477 elseif ( $type == 'read' ) 478 478 $type_sql = " AND unread_count = 0 "; 479 479 -
trunk/src/bp-messages/bp-messages-screens.php
r9216 r9315 211 211 bp_core_add_message( __('Notice deactivated.', 'buddypress') ); 212 212 } 213 } else 213 } elseif ( bp_is_action_variable( 'activate', 0 ) ) { 214 214 if ( !$notice->activate() ) { 215 215 bp_core_add_message( __('There was a problem activating that notice.', 'buddypress'), 'error' ); … … 217 217 bp_core_add_message( __('Notice activated.', 'buddypress') ); 218 218 } 219 } else 219 } elseif ( bp_is_action_variable( 'delete' ) ) { 220 220 if ( !$notice->delete() ) { 221 221 bp_core_add_message( __('There was a problem deleting that notice.', 'buddypress'), 'buddypress' ); -
trunk/src/bp-messages/bp-messages-template.php
r9301 r9315 1154 1154 */ 1155 1155 return apply_filters( 'bp_get_messages_username_value', $_COOKIE['bp_messages_send_to'] ); 1156 } else 1156 } elseif ( isset( $_GET['r'] ) && !isset( $_COOKIE['bp_messages_send_to'] ) ) { 1157 1157 /** This filter is documented in bp-messages-template.php */ 1158 1158 return apply_filters( 'bp_get_messages_username_value', $_GET['r'] ); -
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r9308 r9315 1080 1080 1081 1081 // Create the user invitation 1082 } else 1082 } elseif ( groups_invite_user( array( 'user_id' => $friend_id, 'group_id' => $group_id ) ) ) { 1083 1083 $user_status = 'is_invited'; 1084 1084 -
trunk/src/bp-xprofile/bp-xprofile-admin.php
r9298 r9315 44 44 xprofile_admin_manage_field( $_GET['group_id'] ); 45 45 46 else 46 elseif ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && isset( $_GET['field_id'] ) && 'edit_field' == $_GET['mode'] ) 47 47 xprofile_admin_manage_field( $_GET['group_id'], $_GET['field_id'] ); 48 48 49 else 49 elseif ( isset( $_GET['mode'] ) && isset( $_GET['field_id'] ) && 'delete_field' == $_GET['mode'] ) 50 50 xprofile_admin_delete_field( $_GET['field_id'], 'field'); 51 51 52 else 52 elseif ( isset( $_GET['mode'] ) && isset( $_GET['option_id'] ) && 'delete_option' == $_GET['mode'] ) 53 53 xprofile_admin_delete_field( $_GET['option_id'], 'option' ); 54 54 55 else 55 elseif ( isset( $_GET['mode'] ) && 'add_group' == $_GET['mode'] ) 56 56 xprofile_admin_manage_group(); 57 57 58 else 58 elseif ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && 'delete_group' == $_GET['mode'] ) 59 59 xprofile_admin_delete_group( $_GET['group_id'] ); 60 60 61 else 61 elseif ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && 'edit_group' == $_GET['mode'] ) 62 62 xprofile_admin_manage_group( $_GET['group_id'] ); 63 63 -
trunk/src/bp-xprofile/bp-xprofile-classes.php
r9308 r9315 192 192 if ( ! empty( $profile_group_id ) ) { 193 193 $where_sql = $wpdb->prepare( 'WHERE g.id = %d', $profile_group_id ); 194 } else 194 } elseif ( $exclude_groups ) { 195 195 $exclude_groups = join( ',', wp_parse_id_list( $exclude_groups ) ); 196 196 $where_sql = "WHERE g.id NOT IN ({$exclude_groups})"; … … 493 493 if ( 'default_visibility' == $level->meta_key ) { 494 494 $default_visibility_levels[ $level->object_id ]['default'] = $level->meta_value; 495 } else 495 } elseif ( 'allow_custom_visibility' == $level->meta_key ) { 496 496 $default_visibility_levels[ $level->object_id ]['allow_custom'] = $level->meta_value; 497 497 } … … 1325 1325 $result = $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_data} SET value = %s, last_updated = %s WHERE user_id = %d AND field_id = %d", $this->value, $this->last_updated, $this->user_id, $this->field_id ) ); 1326 1326 1327 } else 1327 } elseif ( $this->exists() && empty( $this->value ) ) { 1328 1328 // Data removed, delete the entry. 1329 1329 $result = $this->delete(); … … 1641 1641 if ( $values[$i]->name == $fields[$j] ) { 1642 1642 $new_values[$fields[$j]] = $values[$i]->value; 1643 } else 1643 } elseif ( !array_key_exists( $fields[$j], $new_values ) ) { 1644 1644 $new_values[$fields[$j]] = NULL; 1645 1645 } … … 3735 3735 $relation = $query; 3736 3736 3737 } else 3737 } elseif ( ! is_array( $query ) ) { 3738 3738 continue; 3739 3739 3740 3740 // First-order clause. 3741 } else 3741 } elseif ( $this->is_first_order_clause( $query ) ) { 3742 3742 if ( isset( $query['value'] ) && array() === $query['value'] ) { 3743 3743 unset( $query['value'] ); … … 3769 3769 * simplifies the logic around combining key-only queries. 3770 3770 */ 3771 } else 3771 } elseif ( 1 === count( $clean_queries ) ) { 3772 3772 $clean_queries['relation'] = 'OR'; 3773 3773 … … 3886 3886 if ( 'relation' === $key ) { 3887 3887 $relation = $query['relation']; 3888 } else 3888 } elseif ( is_array( $clause ) ) { 3889 3889 3890 3890 // This is a first-order clause. … … 3895 3895 if ( ! $where_count ) { 3896 3896 $sql_chunks['where'][] = ''; 3897 } else 3897 } elseif ( 1 === $where_count ) { 3898 3898 $sql_chunks['where'][] = $clause_sql['where'][0]; 3899 3899 } else { … … 4150 4150 4151 4151 // Clauses joined by AND with "negative" operators share a join only if they also share a key. 4152 } else 4152 } elseif ( isset( $sibling['field_id'] ) && isset( $clause['field_id'] ) && $sibling['field_id'] === $clause['field_id'] ) { 4153 4153 $compatible_compares = array( '!=', 'NOT IN', 'NOT LIKE' ); 4154 4154 }
Note: See TracChangeset
for help on using the changeset viewer.