I am attempting to modify some of the Perl scripts in Koha so that they conform to our local conditions. In the moremember.pl script, for instance, I have changed the ethnic classifications and I rewrote the checkdigit subroutine to reflect the type of patron barcodes we use. But I am not seeing these changes reflected in the koha intranet when I attempt to register new patrons. What do I need to do in order to have these changes take effect? I stopped and restarted the Apache server thinking that this would do it, but to no avail. The text of my changes is given below. Larry Currie Changes made to Perl script moremember.pl: my %env; print $input->header; #start the page and read in includes print startpage(); print startmenu('member'); my $data=borrdata('',$bornum); my @temp=split('-',$data->{'dateenrolled'}); $data->{'dateenrolled'}="$temp[2]/$temp[1]/$temp[0]"; @temp=split('-',$data->{'expiry'}); $data->{'expiry'}="$temp[2]/$temp[1]/$temp[0]"; @temp=split('-',$data->{'dateofbirth'}); $data->{'dateofbirth'}="$temp[2]/$temp[1]/$temp[0]"; if ($data->{'ethnicity'} eq 'white'){ $data->{'ethnicity'} = 'White'; } if ($data->{'ethnicity'}eq 'black'){ $data->{'ethnicity'} = 'Black'; } if ($data->{'ethnicity'}eq 'american indian'){ $data->{'ethnicity'} = 'American Indian'; } if ($data->{'ethnicity'}eq 'asian and pacific islander'){ $data->{'ethnicity'} = 'Asian and Pacific Islander'; } print <<printend Changes made to subroutine checkdigit in Input.pm: sub checkdigit { my ($env,$infl) = @_; $infl = uc $infl; my $sum1; my $sum2; my $sum3; my $i = 0; my $j = 1; my $valid = 0; # print $infl."<br>"; while ($i <14) { my $temp1 = substr($infl,$i,1); if ($temp1 = 0) { $temp1 = 0; } elsif ($temp1 = 1) { $temp1 = 2; } elsif ($temp1 = 2) { $temp1 = 4; } elsif ($temp1 = 3) { $temp1 = 6; } elsif ($temp1 = 4) { $temp1 = 8; } elsif ($temp1 = 5) { $temp1 = 0; } elsif ($temp1 = 6) { $temp1 = 3; } elsif ($temp1 = 7) { $temp1 = 5; } elsif ($temp1 = 8) { $temp1 = 7; } elsif ($temp1 = 9) { $temp1 = 9; $sum1 = $sum1 + $temp1; # print "$sum $temp1 $temp2<br>"; $i = $i + 2; } while ($j < 13) { my $temp2 = substr($infl,$j,1); $sum2 = $sum2 + $temp2; $j = $j + 2; } $sum3 = $sum1 + $sum2; my $rem = 10 - ($sum3%10); } #print $rem."<br>"; if ($rem eq substr($infl,13,1)) { $valid = 1; } return $valid; } END { } # module clean-up code here (global destructor) -- Lawrence W. Currie User Services Librarian California Academy of Sciences Golden Gate Park San Francisco, CA 94118 lcurrie@calacademy.org (415) 750-7108 (415) 750-7106 fax http://www.calacademy.org/research/library/
On Thu, 2002-02-07 at 10:10, Larry Currie wrote:
I am attempting to modify some of the Perl scripts in Koha so that they conform to our local conditions. In the moremember.pl script, for instance, I have changed the ethnic classifications and I rewrote the checkdigit subroutine to reflect the type of patron barcodes we use. But I am not seeing these changes reflected in the koha intranet when I attempt to register new patrons. What do I need to do in order to have these changes take effect? I stopped and restarted the Apache server thinking that this would do it, but to no avail. The text of my changes is given below.
Larry Currie
Hi Larry Have you copied the files into the places they are called from, eg moremember.pl will need to be wherever the scripts are that apache calls. Often something like /usr/local/www/koha/cgi-bin/koha/moremember.pl And the Input.pm Will need to be where all the other koha perl modules are. The changes should take place without needing an apache restart. Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (2)
-
Chris Cormack -
Larry Currie