Update of /cvsroot/koha/koha/C4 In directory usw-pr-cvs1:/tmp/cvs-serv13719 Modified Files: Koha.pm Log Message: moved ethnicity fixing out of moremember.pl into a function, eventually to replace with a more configurable version (non-NZ specific) Index: Koha.pm =================================================================== RCS file: /cvsroot/koha/koha/C4/Koha.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Koha.pm 8 Apr 2002 23:44:43 -0000 1.1 --- Koha.pm 15 Apr 2002 16:15:38 -0000 1.2 *************** *** 9,13 **** @ISA = qw(Exporter); ! @EXPORT = qw(&slashifyDate); use vars qw(); --- 9,14 ---- @ISA = qw(Exporter); ! @EXPORT = qw(&slashifyDate ! &fixEthnicity); use vars qw(); *************** *** 21,24 **** --- 22,40 ---- } + sub fixEthnicity($) { # a temporary fix ethnicity, it should really be handled + # in Search.pm or the DB ... + + my $ethnicity = shift; + if ($ethnicity eq 'maori') { + $ethnicity = 'Maori'; + } elsif ($ethnicity eq 'european') { + $ethnicity = 'European/Pakeha'; + } elsif ($ethnicity eq 'pi') { + $ethnicity = 'Pacific Islander' + } elsif ($ehtnicity eq 'asian') { + $ethnicity = 'Asian'; + } + return $ethnicity; + }