Ticket #5872: 5872.patch
File 5872.patch, 1.1 KB (added by , 10 years ago) |
---|
-
bp-xprofile/bp-xprofile-filters.php
218 218 return $field_value; 219 219 } 220 220 221 if ( !strpos( $field_value, ',' ) && ( count( explode( ' ', $field_value ) ) > 5 ) ) {221 if ( !strpos( $field_value, ',' ) && !strpos( $field_value, ';' ) && ( count( explode( ' ', $field_value ) ) > 5 ) ) { 222 222 return $field_value; 223 223 } 224 224 225 $values = explode( ',', $field_value ); 225 if ( strpos( $field_value, ';' ) ) { 226 $list_type = 'semicolon'; 227 $values = explode( ';', $field_value ); // semicolon-separated lists 228 } else { 229 $list_type = 'comma'; 230 $values = explode( ',', $field_value ); // comma-separated lists 231 } 226 232 227 233 if ( !empty( $values ) ) { 228 234 foreach ( (array) $values as $value ) { … … 246 252 } 247 253 } 248 254 } 249 250 $values = implode( ', ', $new_values ); 255 if ( 'semicolon' == $list_type ) { 256 $values = implode( '; ', $new_values ); 257 } else { 258 $values = implode( ', ', $new_values ); 259 } 251 260 } 252 261 253 262 return $values;