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

(-)a/C4/Breeding.pm (-1 / +7 lines)
Lines 435-441 sub _create_connection { Link Here
435
        }
435
        }
436
        $obj->connect( $host.':'.$server->{port}.'/'.$server->{db} );
436
        $obj->connect( $host.':'.$server->{port}.'/'.$server->{db} );
437
    } else {
437
    } else {
438
        $obj->connect( $server->{host}, $server->{port} );
438
        if (C4::Context->preference('HttpForwardProxy') ne "" && !$server->{do_not_use_proxy}){
439
            my $proxy = C4::Context->preference('HttpForwardProxy');
440
            $proxy =~ s/^http(s)?\:\/\///;
441
            $obj->connect( "connect:$proxy,tcp:".$server->{host}.":".$server->{port} );
442
        }else{
443
            $obj->connect( $server->{host}, $server->{port} );
444
        }
439
    }
445
    }
440
    return $obj;
446
    return $obj;
441
}
447
}
(-)a/Koha/Schema/Result/Z3950server.pm (+9 lines)
Lines 162-167 zero or more paths to XSLT files to be processed on the search results Link Here
162
162
163
additional attributes passed to PQF queries
163
additional attributes passed to PQF queries
164
164
165
=head2 do_not_use_proxy
166
167
  data_type: 'smallint'
168
  is_nullable: 1
169
170
do not use proxy
171
165
=cut
172
=cut
166
173
167
__PACKAGE__->add_columns(
174
__PACKAGE__->add_columns(
Lines 211-216 __PACKAGE__->add_columns( Link Here
211
  { data_type => "longtext", is_nullable => 1 },
218
  { data_type => "longtext", is_nullable => 1 },
212
  "attributes",
219
  "attributes",
213
  { data_type => "varchar", is_nullable => 1, size => 255 },
220
  { data_type => "varchar", is_nullable => 1, size => 255 },
221
  "do_not_use_proxy",
222
  { data_type => "smallint", is_nullable => 1 },
214
);
223
);
215
224
216
=head1 PRIMARY KEY
225
=head1 PRIMARY KEY
(-)a/admin/z3950servers.pl (-1 / +1 lines)
Lines 66-72 if( $op eq 'cud-delete_confirmed' && $id ) { Link Here
66
} elsif ( $op eq 'cud-add_validated' ) {
66
} elsif ( $op eq 'cud-add_validated' ) {
67
    my @fields=qw/host port db userid password rank syntax encoding timeout
67
    my @fields=qw/host port db userid password rank syntax encoding timeout
68
        recordtype checked servername servertype sru_options sru_fields attributes
68
        recordtype checked servername servertype sru_options sru_fields attributes
69
        add_xslt/;
69
        add_xslt do_not_use_proxy/;
70
    my $formdata = _form_data_hashref( $input, \@fields );
70
    my $formdata = _form_data_hashref( $input, \@fields );
71
    if( $id ) {
71
    if( $id ) {
72
        my $server = Koha::Z3950Servers->find($id);
72
        my $server = Koha::Z3950Servers->find($id);
(-)a/installer/data/mysql/atomicupdate/bug_12620.pl (+21 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "12620",
5
    description => "System preference for HTTPS proxy and column in table z3950servers not_proxy",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
12
           ('HttpForwardProxy', '', '', 'HTTP Forward Proxy', 'free')
13
        });        
14
15
        unless ( column_exists( 'z3950servers', 'do_not_use_proxy' ) ) {
16
            $dbh->do(
17
                "ALTER TABLE z3950servers ADD COLUMN do_not_use_proxy TINYINT(1) DEFAULT NULL"
18
            );
19
        }
20
    },
21
};
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 6585-6590 CREATE TABLE `z3950servers` ( Link Here
6585
  `sru_fields` longtext DEFAULT NULL COMMENT 'contains the mapping between the Z3950 search fields and the specific SRU server indexes',
6585
  `sru_fields` longtext DEFAULT NULL COMMENT 'contains the mapping between the Z3950 search fields and the specific SRU server indexes',
6586
  `add_xslt` longtext DEFAULT NULL COMMENT 'zero or more paths to XSLT files to be processed on the search results',
6586
  `add_xslt` longtext DEFAULT NULL COMMENT 'zero or more paths to XSLT files to be processed on the search results',
6587
  `attributes` varchar(255) DEFAULT NULL COMMENT 'additional attributes passed to PQF queries',
6587
  `attributes` varchar(255) DEFAULT NULL COMMENT 'additional attributes passed to PQF queries',
6588
  `do_not_use_proxy` tinyint(1) DEFAULT NULL,
6588
  PRIMARY KEY (`id`)
6589
  PRIMARY KEY (`id`)
6589
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
6590
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
6590
/*!40101 SET character_set_client = @saved_cs_client */;
6591
/*!40101 SET character_set_client = @saved_cs_client */;
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 308-313 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
308
('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','','Media file extensions','free'),
308
('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','','Media file extensions','free'),
309
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
309
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
310
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
310
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
311
('HttpForwardProxy', '', '', 'HTTP Forward Proxy', 'free'),
311
('ILLCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
312
('ILLCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
312
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
313
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
313
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
314
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref (+5 lines)
Lines 135-137 Web services: Link Here
135
                0: Disable
135
                0: Disable
136
            - the IdRef web service from the OPAC detail page. IdRef allows requests for authorities from the Sudoc database.
136
            - the IdRef web service from the OPAC detail page. IdRef allows requests for authorities from the Sudoc database.
137
            - Please note that this feature is available only for UNIMARC.
137
            - Please note that this feature is available only for UNIMARC.
138
    Proxy:
139
        -
140
            - pref: HttpForwardProxy
141
              class: url
142
            - HTTP forward proxy URL for connections with Z39.50 servers.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-1 / +11 lines)
Lines 1-4 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Koha %]
2
[% USE Asset %]
3
[% USE Asset %]
3
[% USE HtmlTags %]
4
[% USE HtmlTags %]
4
[% PROCESS 'i18n.inc' %]
5
[% PROCESS 'i18n.inc' %]
Lines 195-200 Link Here
195
            <input type="text" name="show_sru_fields" id="show_sru_fields" size="100" value="[% server.sru_fields | html %]" disabled="disabled" /> <input type="button" id="modify_sru_fields" value="Modify" />
196
            <input type="text" name="show_sru_fields" id="show_sru_fields" size="100" value="[% server.sru_fields | html %]" disabled="disabled" /> <input type="button" id="modify_sru_fields" value="Modify" />
196
        </li>
197
        </li>
197
        [% END %]
198
        [% END %]
199
        [% IF Koha.Preference('HttpForwardProxy') && (server.servertype||type) == 'zed' %]
200
            <li>
201
                <label for="do_not_use_proxy">Do not use proxy: </label>
202
                [% IF ( server.do_not_use_proxy ) %]
203
                    <input type="checkbox" name="do_not_use_proxy" id="do_not_use_proxy" value="1" checked="checked" />
204
                [% ELSE %]
205
                    <input type="checkbox" name="do_not_use_proxy" id="do_not_use_proxy" value="1" />
206
                [% END %]
207
            </li>
208
        [% END %]
198
        <li>
209
        <li>
199
        <label for="add_xslt">XSLT File(s) for transforming results: </label>
210
        <label for="add_xslt">XSLT File(s) for transforming results: </label>
200
        <input type="text" name="add_xslt" id="add_xslt" size="100" value="[% server.add_xslt | html %]"/>
211
        <input type="text" name="add_xslt" id="add_xslt" size="100" value="[% server.add_xslt | html %]"/>
201
- 

Return to bug 12620