Skip to content

Commit

Permalink
Cache obsolete custom field names
Browse files Browse the repository at this point in the history
If a custom field name changed, custom_field_get_id_from_name() keeps
asking the database for an id over and over again (e.g. for every
change of the field in the bug history) to decide if it should be
displayed.

Thanks to user nimmich for noticing the issue and providing a patch.

Fixes #15265
  • Loading branch information
dregad committed Dec 6, 2012
1 parent 8c9038f commit 5cfca00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/custom_field_api.php
Expand Up @@ -651,6 +651,7 @@ function custom_field_get_id_from_name( $p_field_name, $p_truncated_length = nul
$t_result = db_query_bound( $query, array( $c_field_name ) );

if( db_num_rows( $t_result ) == 0 ) {
$g_cache_name_to_id_map[$p_field_name] = false;
return false;
}

Expand Down

0 comments on commit 5cfca00

Please sign in to comment.