http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9497
--- Comment #3 from Magnus Enger <[email protected]> --- Problems: This code in admin/z3950servers.pl was creating separate variables for each encoding: $template->param( $_ . $data->{$_} => 1) for ( qw( syntax encoding ) ); And the corresponding code in the template had to check each of these variables to decide which one should be selected: [% 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 %] etc. This has a couple of problems: - Encodings with a hyphen ("-") in them create invalid variable names in TT, as seen in Bug 8081 - Adding a new encoding means adding 5 lines to the template My proposed solution creates just one variable for the encoding and sets it to the name of the encoding, thus avoiding the hyphen problem. It also generates the options from a list of encodings (defined in the template), which means that future encodings can just be added to the list. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
