Lines 784-798
Comments : an improvement would be to return All the records that match.
Link Here
|
784 |
sub FindDuplicateAuthority { |
784 |
sub FindDuplicateAuthority { |
785 |
|
785 |
|
786 |
my ($record,$authtypecode)=@_; |
786 |
my ($record,$authtypecode)=@_; |
787 |
# warn "IN for ".$record->as_formatted; |
|
|
788 |
my $dbh = C4::Context->dbh; |
787 |
my $dbh = C4::Context->dbh; |
789 |
# warn "".$record->as_formatted; |
|
|
790 |
my $auth_tag_to_report = Koha::Authority::Types->find($authtypecode)->auth_tag_to_report; |
788 |
my $auth_tag_to_report = Koha::Authority::Types->find($authtypecode)->auth_tag_to_report; |
791 |
# warn "record :".$record->as_formatted." auth_tag_to_report :$auth_tag_to_report"; |
|
|
792 |
# build a request for SearchAuthorities |
789 |
# build a request for SearchAuthorities |
793 |
my $op = 'AND'; |
790 |
my $op = 'AND'; |
794 |
$authtypecode =~ s#/#\\/#; # GENRE/FORM contains forward slash which is a reserved character |
791 |
my $query='at:"'.$authtypecode.'" '; # Quote authtype code to avoid unescaping slash in GENRE/FORM later |
795 |
my $query='at:'.$authtypecode.' '; |
|
|
796 |
my $filtervalues=qr([\001-\040\Q!'"`#$%&*+,-./:;<=>?@(){[}_|~\E\]]); |
792 |
my $filtervalues=qr([\001-\040\Q!'"`#$%&*+,-./:;<=>?@(){[}_|~\E\]]); |
797 |
if ($record->field($auth_tag_to_report)) { |
793 |
if ($record->field($auth_tag_to_report)) { |
798 |
foreach ($record->field($auth_tag_to_report)->subfields()) { |
794 |
foreach ($record->field($auth_tag_to_report)->subfields()) { |
799 |
- |
|
|