Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c88137343b0f
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5cfca00c6e2b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Dec 6, 2012

  1. Fix custom_field_get_id_from_name() always returning false

    Commit 6a7db34 introduced an error in
    the call to db_query_bound(), passing the param as a scalar value
    instead of an array.
    
    Thanks to user nimmich for noticing the issue and providing a patch.
    
    Fixes #15264
    dregad committed Dec 6, 2012
    Copy the full SHA
    8c9038f View commit details
  2. Cache obsolete custom field names

    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
    dregad committed Dec 6, 2012
    Copy the full SHA
    5cfca00 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/custom_field_api.php
3 changes: 2 additions & 1 deletion core/custom_field_api.php
Original file line number Diff line number Diff line change
@@ -648,9 +648,10 @@ function custom_field_get_id_from_name( $p_field_name, $p_truncated_length = nul
$c_field_name = $p_field_name . '%';
}

$t_result = db_query_bound( $query, $c_field_name );
$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;
}