From 81f832fbbeb3f788035b252a635774778c64133d Mon Sep 17 00:00:00 2001 From: Paul Richards Date: Tue, 8 May 2007 22:29:11 +0000 Subject: [PATCH] Fix: Duplicate queries can be generated by history_api. 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 --- core/custom_field_api.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/custom_field_api.php b/core/custom_field_api.php index 56fcd5d936..5397f86c48 100644 --- a/core/custom_field_api.php +++ b/core/custom_field_api.php @@ -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; @@ -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 );