Skip to content

Commit

Permalink
NBBIB-335 Refine duplicate match algorithm to match all last names
Browse files Browse the repository at this point in the history
  • Loading branch information
camilocodes committed Oct 6, 2023
1 parent 6c2a53c commit 1b0c9cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions custom/modules/nbbib_core/src/Form/MergeContribsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,13 @@ public function buildForm(array $form, FormStateInterface $form_state, $yabrm_co
$name2 = $obj->getName();

if (!$inst) {
$name2 = trim(
$obj->getFirstName() .
$obj->getLastName()
);
$name2 = $obj->getLastName();
}
// Get the percentage of similar characters in $perc.
similar_text($name2, $name, $perc);

// If characters match over 60%...
if ($perc > 60) {
if ($perc > 30) {
// Add to results list.
$results[] = $candidate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<div{{ attributes.addClass('yabrm-contributor', 'contrib-layout') }}>
{% if content %}
{{ dump(content) }}
<div class="container">
<div class="row description-pic">
{% if content.picture|field_value
Expand Down

0 comments on commit 1b0c9cd

Please sign in to comment.