Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mantisbt/mantisbt
base: 53282ac6f5c8
...
head fork: mantisbt/mantisbt
compare: d73161841eb4
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 06, 2012
@dregad dregad 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
d080705
@dregad dregad 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
d731618
Showing with 2 additions and 1 deletion.
  1. +2 −1  core/custom_field_api.php
View
3  core/custom_field_api.php
@@ -642,9 +642,10 @@ function custom_field_get_id_from_name( $p_field_name ) {
$t_custom_field_table = db_get_table( 'custom_field' );
$query = "SELECT id FROM $t_custom_field_table WHERE name = " . db_param();
- $t_result = db_query_bound( $query, $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;
}

No commit comments for this range

Something went wrong with that request. Please try again.