Skip to content

Commit

Permalink
Remove 0004377: $g_bug_submit_status should depends on user level
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2986 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
bpfennigschmidt committed Sep 24, 2004
1 parent 498f87a commit 467bba0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
16 changes: 2 additions & 14 deletions config_defaults_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: config_defaults_inc.php,v 1.211 2004-09-23 21:22:11 thraxisp Exp $
# $Id: config_defaults_inc.php,v 1.212 2004-09-24 08:39:44 bpfennigschmidt Exp $
# --------------------------------------------------------


Expand Down Expand Up @@ -691,19 +691,7 @@
############################

# Status to assign to the bug when submitted.
#
# You are able to define a submit status for each access level of the reporter
#
# $g_bug_submit_status = array( REPORTER => NEW_, UPDATER => ACKNOWLEGDED, DEVELOPER => CONFIRMED );
#
# If the access level of the reporter is REPORTER the bug status is set to NEW_
# If the access level of the reporter is UPDATER the bug status is set to ACKNOWLEGDED
# If the access level of the reporter is DEVELOPER the bug status is set to CONFIRMED
#
# $g_status_submit_default_status set the default status which is used if no status
# is defined for the reporters access level or if you need only one submit status
$g_bug_submit_status = array();
$g_bug_submit_default_status = NEW_;
$g_bug_submit_status = NEW_;

# Status to assign to the bug when assigned.
$g_bug_assigned_status = ASSIGNED;
Expand Down
25 changes: 2 additions & 23 deletions core/bug_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_api.php,v 1.83 2004-09-22 08:59:33 bpfennigschmidt Exp $
# $Id: bug_api.php,v 1.84 2004-09-24 08:42:08 bpfennigschmidt Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -347,29 +347,8 @@ function bug_create( $p_bug_data ) {
$t_text_id = db_insert_id($t_bug_text_table);

# check to see if we want to assign this right off
$t_submit_status_array = config_get( 'bug_submit_status' );
$t_status = config_get( 'bug_submit_status' );

if ( true == is_array( $t_submit_status_array ) ) {

$t_reporter_access_level = user_get_access_level( $c_reporter_id, $c_project_id );

$t_submit_status_access_level = array_keys( $t_submit_status_array );
if ( true == in_array( $t_reporter_access_level, $t_submit_status_access_level ) ) {
# Submit status defined for this access level
$t_status = $t_submit_status_array[$t_reporter_access_level];
}
else {
# No submit status defined for this access level use default status
$t_status = config_get( 'bug_submit_default_status' );
}
}
else {
# If the user still use the old 'bug_submit_status' config
# variable, which it's not an array
$t_status = $t_submit_status_array;
}


# if not assigned, check if it should auto-assigned.
if ( 0 == $c_handler_id ) {
# if a default user is associated with the category and we know at this point
Expand Down

0 comments on commit 467bba0

Please sign in to comment.