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

(-)a/C4/Breeding.pm (-2 / +2 lines)
Lines 455-463 sub _isbn_replace { Link Here
455
455
456
=head2 ImportBreedingAuth
456
=head2 ImportBreedingAuth
457
457
458
	ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type);
458
ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type);
459
459
460
	TODO description
460
TODO description
461
461
462
=cut
462
=cut
463
463
(-)a/admin/z3950servers.pl (-51 / +54 lines)
Lines 85-108 $template->param(script_name => $script_name, Link Here
85
85
86
################## ADD_FORM ##################################
86
################## ADD_FORM ##################################
87
# called by default. Used to create form to add or  modify a record
87
# called by default. Used to create form to add or  modify a record
88
if ($op eq 'add_form') {
88
if ( $op eq 'add_form' ) {
89
	$template->param(add_form => 1);
89
    $template->param( add_form => 1 );
90
	#---- if primkey exists, it's a modify action, so read values to modify...
90
91
	my $data;
91
    #---- if primkey exists, it's a modify action, so read values to modify...
92
	if ($searchfield) {
92
    my $data;
93
		my $dbh = C4::Context->dbh;
93
    if ($searchfield) {
94
		my $sth=$dbh->prepare("select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name");
94
        my $dbh = C4::Context->dbh;
95
		$sth->execute($searchfield);
95
        my $sth = $dbh->prepare(
96
		$data=$sth->fetchrow_hashref;
96
"select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name"
97
		$sth->finish;
97
        );
98
	}
98
        $sth->execute($searchfield);
99
    $template->param( $_ => $data->{$_} ) 
99
        $data = $sth->fetchrow_hashref;
100
        for ( qw( host port db userid password checked rank timeout encoding ) );
100
        $sth->finish;
101
    $template->param( $_ . $data->{$_} => 1)
101
    }
102
        for ( qw( syntax recordtype ) );
102
    $template->param( $_ => $data->{$_} )
103
													# END $OP eq ADD_FORM
103
      for (qw( host port db userid password checked rank timeout encoding ));
104
    $template->param( $_ . $data->{$_} => 1 ) for (qw( syntax recordtype ));
105
106
    # END $OP eq ADD_FORM
104
################## ADD_VALIDATE ##################################
107
################## ADD_VALIDATE ##################################
105
# called by add_form, used to insert/modify data in DB
108
    # called by add_form, used to insert/modify data in DB
106
} elsif ($op eq 'add_validate') {
109
} elsif ($op eq 'add_validate') {
107
	my $dbh=C4::Context->dbh;
110
	my $dbh=C4::Context->dbh;
108
	my $sth=$dbh->prepare("select * from z3950servers where name=?");
111
	my $sth=$dbh->prepare("select * from z3950servers where name=?");
Lines 133-175 if ($op eq 'add_form') { Link Here
133
		  "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " .
136
		  "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " .
134
		  "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" );
137
		  "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" );
135
        $sth->execute(
138
        $sth->execute(
136
            $input->param( 'host' ),
139
            $input->param('host'),     $input->param('port'),
137
            $input->param( 'port' ),
140
            $input->param('db'),       $input->param('userid'),
138
            $input->param( 'db' ),
141
            $input->param('password'), $input->param('searchfield'),
139
            $input->param( 'userid' ),
142
            $checked,                  $input->param('rank'),
140
            $input->param( 'password' ),
143
            $input->param('syntax'),   $input->param('encoding'),
141
            $input->param( 'searchfield' ),
144
            $input->param('timeout'),  $input->param('recordtype')
142
            $checked,
145
        );
143
            $input->param( 'rank' ),
146
    }
144
            $input->param( 'syntax' ),
147
    $sth->finish;
145
            $input->param( 'encoding' ),
148
146
            $input->param( 'timeout' ),
149
    # END $OP eq ADD_VALIDATE
147
            $input->param( 'recordtype' ) );
148
	}
149
	$sth->finish;
150
													# END $OP eq ADD_VALIDATE
151
################## DELETE_CONFIRM ##################################
150
################## DELETE_CONFIRM ##################################
152
# called by default form, used to confirm deletion of data in DB
151
# called by default form, used to confirm deletion of data in DB
153
} elsif ($op eq 'delete_confirm') {
152
} elsif ($op eq 'delete_confirm') {
154
	$template->param(delete_confirm => 1);
153
    $template->param( delete_confirm => 1 );
155
	my $dbh = C4::Context->dbh;
154
    my $dbh = C4::Context->dbh;
156
155
157
	my $sth2=$dbh->prepare("select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name");
156
    my $sth2 = $dbh->prepare(
158
	$sth2->execute($searchfield);
157
"select host,port,db,userid,password,name,id,checked,rank,syntax,encoding,timeout,recordtype from z3950servers where (name = ?) order by rank,name"
159
	my $data=$sth2->fetchrow_hashref;
158
    );
160
	$sth2->finish;
159
    $sth2->execute($searchfield);
161
160
    my $data = $sth2->fetchrow_hashref;
162
        $template->param(host => $data->{'host'},
161
    $sth2->finish;
163
                         port => $data->{'port'},
162
164
                         db   => $data->{'db'},
163
    $template->param(
165
                         userid => $data->{'userid'},
164
        host       => $data->{'host'},
166
                         password => $data->{'password'},
165
        port       => $data->{'port'},
167
                         checked => $data->{'checked'},
166
        db         => $data->{'db'},
168
                         rank => $data->{'rank'},
167
        userid     => $data->{'userid'},
169
                         syntax => $data->{'syntax'},
168
        password   => $data->{'password'},
170
                         timeout => $data->{'timeout'},
169
        checked    => $data->{'checked'},
171
                         recordtype => $data->{'recordtype'},
170
        rank       => $data->{'rank'},
172
                         encoding => $data->{'encoding'}            );
171
        syntax     => $data->{'syntax'},
172
        timeout    => $data->{'timeout'},
173
        recordtype => $data->{'recordtype'},
174
        encoding   => $data->{'encoding'}
175
    );
173
176
174
													# END $OP eq DELETE_CONFIRM
177
													# END $OP eq DELETE_CONFIRM
175
################## DELETE_CONFIRMED ##################################
178
################## DELETE_CONFIRMED ##################################
(-)a/cataloguing/z3950_auth_search.pl (-1 / +1 lines)
Lines 23-29 Link Here
23
23
24
use strict;
24
use strict;
25
use warnings;
25
use warnings;
26
use CGI qw( -utf8 );
26
use CGI qw / -utf8 /;
27
27
28
use C4::Auth;
28
use C4::Auth;
29
use C4::Output;
29
use C4::Output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-5 / +7 lines)
Lines 241-247 Link Here
241
		<input type="text" name="timeout" id="timeout" size="4" value="[% timeout %]" onblur="isNum(this)" /> seconds
241
		<input type="text" name="timeout" id="timeout" size="4" value="[% timeout %]" onblur="isNum(this)" /> seconds
242
	</li>
242
	</li>
243
    <li><label for="recordtype">Record type: </label>
243
    <li><label for="recordtype">Record type: </label>
244
		<select name="recordtype" id="recordtype">
244
    <select name="recordtype" id="recordtype">
245
            [% IF ( recordtypebiblio ) %]
245
            [% IF ( recordtypebiblio ) %]
246
            <option value="biblio" selected="selected">Bibliographic</option>
246
            <option value="biblio" selected="selected">Bibliographic</option>
247
            [% ELSE %]
247
            [% ELSE %]
Lines 253-259 Link Here
253
                   <option value="authority">Authority</option>
253
                   <option value="authority">Authority</option>
254
            [% END %]
254
            [% END %]
255
        </select>
255
        </select>
256
	</li>
256
    </li>
257
</ol>
257
</ol>
258
        </fieldset>
258
        </fieldset>
259
		
259
		
Lines 314-320 Link Here
314
314
315
        [% IF ( searchfield ) %]
315
        [% IF ( searchfield ) %]
316
                You searched for [% searchfield %]
316
                You searched for [% searchfield %]
317
        [% END %]		
317
        [% END %]
318
<table id="serverst">
318
<table id="serverst">
319
                <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th>&nbsp;</th><th>&nbsp;</th>
319
                <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th>&nbsp;</th><th>&nbsp;</th>
320
                </tr></thead>
320
                </tr></thead>
Lines 324-332 Link Here
324
                [% ELSE %]
324
                [% ELSE %]
325
                    <tr>
325
                    <tr>
326
                [% END %]
326
                [% END %]
327
<td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td>			<td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td><td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.name |url %]">Delete</a></td>                </tr>
327
<td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td>
328
329
<td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td><td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.name |url %]">Delete</a></td>                </tr>
328
                [% END %]</tbody>
330
                [% END %]</tbody>
329
	</table>
331
</table>
330
332
331
[% IF ( offsetgtzero ) %]<form action="[% script_name %]" method="get">
333
[% IF ( offsetgtzero ) %]<form action="[% script_name %]" method="get">
332
	<input type="hidden" name="offset" value="[% prevpage %]" />
334
	<input type="hidden" name="offset" value="[% prevpage %]" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-5 / +4 lines)
Lines 101-107 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
101
        <div>
101
        <div>
102
    [% END %]
102
    [% END %]
103
    <div id="bd">
103
    <div id="bd">
104
	[% IF ( opsearch ) %]
104
    [% IF ( opsearch ) %]
105
        <h2>Z39.50 Authority search points</h2>
105
        <h2>Z39.50 Authority search points</h2>
106
        <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
106
        <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
107
        <input type="hidden" name="op" id="op" value="do_search" />
107
        <input type="hidden" name="op" id="op" value="do_search" />
Lines 160-166 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
160
    </tr></thead>
160
    </tr></thead>
161
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
161
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
162
        [% IF ( breeding_loo.breedingid ) %]
162
        [% IF ( breeding_loo.breedingid ) %]
163
	    <tr id="row[% breeding_loo.breedingid %]">
163
        <tr id="row[% breeding_loo.breedingid %]">
164
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]'); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
164
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]'); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
165
            <td>[% breeding_loo.heading %]</td>
165
            <td>[% breeding_loo.heading %]</td>
166
            <td>[% breeding_loo.heading_code %]</td>
166
            <td>[% breeding_loo.heading_code %]</td>
Lines 214-224 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
214
            </div>
214
            </div>
215
         [% END %]
215
         [% END %]
216
   <div class="dialog message">Nothing found.</div>
216
   <div class="dialog message">Nothing found.</div>
217
	<p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="submit" value="Try Another Search"/></form></p>
217
    <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="submit" value="Try Another Search"/></form></p>
218
    [% END %]
218
    [% END %]
219
219
220
[% END %]
220
[% END %]
221
	</div>
221
</div>
222
</div>
222
</div>
223
223
224
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
224
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
225
- 

Return to bug 10096