Skip to content

Commit

Permalink
Fix tag attach/detach for non-admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
rombert committed Mar 7, 2012
1 parent ecf22ae commit 94f4143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/soap/mc_tag_api.php
Expand Up @@ -149,13 +149,13 @@ function mci_tag_set_for_issue ( $p_issue_id, $p_tags, $p_user_id ) {

foreach ( $t_tag_ids_to_detach as $t_tag_id ) {
if ( access_has_bug_level ( config_get('tag_detach_threshold'), $p_issue_id, $p_user_id ) ) {
tag_bug_detach( $t_tag_id, $p_issue_id, true);
tag_bug_detach( $t_tag_id, $p_issue_id, $p_user_id);
}
}

foreach ( $t_tag_ids_to_attach as $t_tag_id ) {
if ( access_has_bug_level ( config_get('tag_attach_threshold'), $p_issue_id, $p_user_id ) ) {
tag_bug_attach( $t_tag_id, $p_issue_id, true);
tag_bug_attach( $t_tag_id, $p_issue_id, $p_user_id);
}
}
}

2 comments on commit 94f4143

@atrol
Copy link
Member

@atrol atrol commented on 94f4143 Mar 7, 2012

Choose a reason for hiding this comment

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

Really?
I didn't have a deeper look but have a look at the signature of the function tag_bug_detach, user_id is the fourth parameter.
function tag_bug_detach( $p_tag_id, $p_bug_id, $p_add_history = true, $p_user_id = null )

@rombert
Copy link
Member Author

@rombert rombert commented on 94f4143 Mar 7, 2012

Choose a reason for hiding this comment

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

@atrol You're obviously right, thanks.

Please sign in to comment.