Bugzilla – Attachment 14876 Details for
Bug 9497
Make it easier to add to the the list of possible encodings for Z39.50 servers and add ISO 8859-1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9497 - Make it easier to add new encodings for Z39.50 servers and add ISO 8859-1
Bug-9497---Make-it-easier-to-add-new-encodings-for.patch (text/plain), 3.24 KB, created by
Bernardo Gonzalez Kriegel
on 2013-01-27 13:59:05 UTC
(
hide
)
Description:
Bug 9497 - Make it easier to add new encodings for Z39.50 servers and add ISO 8859-1
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-01-27 13:59:05 UTC
Size:
3.24 KB
patch
obsolete
>From f984742a16513033eb6c742445c2ea3b32575e7b Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@enger.priv.no> >Date: Sun, 27 Jan 2013 14:00:45 +0100 >Subject: [PATCH] Bug 9497 - Make it easier to add new encodings for Z39.50 > servers and add ISO 8859-1 > >This patch does three things: >- Makes admin/z3950servers.pl create one variable for encoding, > not one variable for each encoding >- Makes the template create encoding options from a list >- Adds ISO 8859-1 to the list of available encodings >See the bug for a lengthier description > >To test: >- Apply the patch >- Edit one Z39.50 server several times, choosing each available encoding in turn >- Check that for each encoding, the correct encoding is shown both in the list of > Z39.50 servers and in the dropdown on the edit screen > >Comment: Works as described, no errors. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > admin/z3950servers.pl | 4 +-- > .../prog/en/modules/admin/z3950servers.tt | 30 ++++---------------- > 2 files changed, 8 insertions(+), 26 deletions(-) > >diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl >index fc9e2ed..92cc3e5 100755 >--- a/admin/z3950servers.pl >+++ b/admin/z3950servers.pl >@@ -97,9 +97,9 @@ if ($op eq 'add_form') { > $sth->finish; > } > $template->param( $_ => $data->{$_} ) >- for ( qw( host port db userid password checked rank timeout ) ); >+ for ( qw( host port db userid password checked rank timeout encoding ) ); > $template->param( $_ . $data->{$_} => 1) >- for ( qw( syntax encoding ) ); >+ for ( qw( syntax ) ); > # END $OP eq ADD_FORM > ################## ADD_VALIDATE ################################## > # called by add_form, used to insert/modify data in DB >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >index 3205e6f..a2f473d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >@@ -203,30 +203,12 @@ > > <li><label for="encoding">Encoding (z3950 can send<br /> records in various encodings. Choose one): </label> > <select name="encoding"> >-[% IF ( encodingutf8 ) %] >-<option value="utf8" selected="selected">UTF-8</option> >-[% ELSE %] >-<option value="utf8">UTF-8</option> >-[% END %] >-[% IF ( encodingEUC_KR ) %] >-<option value="EUC-KR" selected="selected">EUC-KR</option> >-[% ELSE %] >-<option value="EUC-KR">EUC-KR</option> >-[% END %] >-[% IF ( encodingISO_5426 ) %] >-<option value="ISO_5426" selected="selected">ISO_5426</option> >-[% ELSE %] >-<option value="ISO_5426">ISO_5426</option> >-[% END %] >-[% IF ( encodingISO_6937 ) %] >-<option value="ISO_6937" selected="selected">ISO_6937</option> >-[% ELSE %] >-<option value="ISO_6937">ISO_6937</option> >-[% END %] >-[% IF ( encodingMARC_8 ) %] >-<option value="MARC-8" selected="selected">MARC-8</option> >-[% ELSE %] >-<option value="MARC-8">MARC-8</option> >+[% FOREACH enc IN [ 'utf8' 'EUC-KR' 'ISO_5426' 'ISO_6937' 'ISO_8859-1' 'MARC-8' ] %] >+ [% IF ( encoding == enc ) %] >+ <option value="[% enc %]" selected="selected">[% enc %]</option> >+ [% ELSE %] >+ <option value="[% enc %]">[% enc %]</option> >+ [% END %] > [% END %] > </select> > </li> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9497
:
14875
|
14876
|
14933