Browse files

Changesets store author's id instead of committer

When a commit is authored by A and committed by B, Source_Parse_Users()
function incorrectly sets A's id instead of B's as the committer,
resulting in incorrect changeset information being stored in the DB.

Fixes #44
  • Loading branch information...
1 parent 71c554a commit 602cc40b59063e0c47ce46f394f39b2e6e39f380 @dregad dregad committed Feb 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/Source.API.php
View
2 Source/Source.API.php
@@ -188,7 +188,7 @@ function Source_Parse_Users( $p_changeset ) {
}
# Look up the email address if given
- if ( $t_email = $t_email ) {
+ if ( $t_email = $p_changeset->committer_email ) {
@jreese
jreese added a note Feb 22, 2013

Forgive me since it's been a long time, but should this actually be a double-equals, or is the assignment the correct behavior?

@atrol
MantisBT Community Plugins member
atrol added a note Feb 22, 2013

I think this is correct.
This coding style is often used in this file.

@morgant
morgant added a note Feb 22, 2013

Agreed. It's assigning the value to $t_email and checking that it's not "empty".

@jreese
jreese added a note Feb 22, 2013

Thank you. I've obviously spent too much time writing Python since I worked on this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
if ( isset( $s_emails[ $t_email ] ) ) {
$p_changeset->committer_id = $s_emails[ $t_email ];
break;

0 comments on commit 602cc40

Please sign in to comment.