View | Details | Raw Unified | Return to bug 11300
Collapse All | Expand All

(-)a/C4/Biblio.pm.rej (-20 lines)
Lines 1-20 Link Here
1
diff a/C4/Biblio.pm b/C4/Biblio.pm	(rejected hunks)
2
@@ -461,7 +462,7 @@ sub BiblioAutoLink {
3
4
 =head2 LinkBibHeadingsToAuthorities
5
6
-  my $num_headings_changed, %results = LinkBibHeadingsToAuthorities($linker, $marc, $frameworkcode, [$allowrelink, $verbose]);
7
+  my $num_headings_changed, %results = LinkBibHeadingsToAuthorities($linker, $marc, $frameworkcode, [$allowrelink, $verbose, $dont_auto_create]);
8
9
 Links bib headings to authority records by checking
10
 each authority-controlled field in the C<MARC::Record>
11
@@ -484,7 +485,9 @@ sub LinkBibHeadingsToAuthorities {
12
     my $frameworkcode = shift;
13
     my $allowrelink = shift;
14
     my $verbose = shift;
15
+    my $dont_auto_create = shift;
16
     my %results;
17
+    my $linker_default=C4::Linker::Default->new();
18
     if (!$bib) {
19
         carp 'LinkBibHeadingsToAuthorities called on undefined bib record';
20
         return ( 0, {});
(-)a/C4/Linker/Z3950Server.pm (-3 / +2 lines)
Lines 15-22 package C4::Linker::Z3950Server; Link Here
15
# You should have received a copy of the GNU General Public License
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use strict;
18
use Modern::Perl;
19
use warnings;
20
use Carp;
19
use Carp;
21
use MARC::Field;
20
use MARC::Field;
22
use MARC::Record;
21
use MARC::Record;
Lines 149-155 sub getZ3950Authority { Link Here
149
148
150
            if($server) {
149
            if($server) {
151
                my $options = ZOOM::Options->new();
150
                my $options = ZOOM::Options->new();
152
                $options->option('cclfile' => C4::Context->new()->{"serverinfo"}->{"authorityserver"}->{"ccl2rpn"});
151
                $options->option('cclfile' => C4::Context->new()->{"config"}->{"serverinfo"}->{"authorityserver"}->{"ccl2rpn"});
153
                $options->option('elementSetName', 'F');
152
                $options->option('elementSetName', 'F');
154
                $options->option('async', 0);
153
                $options->option('async', 0);
155
                $options->option('databaseName', $server->{db});
154
                $options->option('databaseName', $server->{db});
(-)a/installer/data/mysql/atomicupdate/Bug11300_LinkerZ3950Server_syspef.sql (-9 lines)
Lines 1-9 Link Here
1
$DBversion = 'XXX';
2
if ( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`)
5
        VALUES ('LinkerZ3950Server', '', NULL, 'Import authorities from this Z39.50 server when searching for authority links with the Z39.50 Server linker module', 'free')
6
    ­});
7
8
    NewVersion( $DBversion, 12446, "Add new system preference LinkerZ3950Server");
9
}
(-)a/installer/data/mysql/atomicupdate/bug_11300.pl (-1 / +14 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
3
return {
4
    bug_number => "11300",
5
    description => "Import authorities from this Z39.50 server when searching for authority links with the Z39.50 Server linker module",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('LinkerZ3950Server', '', NULL, 'Import authorities from this Z39.50 server when searching for authority links with the Z39.50 Server linker module', 'free') });
11
12
        say $out "Added system preference 'LinkerZ3950Server'";
13
    },
14
};

Return to bug 11300