Skip to content

Conversation

@Zipher04
Copy link
Contributor

The statusNameL may contain non-ANSI characters, which cannot be used as array index.
The status code needed for m_statusByColumns is directly calculated by PHP.

Zipher04 added 2 commits May 11, 2018 17:58
Add a new class "status_code_order". Which return the status code in order of the status defined in the plugin configuration.
The statusNameL may contain non-ANSI characters, which cannot be used as array index.
The status code is get from PHP directly.
@AuthenticEshkinKot
Copy link
Owner

Hi, @Zipher04 !
Thanks for your PR. I would like to merge it, but I have one question - why did you add "status_code_order"? As far as I can see, you don't use it.

Fixed getStatusCodes_st() should get value from "status_code_order" from php page.
@Zipher04
Copy link
Contributor Author

Hello, @AuthenticEshkinKot
Sorry for the error. The "status_code_order" should be used by getStatusCodes_st(). Please see the fix above. Thank you!


foreach( $status_name as $t_name ) {
for ( $i = 0 ; $i < sizeof($t_status_array) ; $i++ ){
if ( 0 == strcmp($t_name, $t_status_array[$i][1]) ){
Copy link
Owner

@AuthenticEshkinKot AuthenticEshkinKot May 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're trying to compare status name from mantis ($t_status_array[$i][1], from config_get( 'status_enum_string' )), that is always english, and localized status name ($t_name, from $status_order), that may be on any other language. In such a case, this code compare will never return "true".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zipher04
Would you like to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants