Skip to content

Commit

Permalink
tweaks and fixes
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@191 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Feb 11, 2001
1 parent f7cba58 commit 317ccb8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions core_API.php
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion manage_project_version_add.php3
Expand Up @@ -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
Expand Down

0 comments on commit 317ccb8

Please sign in to comment.