From 317ccb8247768b17a92ed0d498906695d2195840 Mon Sep 17 00:00:00 2001 From: Kenzaburo Ito Date: Sun, 11 Feb 2001 18:31:29 +0000 Subject: [PATCH] tweaks and fixes git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@191 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- ChangeLog | 5 +++++ core_API.php | 12 ++++++------ manage_project_version_add.php3 | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3179f93fe7..47461f5331 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,11 @@ To Do: * Add postgreSQL support and/or a Database abstraction layer (PHPLib) * More documentation on installation, configuration, and customization +02.XX.2001 - 0.14.1 + + * Fixed error where ducplicate categories were added + * Fixed error in advanced_bug_view where bug delete had no confirmation + 02.10.2001 - 0.14.0 * Fixed error in print_html_bottom diff --git a/core_API.php b/core_API.php index e777fe2392..852a4ab9fc 100644 --- a/core_API.php +++ b/core_API.php @@ -1599,12 +1599,12 @@ function is_valid_email( $p_email ) { ########################################################################### ### END ### ########################################################################### - function is_duplicate_category( $p_category ) { - global $g_mantis_project_category_table, $g_project_cookie_val; + function is_duplicate_category( $p_category, $p_project_id ) { + global $g_mantis_project_category_table; $query = "SELECT COUNT(*) FROM $g_mantis_project_category_table - WHERE project_id='$g_project_cookie_val' AND + WHERE project_id='$p_project_id' AND category='$p_category'"; $result = db_query( $query ); $category_count = db_result( $result, 0, 0 ); @@ -1615,12 +1615,12 @@ function is_duplicate_category( $p_category ) { } } ### -------------------- - function is_duplicate_version( $p_version ) { - global $g_mantis_project_version_table, $g_project_cookie_val; + function is_duplicate_version( $p_version, $p_project_id ) { + global $g_mantis_project_version_table; $query = "SELECT COUNT(*) FROM $g_mantis_project_version_table - WHERE project_id='$g_project_cookie_val' AND + WHERE project_id='$p_project_id' AND version='$p_version'"; $result = db_query( $query ); $version_count = db_result( $result, 0, 0 ); diff --git a/manage_project_version_add.php3 b/manage_project_version_add.php3 index 4838a4a35f..aab715c212 100644 --- a/manage_project_version_add.php3 +++ b/manage_project_version_add.php3 @@ -16,7 +16,7 @@ } ### check for empty case or duplicate - if ( !empty( $f_version )&&( !is_duplicate_version( $f_version ) ) ) { + if ( !empty( $f_version )&&( !is_duplicate_version( $f_version, $f_project_id ) ) ) { ### insert version $query = "INSERT INTO $g_mantis_project_version_table