View Issue Details

IDProjectCategoryView StatusLast Update
0006831mantisbtcustomizationpublic2010-09-19 03:13
ReporterMBonner Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.0.1 
Summary0006831: Hard-Coded NEW_ constant usage
Description

the "NEW_" constant representing the status for newly submitted bugs is hard-coded in the following files. The $g_bug_submit_status constant from config_defaultsinc.php should be used instead to represent this value instead of hard-coding it. This way if someone customizes their status codes to not use "NEW" as the first value the system won't break and they won't have to hack all the PHP files where this is hard-coded.

Files affected (in v1.0.1):

bugupdate.php
line 78:
if ( ( NEW
== $t_bug_data->status )

manage_config_workflow_page.php
line 56:
$t_new_label = get_enum_to_string( lang_get( 'status_enumstring' ), NEW );
line 294:
if ( NEW_ == $t_status ) {

manage_config_workflowset.php
line 92:
if ( NEW
== $t_status_id ) {

bugapi.php
line 38:
var $status = NEW
;

email_api.php
line 249:
unset($t_statuschange[NEW]);

TagsNo tags attached.

Relationships

duplicate of 0010330 closeddhx Remove all hardcoded enum levels from within Mantis code 

Activities

dhx

dhx

2010-06-19 01:23

reporter   ~0025921

Was fixed in 0010330 (MantisBT 1.2.0)