Skip to content

Commit

Permalink
Fix: Duplicate queries can be generated by history_api.
Browse files Browse the repository at this point in the history
This decreases view.php by about 10 queries on a test bug here - This probably should be fixed in history_api and not here..


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4350 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
mantis committed May 8, 2007
1 parent f2d0780 commit 81f832f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/custom_field_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: custom_field_api.php,v 1.62 2007-04-01 08:03:27 vboctor Exp $
# $Id: custom_field_api.php,v 1.63 2007-05-08 22:29:11 prichards Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -589,6 +589,10 @@ function custom_field_delete_all_values( $p_bug_id ) {
# Get the id of the custom field with the specified name.
# false is returned if no custom field found with the specified name.
function custom_field_get_id_from_name( $p_field_name, $p_truncated_length = null ) {
if ( $p_field_name == '' ) {
return false;
}

$t_custom_field_table = config_get( 'mantis_custom_field_table' );

$c_field_name = db_prepare_string( $p_field_name );
Expand Down

0 comments on commit 81f832f

Please sign in to comment.