Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mantisbt/mantisbt
base: 23c714123bc3
...
head fork: mantisbt/mantisbt
compare: 8d35e57a9977
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jul 02, 2012
@dregad dregad SOAP API: calling mc_issue_update unduly updated bugnotes
History shows 'Note View State changed' even though it has not been
modified, and if time tracking is enabled the bugnote's last_updated
date is changed.

This was caused by a type-strict comparison of the value returned by the
api (string) to an integer.

Fixes #14412
802e559
@dregad dregad LDAP binding calls are made even if $g_login_method <> LDAP
If for some reason $g_use_ldap_email or $g_use_ldap_realname are ON with
$g_login_method <> 'LDAP', binding calls are attempted when retrieving
the user's e-mail or real name.

Adding a check on $g_login_method to avoid this unwanted behavior.

Fixes #14442
8d35e57
Showing with 4 additions and 4 deletions.
  1. +2 −2 api/soap/mc_issue_api.php
  2. +2 −2 core/user_api.php
View
4 api/soap/mc_issue_api.php
@@ -874,12 +874,12 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
$t_bugnote_changed = true;
}
- if ( $t_bugnote->view_state !== $t_view_state_id ) {
+ if ( $t_bugnote->view_state != $t_view_state_id ) {
bugnote_set_view_state( $t_bugnote_id, $t_view_state_id == VS_PRIVATE );
$t_bugnote_changed = true;
}
- if ( isset( $t_note['time_tracking']) && $t_note['time_tracking'] !== $t_bugnote->time_tracking ) {
+ if ( isset( $t_note['time_tracking']) && $t_note['time_tracking'] != $t_bugnote->time_tracking ) {
bugnote_set_time_tracking( $t_bugnote_id, mci_get_time_tracking_from_note( $p_issue_id, $t_note ) );
$t_bugnote_changed = true;
}
View
4 core/user_api.php
@@ -738,7 +738,7 @@ function user_get_field( $p_user_id, $p_field_name ) {
# lookup the user's email in LDAP or the db as appropriate
function user_get_email( $p_user_id ) {
$t_email = '';
- if( ON == config_get( 'use_ldap_email' ) ) {
+ if( LDAP == config_get( 'login_method' ) && ON == config_get( 'use_ldap_email' ) ) {
$t_email = ldap_email( $p_user_id );
}
if( is_blank( $t_email ) ) {
@@ -752,7 +752,7 @@ function user_get_email( $p_user_id ) {
function user_get_realname( $p_user_id ) {
$t_realname = '';
- if ( ON == config_get( 'use_ldap_realname' ) ) {
+ if ( LDAP == config_get( 'login_method' ) && ON == config_get( 'use_ldap_realname' ) ) {
$t_realname = ldap_realname( $p_user_id );
}

No commit comments for this range

Something went wrong with that request. Please try again.