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 d080705 commit d731618
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/custom_field_api.php
Expand Up @@ -645,6 +645,7 @@ function custom_field_get_id_from_name( $p_field_name ) {
$t_result = db_query_bound( $query, array( $p_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 d731618

Please sign in to comment.