Skip to content

Commit

Permalink
Bug 14387: Merge reference selection has no effect when merging autho…
Browse files Browse the repository at this point in the history
…rities.

This patch swaps the authority records according to the refenrece record selection.

To TEST:
Merge two authority records, select the second as merge reference.
The reference authority is always the first.

Apply the patch.
Repeat previous steps, the authority is now merged using the selected reference record.

	modified:   authorities/merge.pl

Signed-off-by: Nick Clemens <[email protected]>

Signed-off-by: Jonathan Druart <[email protected]>
Signed-off-by: Tomas Cohen Arazi <[email protected]>
  • Loading branch information
mxbeaulieu authored and tomascohen committed Jul 24, 2015
1 parent f7ed250 commit ee7666a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions authorities/merge.pl
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@
}
}

my $notreference =
( $authid[0] == $mergereference )
? $authid[1]
: $authid[0];
#Setting $notreference
my $notreference = $authid[1];
if($mergereference == $notreference){
$notreference = $authid[0];
#Swap so $recordObj1 is always the correct merge reference
($recordObj1, $recordObj2) = ($recordObj2, $recordObj1);
}

# Creating a loop for display

Expand Down

0 comments on commit ee7666a

Please sign in to comment.