Changeset 9315 for trunk/src/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 01/08/2015 09:43:47 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-xprofile/bp-xprofile-classes.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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 if ( $exclude_groups ) {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 if ( 'allow_custom_visibility' == $level->meta_key ) {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 if ( $this->exists() && empty( $this->value ) ) {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 if ( !array_key_exists( $fields[$j], $new_values ) ) {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 if ( ! is_array( $query ) ) {3737 } elseif ( ! is_array( $query ) ) { 3738 3738 continue; 3739 3739 3740 3740 // First-order clause. 3741 } else if ( $this->is_first_order_clause( $query ) ) {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 if ( 1 === count( $clean_queries ) ) {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 if ( is_array( $clause ) ) {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 if ( 1 === $where_count ) {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 if ( isset( $sibling['field_id'] ) && isset( $clause['field_id'] ) && $sibling['field_id'] === $clause['field_id'] ) {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.