Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 23c714123bc3
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8d35e57a9977
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 2, 2012

  1. 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
    dregad committed Jul 2, 2012
    Copy the full SHA
    802e559 View commit details
  2. 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
    dregad committed Jul 2, 2012
    Copy the full SHA
    8d35e57 View commit details
Showing with 4 additions and 4 deletions.
  1. +2 −2 api/soap/mc_issue_api.php
  2. +2 −2 core/user_api.php
4 changes: 2 additions & 2 deletions api/soap/mc_issue_api.php
Original file line number Diff line number Diff line change
@@ -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;
}
4 changes: 2 additions & 2 deletions core/user_api.php
Original file line number Diff line number Diff line change
@@ -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 );
}