Skip to content

Commit

Permalink
some work from Christian on custom fields
Browse files Browse the repository at this point in the history
I cleaned it up a bit though I haven't finished reviewing the newly added files

Everything important should be prevented from loading unless you set the appropriate flag in your config file (see the bottom of config_defaults)


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1624 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Nov 25, 2002
1 parent 19ba68d commit 87789de
Show file tree
Hide file tree
Showing 13 changed files with 766 additions and 123 deletions.
17 changes: 15 additions & 2 deletions config_defaults_inc.php
Expand Up @@ -572,8 +572,8 @@
'closed' => '#e8e8e8'); # light gray
# --- custom status color codes ----------
# array for colors assoociated with custom attributes
# @@@@ Consider changing the values in this array to point to $s_color_<xxxx>. For example,
# lang_get('color_antique_white') should return 'Antique White' for English language.
# @@@@ Consider changing the values in this array to point to $s_color_<xxxx>. For example,
# lang_get('color_antique_white') should return 'Antique White' for English language.
$g_custom_colors = array('#FAEBD7' => 'ANTIQUEWHITE',
'#F5DEB3' => 'WHEAT',
'#FFD700' => 'GOLD',
Expand Down Expand Up @@ -672,6 +672,9 @@
$g_mantis_user_pref_table = $g_db_table_prefix.'_user_pref_table';
$g_mantis_user_print_pref_table = $g_db_table_prefix.'_user_print_pref_table';
$g_mantis_project_customization_table = $g_db_table_prefix.'_project_customization_table';
$g_mantis_custom_field_project_table = $g_db_table_prefix.'_custom_field_project_table';
$g_mantis_custom_field_table = $g_db_table_prefix.'_custom_field_table';
$g_mantis_custom_field_string_table = $g_db_table_prefix.'_custom_field_string_table';

###########################
# Mantis Enum Strings
Expand Down Expand Up @@ -821,4 +824,14 @@
# Assign to this variable a keyword that won't change. If this value changes
# all hyper links to defects will be not work.
$g_admin_crypt_word = $g_path;

###########################
# Experimental features
###########################
# --- custom fields ---------
# allow the user / administrator to create custom fields for each project
# WARNING: this feature is in heavy development and is subject to change.
# There will be no upgrade path for this stuff as it is being developed.
# So don't enable it now unless you're developing on it.
$g_use_experimental_custom_fields = OFF;
?>
2 changes: 2 additions & 0 deletions constant_inc.php
Expand Up @@ -202,6 +202,8 @@

# ERROR_CUSTOM_FIELD_*
define( 'ERROR_CUSTOM_FIELD_NOT_FOUND', 1300 );
define( 'ERROR_CUSTOM_FIELD_CAPTION_NOT_UNIQUE',1301 );
define( 'ERROR_CUSTOM_FIELD_IN_USE', 1302 );

# Status Legend Position
define( 'STATUS_LEGEND_POSITION_TOP', 1);
Expand Down
5 changes: 5 additions & 0 deletions core/API.php
Expand Up @@ -64,6 +64,11 @@
require_once( $t_core_dir.'project_api.php' );
require_once( $t_core_dir.'filter_api.php' );

# include the custom_field stuff if the config value is set to ON
if ( ON == config_get( 'use_experimental_custom_fields' ) ) {
require_once( $t_core_dir.'custom_field_api.php' );
}

# Include LDAP only if needed.
if ( ( ON == config_get( 'use_ldap_email' ) ) || ( LDAP == config_get ( 'login_method' ) ) ) {
require_once( $t_core_dir.'ldap_api.php' );
Expand Down

0 comments on commit 87789de

Please sign in to comment.