Skip to content

Commit

Permalink
Don't force lowercase for custom field column names
Browse files Browse the repository at this point in the history
Custom field names are referenced by name in columns definitions.
There were some conversions in place to compare column names by
converting to lowercase.
However, the field name is stored in custom fields table without any
conversion. This causes:
- The configured columns array can be inconsistent with the available
  columns names.
- When the database uses case sensitive matching, the columns are not
  shown properly and are presented as not existant.

So given that custom field names are already stored with unrestricted
names, which include spaces and non-alphanumeric characters, forcing
them to lowercase while treating them is not a significant requirement
at the moment.

Fixes: #17367, #20248
  • Loading branch information
cproensa authored and vboctor committed Nov 24, 2016
1 parent b0a1ddb commit 414d19d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/columns_api.php
Expand Up @@ -283,9 +283,7 @@ function column_get_custom_field_name( $p_column ) {
* @access public
*/
function columns_string_to_array( $p_string ) {
$t_string = utf8_strtolower( $p_string );

$t_columns = explode( ',', $t_string );
$t_columns = explode( ',', $p_string );
$t_count = count( $t_columns );

for( $i = 0; $i < $t_count; $i++ ) {
Expand Down

0 comments on commit 414d19d

Please sign in to comment.