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('HTTPS_Proxy') ne "" && !$server->{not_proxy}){
439
            my $proxy = C4::Context->preference('HTTPS_Proxy');
440
            $proxy =~ s/http(s)?\:\/\///g;
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 not_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
  "not_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 not_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
           ('HTTPS_Proxy', '', '', 'HTTPS proxy URL', 'free')
13
        });        
14
15
        unless ( column_exists( 'z3950servers', 'not_proxy' ) ) {
16
            $dbh->do(
17
                "ALTER TABLE z3950servers ADD COLUMN not_proxy TINYINT(1) DEFAULT NULL"
18
            );
19
        }
20
    },
21
};
(-)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: HTTPS_Proxy
141
              class: url
142
            - HTTPS proxy URL for connections with Z3950 servers.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-1 / +8 lines)
Lines 196-201 Link Here
196
        </li>
196
        </li>
197
        [% END %]
197
        [% END %]
198
        <li>
198
        <li>
199
        <li>
200
            <label for="not_proxy">Do not use proxy: </label>
201
            [% IF ( server.not_proxy ) %]
202
                <input type="checkbox" name="not_proxy" id="not_proxy" value="1" checked="checked" />
203
            [% ELSE %]
204
                <input type="checkbox" name="not_proxy" id="not_proxy" value="1" />
205
            [% END %]
206
        </li>
199
        <label for="add_xslt">XSLT File(s) for transforming results: </label>
207
        <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 %]"/>
208
        <input type="text" name="add_xslt" id="add_xslt" size="100" value="[% server.add_xslt | html %]"/>
201
        <div class="hint">Separate multiple filenames by commas.</div>
209
        <div class="hint">Separate multiple filenames by commas.</div>
202
- 

Return to bug 12620