Manage Columns Name
Posted: 09 Nov 2022, 20:32
Hello,
I recently created a plugin to create a column called "date_closed".
Code is here: https://github.com/priyam759/MantisBT-P ... /tree/main
When going into manage columns, I want the field name there to look like "date_closed" just like "date_submitted" is. However, an "_" is being added automatically to the end of the field name there. (See attached).
There is nothing in MantisColumn class or MantisPlugin class to change this, and when I checked core/plugin_api.php I saw some code that I believe is the reason this is occurring (see function below)
function plugin_config_get( $p_option, $p_default = null, $p_global = false, $p_user = null, $p_project = null ) {
$t_basename = plugin_get_current();
$t_full_option = 'plugin_' . $t_basename . '_' . $p_option;
if( $p_global ) {
return config_get_global( $t_full_option, $p_default );
} else {
return config_get( $t_full_option, $p_default, $p_user, $p_project );
}
}
Is there any way to override this or another function that is responsible for the "_" being added automatically in Manage Columns in my plugin?
Thank you
I recently created a plugin to create a column called "date_closed".
Code is here: https://github.com/priyam759/MantisBT-P ... /tree/main
When going into manage columns, I want the field name there to look like "date_closed" just like "date_submitted" is. However, an "_" is being added automatically to the end of the field name there. (See attached).
There is nothing in MantisColumn class or MantisPlugin class to change this, and when I checked core/plugin_api.php I saw some code that I believe is the reason this is occurring (see function below)
function plugin_config_get( $p_option, $p_default = null, $p_global = false, $p_user = null, $p_project = null ) {
$t_basename = plugin_get_current();
$t_full_option = 'plugin_' . $t_basename . '_' . $p_option;
if( $p_global ) {
return config_get_global( $t_full_option, $p_default );
} else {
return config_get( $t_full_option, $p_default, $p_user, $p_project );
}
}
Is there any way to override this or another function that is responsible for the "_" being added automatically in Manage Columns in my plugin?
Thank you