koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] CVS: koha/C4 Koha.pm,1.1,1.2


From: Pat Eyler
Subject: [Koha-devel] CVS: koha/C4 Koha.pm,1.1,1.2
Date: Mon Apr 15 10:36:36 2002

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;
+ }
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]