From dcaa31b53d762f62555a5a68f912797cdd028736 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 26 Dec 2017 18:05:56 -0300 Subject: [PATCH] Bug 19881: Remove authorities-list.pl For obvious reasons... Signed-off-by: Katrin Fischer --- authorities/authorities-list.pl | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 authorities/authorities-list.pl diff --git a/authorities/authorities-list.pl b/authorities/authorities-list.pl deleted file mode 100755 index 0afa5e7fba..0000000000 --- a/authorities/authorities-list.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use C4::Context; -use C4::AuthoritiesMarc; -use utf8; -use open qw[ :std :encoding(utf8) ]; -use Koha::SearchEngine; -use Koha::SearchEngine::Search; - -my $dbh=C4::Context->dbh; -my $datatypes_query = $dbh->prepare(<execute; -my $datatypes=$datatypes_query->fetchall_arrayref({}); -my %authtypes; -map { $authtypes{$_->{'authtypecode'}}={"tag"=> $_->{'auth_tag_to_report'}, "lib"=> $_->{'authtypetext'}};} @$datatypes; -my $data_query = $dbh->prepare(<execute; -my $dataauthorities=$data_query->fetchall_arrayref({}); -foreach my $authority (@$dataauthorities){ - my $marcauthority=GetAuthority($authority->{'authid'}); - my $query; - $query= "an=".$authority->{'authid'}; - # search for biblios mapped - my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); - my ($err,undef,$used) = $searcher->simple_search_compat($query,0,1); - if (defined $err) { - $used = 0; - } - if ($marcauthority && $marcauthority->field($authtypes{$authority->{'authtypecode'}}->{'tag'})){ - print qq("),$marcauthority->field($authtypes{$authority->{'authtypecode'}}->{"tag"})->as_string(),qq(";),qq($authority->{'authid'};"),$authtypes{$authority->{'authtypecode'}}->{'lib'},qq(";$used\n); - } -} -- 2.11.0