From 606ecb532aa42562687bf0d05b4d6df6697300d7 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 18 Oct 2007 04:05:39 -0500 Subject: [PATCH] Patch from Joe Atzberger to remove $Id$ and $Log$ from scripts Signed-off-by: Joshua Ferraro --- acqui/acqui-home.pl | 1 - acqui/basket.pl | 1 - acqui/booksellers.pl | 1 - acqui/currency.pl | 1 - acqui/histsearch.pl | 1 - acqui/lateorders.pl | 1 - acqui/newordersuggestion.pl | 1 - acqui/orderreceive.pl | 1 - acqui/parcel.pl | 1 - acqui/parcels.pl | 1 - acqui/supplier.pl | 1 - authorities/authorities.pl | 1 - catalogue/detail.pl | 1 - catalogue/issuehistory.pl | 1 - catalogue/moredetail.pl | 1 - cataloguing/addbiblio.pl | 1 - cataloguing/addbooks.pl | 1 - cataloguing/additem.pl | 1 - cataloguing/plugin_launcher.pl | 1 - circ/bookcount.pl | 1 - circ/branchoverdues.pl | 1 - circ/overdue.pl | 1 - circ/pendingreserves.pl | 1 - circ/stats.pl | 1 - circ/transferstodo.pl | 1 - circ/transferstoreceive.pl | 1 - circ/waitingreserves.pl | 1 - members/boraccount.pl | 1 - members/borrowers_details.pl | 1 - members/deletemem.pl | 1 - members/guarantor_search.pl | 1 - members/member-picupload.pl | 1 - members/member.pl | 1 - members/memberentry.pl | 334 ++++++++++++++++++++- members/moremember.pl | 106 +++---- members/pay.pl | 1 - members/setdebar.pl | 1 - misc/bulkupdate.pl | 1 - misc/fines-sanop.pl | 1 - misc/fines2.pl | 1 - misc/testKoha.pl | 2 - opac/maintenance.pl | 1 - opac/opac-ISBDdetail.pl | 1 - opac/opac-alert-subscribe.pl | 1 - opac/opac-basket.pl | 1 - opac/opac-browser.pl | 1 - opac/opac-detail.pl | 1 - opac/opac-main.pl | 1 - opac/opac-readingrecord.pl | 1 - opac/opac-serial-issues.pl | 1 - opac/opac-shelves.pl | 2 - opac/opac-tags_subject.pl | 1 - opac/opac-topissues.pl | 1 - opac/opac-user.pl | 1 - reports/acquisitions_stats.pl | 1 - reports/bor_issues_top.pl | 1 - reports/borrowers_out.pl | 1 - reports/borrowers_stats.pl | 1 - reports/cat_issues_top.pl | 1 - reports/catalogue_out.pl | 1 - reports/catalogue_stats.pl | 1 - reports/issues_avg_stats.pl | 1 - reports/issues_by_borrower_category.plugin | 1 - reports/issues_stats.pl | 1 - reports/itemslost.pl | 1 - reports/itemtypes.plugin | 1 - reserve/renewscript.pl | 1 - reserve/request.pl | 1 - serials/acqui-search-result.pl | 1 - serials/acqui-search.pl | 1 - serials/checkexpiration.pl | 1 - serials/distributedto.pl | 1 - serials/receipt.pl | 1 - serials/serial-issues.pl | 1 - serials/serials-collection.pl | 1 - serials/serials-edit.pl | 1 - serials/serials-home.pl | 1 - serials/serials-recieve.pl | 1 - serials/statecollection.pl | 1 - serials/subscription-renew.pl | 1 - serials/viewalerts.pl | 1 - suggestion/acceptorreject.pl | 1 - tools/breeding.pl | 2 - tools/cleanborrowers.pl | 1 - tools/export.pl | 1 - tools/import.pl | 5 +- tools/koha-news.pl | 27 +- tools/viewlog.pl | 1 - updater/update22to30.pl | 2 - virtualshelves/addbybiblionumber.pl | 2 - virtualshelves/shelves.pl | 1 - 91 files changed, 374 insertions(+), 190 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 7b35c3f1a6..b8e6162f0a 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/acqui/basket.pl b/acqui/basket.pl index a94422b913..a0519d3659 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -20,7 +20,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use C4::Auth; diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 178a74931c..54ef3297dd 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -20,7 +20,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/acqui/currency.pl b/acqui/currency.pl index 7362264a13..f2fb44f3c6 100755 --- a/acqui/currency.pl +++ b/acqui/currency.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #written by chris@katipo.co.nz #9/10/2000 diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index 1da1fc3b24..c7e3c32aae 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index d78a959725..034ab5b3b3 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl index 5f637c15a3..8be5b450f7 100755 --- a/acqui/newordersuggestion.pl +++ b/acqui/newordersuggestion.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index b20b4a5f65..84728f19bd 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #script to recieve orders #written by chris@katipo.co.nz 24/2/2000 diff --git a/acqui/parcel.pl b/acqui/parcel.pl index cbc0b5e389..0a1feec216 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #script to recieve orders #written by chris@katipo.co.nz 24/2/2000 diff --git a/acqui/parcels.pl b/acqui/parcels.pl index 8f35a2b714..0e6de935ee 100755 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #script to show display basket of orders #written by chris@katipo.co.nz 24/2/2000 diff --git a/acqui/supplier.pl b/acqui/supplier.pl index e3bf2e0968..5fb77088b8 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #script to show display basket of orders #written by chris@katipo.co.nz 24/2/2000 diff --git a/authorities/authorities.pl b/authorities/authorities.pl index dc41e46c33..7bd6e06178 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 6f301b9b50..998ab1e24f 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl index 673629d3f5..113e77d699 100755 --- a/catalogue/issuehistory.pl +++ b/catalogue/issuehistory.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 453217efca..6f3542cc29 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 5d96c455a0..d216757b0c 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index e22556a0fd..38b7eb4247 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 8bc26aab25..929b07f167 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/cataloguing/plugin_launcher.pl b/cataloguing/plugin_launcher.pl index a3b166b433..51189d3db8 100755 --- a/cataloguing/plugin_launcher.pl +++ b/cataloguing/plugin_launcher.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/circ/bookcount.pl b/circ/bookcount.pl index 65e5f5cb09..383b69b661 100755 --- a/circ/bookcount.pl +++ b/circ/bookcount.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #written 7/3/2002 by Finlay #script to display reports diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl index 52e3f214a5..fc146931bf 100755 --- a/circ/branchoverdues.pl +++ b/circ/branchoverdues.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # # This file is part of Koha. # diff --git a/circ/overdue.pl b/circ/overdue.pl index f5120e238c..760ba7ce86 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 3a7b720a60..a158854a79 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/circ/stats.pl b/circ/stats.pl index 874fd89dc5..5c1248b2af 100755 --- a/circ/stats.pl +++ b/circ/stats.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #written 14/1/2000 #script to display reports diff --git a/circ/transferstodo.pl b/circ/transferstodo.pl index 174061a989..ff00c88f3e 100755 --- a/circ/transferstodo.pl +++ b/circ/transferstodo.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index 34d3cc897b..697a41a71c 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index f3a0f6f328..c3799757c7 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/members/boraccount.pl b/members/boraccount.pl index 3f2c0a97f1..350b537e14 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #writen 11/1/2000 by chris@katipo.oc.nz #script to display borrowers account details diff --git a/members/borrowers_details.pl b/members/borrowers_details.pl index 0aa987acc0..b4f1181529 100755 --- a/members/borrowers_details.pl +++ b/members/borrowers_details.pl @@ -2,7 +2,6 @@ # NOTE: This file uses standard 8-space tabs # DO NOT SET TAB SIZE TO 4 -# $Id$ #script to set up screen for modification of borrower details #written 20/12/99 by chris@katipo.co.nz diff --git a/members/deletemem.pl b/members/deletemem.pl index c694350d2b..cf7da430b1 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #script to delete items #written 2/5/00 diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl index 62048805ab..8059b72c9d 100755 --- a/members/guarantor_search.pl +++ b/members/guarantor_search.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # script to find a guarantor diff --git a/members/member-picupload.pl b/members/member-picupload.pl index 6190ac747c..6ca68a754b 100755 --- a/members/member-picupload.pl +++ b/members/member-picupload.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # script to upload a picture to a borrowerimages directory. # checks to see if its either displaying the upload form diff --git a/members/member.pl b/members/member.pl index 99e8340d61..24429cd0a6 100755 --- a/members/member.pl +++ b/members/member.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #script to do a borrower enquiery/brin up borrower details etc #written 20/12/99 by chris@katipo.co.nz diff --git a/members/memberentry.pl b/members/memberentry.pl index 3d0a58a764..d1bde60b48 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -# $Id$ # Copyright 2006 SAN OUEST PROVENCE et Paul POULAIN # @@ -32,7 +31,7 @@ use C4::Context; use C4::Output; use C4::Members; use C4::Koha; -use C4::Date; +use C4::Dates; use C4::Input; use C4::Log; use C4::Branch; # GetBranches @@ -42,8 +41,12 @@ my %data; my $dbh = C4::Context->dbh; +<<<<<<< HEAD:members/memberentry.pl +======= +my $step=$input->param('step') || 0; +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "members/memberentrygen.tmpl", query => $input, @@ -74,22 +77,20 @@ my $check_categorytype=$input->param('check_categorytype'); # NOTE: Alert for ethnicity and ethnotes fields, they are unvalided in all borrowers form my $borrower_data; - $template->param("uppercasesurnames" => C4::Context->preference('uppercasesurnames')); #function to automatic setup the mandatory fields (visual with css) my $check_BorrowerMandatoryField=C4::Context->preference("BorrowerMandatoryField"); my @field_check=split(/\|/,$check_BorrowerMandatoryField); foreach (@field_check) { -$template->param( "mandatory$_" => 1); + $template->param( "mandatory$_" => 1); } -$template->param("add"=>1) if ($op eq 'add'); +$template->param( "add" => 1) if ( $op eq 'add'); $template->param("checked" => 1) if ($nodouble eq 1); my $categorycode=$input->param('categorycode'); ($borrower_data=GetMember($borrowernumber,'borrowernumber')) if ($op eq 'modify' or $op eq 'save'); $categorycode=$borrower_data->{'categorycode'} unless $categorycode; -my $category_type; -$category_type = $input->param('category_type'); +my $category_type = $input->param('category_type'); unless ($category_type or !($categorycode)){ my $borrowercategory= GetBorrowercategory($categorycode); $category_type = $borrowercategory->{'category_type'}; @@ -111,11 +112,26 @@ if ($op eq 'insert' || $op eq 'modify' || $op eq 'save') { $newdata{'dateofbirth'}=format_date_in_iso($newdata{'dateofbirth'}) if ($newdata{dateofbirth}); } +<<<<<<< HEAD:members/memberentry.pl #############test for member being unique ############# if ($op eq 'insert'){ my $category_type_send=$category_type if ($category_type eq 'I'); my $check_category; # recover the category code of the doublon suspect borrowers ($check_member,$check_category)= checkuniquemember($category_type_send,($newdata{'surname'}?$newdata{'surname'}:$data{'surname'}),($newdata{'firstname'}?$newdata{'firstname'}:$data{'firstname'}),($newdata{'dateofbirth'}?$newdata{'dateofbirth'}:$data{'dateofbirth'})); +======= + + # WARN : some tests must be done whatever the step, because the librarian can click on any tab. + #############test for member being unique ############# + if ($op eq 'insert'){ + my $category_type_send=$category_type if ($category_type eq 'I'); + my $check_category; # recover the category code of the doublon suspect borrowers + ($check_member,$check_category) = checkuniquemember( + $category_type_send, + ($newdata{'surname' } ? $newdata{'surname' } : $data{'surname' }), + ($newdata{'firstname'} ? $newdata{'firstname'} : $data{'firstname'}), + ($newdata{'dateofbirth'} ? C4::Dates->new($newdata{'dateofbirth'})->output('iso') : $data{'dateofbirth'}) + ); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl # recover the category type if the borrowers is a doublon my $tmpborrowercategory=GetBorrowercategory($check_category); @@ -123,6 +139,7 @@ if ($op eq 'insert'){ } #recover all data from guarantor address phone ,fax... +<<<<<<< HEAD:members/memberentry.pl if (($category_type eq 'C' || $category_type eq 'P') and $guarantorid ne '' ){ my $guarantordata=GetMember($guarantorid); $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'}; @@ -131,15 +148,76 @@ if (($category_type eq 'C' || $category_type eq 'P') and $guarantorid ne '' ){ $data{'contactname'}=$guarantordata->{'surname'}; $data{'contacttitle'}=$guarantordata->{'title'}; map {$data{$_}=$guarantordata->{$_}}('streetnumber','address','streettype','address2','zipcode','city','phone','phonepro','mobile','fax','email','emailpro'); +======= + if ($category_type eq 'C' and $guarantorid ne '' ){ + my $guarantordata=GetMember($guarantorid); + $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'}; + if (($data{'contactname'} eq '' or $data{'contactname'} ne $guarantordata->{'surname'})) { + $newdata{'contactfirstname'} = $guarantordata->{'firstname'}; + $newdata{'contactname' } = $guarantordata->{'surname'}; + $newdata{'contacttitle' } = $guarantordata->{'title'}; + map {$newdata{$_}=$guarantordata->{$_}}('streetnumber','address','streettype','address2','zipcode','city','phone','phonepro','mobile','fax','email','emailpro'); + # This use of map is improper (void context). Should be foreach, probably. + } +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl } } +<<<<<<< HEAD:members/memberentry.pl ###############test to take the right zipcode and city name ############## if ( $guarantorid eq ''){ if ($select_city){ my ($borrower_city,$borrower_zipcode)=&getzipnamecity($select_city); $newdata{'city'}= $borrower_city; $newdata{'zipcode'}=$borrower_zipcode; +======= + # CHECKS step by step +# STEP 1 + if ($op eq 'insert' && checkcardnumber($cardnumber)){ + push @errors, 'ERROR_cardnumber'; + $nok = 1; + } + ###############test to take the right zipcode and city name ############## + if ( $guarantorid eq ''){ + if ($select_city){ + my ($borrower_city,$borrower_zipcode)=&getzipnamecity($select_city); + $newdata{'city' } = $borrower_city; + $newdata{'zipcode'} = $borrower_zipcode; + } + } + my $dateofbirthmandatory=0; + map {$dateofbirthmandatory=1 if $_ eq "dateofbirth"} @field_check; # improper use of map (void context). Probably "foreach" or even "grep" should be used. + if ($category_type ne 'I' && $newdata{dateofbirth} && $dateofbirthmandatory) { + my $age = GetAge(C4::Dates->new($data{dateofbirth})->output('iso')); + my $borrowercategory=GetBorrowercategory($data{'categorycode'}); + if (($age > $borrowercategory->{'upperagelimit'}) or ($age < $borrowercategory->{'dateofbirthrequired'})) { + push @errors, 'ERROR_age_limitations'; + $nok = 1; + } + } + +# STEP 2 + if ( ($newdata{'userid'} eq '')){ + my $onefirstnameletter=substr($data{'firstname'},0,1); + my $fivesurnameletter =substr($data{'surname'},0,5); + $newdata{'userid'}=lc($onefirstnameletter.$fivesurnameletter); + } +# } +# STEP 3 + if ($op eq 'insert'){ + my $loginexist; + # Check if the userid is unique + if ( !Check_Userid($data{'userid'},$borrowernumber)) { + push @errors, "ERROR_login_exist"; + $nok = $loginexist = 1; + } else { + $borrowernumber = &AddMember(%newdata); + if ($data{'organisations'}){ + # need to add the members organisations + my @orgs=split(/\|/,$data{'organisations'}); + add_member_orgs($borrowernumber,\@orgs); + } +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl } } #builds default userid @@ -223,11 +301,16 @@ if ($op eq 'save'){ } } +<<<<<<< HEAD:members/memberentry.pl if ($delete){ print $input->redirect("/cgi-bin/koha/deletemem.pl?member=$borrowernumber"); } +======= +($delete) and print $input->redirect("/cgi-bin/koha/deletemem.pl?member=$borrowernumber"); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl if ($nok){ +<<<<<<< HEAD:members/memberentry.pl $op="add" if ($op eq "insert"); $op="modify" if ($op eq "save"); %data=%newdata; @@ -235,6 +318,12 @@ if ($nok){ unless ($step){ $template->param( step_1 => 1,step_2 => 1,step_3 => 1); } +======= + $op = "add" if ($op eq "insert"); + $op = "modify" if ($op eq "save" ); + %data = %newdata; + $template->param( updtype => ($op eq "insert"?'I':'M'),step_1=>1,step_2=>1,step_3=>1,allsteps=>1); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl } if (C4::Context->preference("IndependantBranches")) { my $userenv = C4::Context->userenv; @@ -276,9 +365,14 @@ if ($ethnicitycategoriescount>=0) { $template->param(ethcatpopup => $ethcatpopup); # bad style, has to be fixed } +<<<<<<< HEAD:members/memberentry.pl my $action="WHERE category_type=?"; ($categories,$labels)=GetborCatFromCatType($category_type,$action); +======= + my $action="WHERE category_type=?"; + ($categories,$labels)=GetborCatFromCatType($category_type,$action); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl if(scalar(@$categories)){ #if you modify the borrowers you must have the right value for his category code @@ -293,6 +387,7 @@ if(scalar(@$categories)){ $template->param(catcodepopup=>$catcodepopup); } #test in city +<<<<<<< HEAD:members/memberentry.pl $select_city=getidcity($data{'city'}) if ($guarantorid ne '0'); ($default_city=$select_city) if ($step eq 0); if ($select_city eq '' ){ @@ -307,7 +402,24 @@ my $citypopup = CGI::popup_menu(-name=>'select_city', -labels=>$name_city, -default=>$default_city ); +======= + $select_city=getidcity($data{'city'}) if ($guarantorid ne '0'); + ($default_city=$select_city) if ($step eq 0); + if ($select_city eq '' ){ + $default_city=getidcity($data{'city'}); + } + my($cityid,$name_city)=GetCities(); + $template->param( city_cgipopup => 1) if ($cityid ); + my $citypopup = CGI::popup_menu(-name=>'select_city', + -id => 'select_city', + -values=>$cityid, + -labels=>$name_city, +# -override => 1, + -default=>$default_city + ); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl +<<<<<<< HEAD:members/memberentry.pl my $default_roadtype; $default_roadtype=$data{'streettype'} ; my($roadtypeid,$road_type)=GetRoadTypes(); @@ -319,7 +431,21 @@ my $roadpopup = CGI::popup_menu(-name=>'streettype', -override => 1, -default=>$default_roadtype ); - +======= + my $default_roadtype; + $default_roadtype=$data{'streettype'} ; + my($roadtypeid,$road_type)=GetRoadTypes(); + $template->param( road_cgipopup => 1) if ($roadtypeid ); + my $roadpopup = CGI::popup_menu(-name=>'streettype', + -id => 'streettype', + -values=>$roadtypeid, + -labels=>$road_type, + -override => 1, + -default=>$default_roadtype + ); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl + +<<<<<<< HEAD:members/memberentry.pl my $default_borrowertitle; $default_borrowertitle=$data{'title'} ; my($borrowertitle)=GetTitles(); @@ -329,8 +455,36 @@ my $borrotitlepopup = CGI::popup_menu(-name=>'title', -override => 1, -default=>$default_borrowertitle ); +======= + my $default_borrowertitle; + $default_borrowertitle=$data{'title'} ; + my($borrowertitle)=GetTitles(); + my $borrotitlepopup = CGI::popup_menu(-name=>'title', + -id => 'btitle', + -values=>$borrowertitle, + -override => 1, + -default=>$default_borrowertitle + ); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl + +<<<<<<< HEAD:members/memberentry.pl +======= + my @relshipdata; + foreach (map {$_ || ''} split /,|\|/, C4::Context->preference('BorrowerRelationship')) { + my %row = ('relationship' => $_); + if ($data{'relationship'} eq $_) { + $row{'selected'}=' selected'; + } else { + $row{'selected'}=''; + } + push(@relshipdata, \%row); + } + my %flags = ( 'gonenoaddress' => ['gonenoaddress', 'Gone no address '], + 'lost' => ['lost', 'Lost'], + 'debarred' => ['debarred', 'Debarred']); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl - +<<<<<<< HEAD:members/memberentry.pl my @relationships = split /,|\|/,C4::Context->preference('BorrowerRelationship'); my @relshipdata; while (@relationships) { @@ -340,6 +494,21 @@ while (@relationships) { $row{'selected'}=' selected'; } else { $row{'selected'}=''; +======= + my @flagdata; + foreach my $key (keys(%flags)) { + my %row = ('key' => $key, + 'name' => $flags{$key}[0], + 'html' => $flags{$key}[1]); + if ($data{$key}) { + $row{'yes'}=' checked'; + $row{'no'}=''; + } else { + $row{'yes'}=''; + $row{'no'}=' checked'; + } + push(@flagdata, \%row); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl } push(@relshipdata, \%row); } @@ -363,7 +532,12 @@ if ($data{$key}) { push(@flagdata, \%row); } +<<<<<<< HEAD:members/memberentry.pl +======= + ($modify) and $template->param( modify => 1 ); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl +<<<<<<< HEAD:members/memberentry.pl #get Branches my @branches; my @select_branch; @@ -382,9 +556,35 @@ foreach my $branch (sort keys %$branches) { $select_branches{$branch} = $branches->{$branch}->{'branchname'}; $default = C4::Context->userenv->{'branch'} if (C4::Context->userenv && C4::Context->userenv->{'branch'}); } +======= + #Convert dateofbirth to correct format + my @branches; + my @select_branch; + my %select_branches; + my $branches=GetBranches(); + my $default; + # ----------------------------------------------------- + # the value of ip from the branches hash table +# my $select_ip; + # $ip is the ip of user when is connect to koha +# my $ip = $ENV{'REMOTE_ADDR'}; + + # ----------------------------------------------------- + foreach my $branch (keys %$branches) { + if ((not C4::Context->preference("IndependantBranches")) || (C4::Context->userenv->{'flags'} == 1)) { + push @select_branch, $branch; + $select_branches{$branch} = $branches->{$branch}->{'branchname'}; + } else { + push @select_branch,$branch if ($branch eq C4::Context->userenv->{'branch'}); + $select_branches{$branch} = $branches->{$branch}->{'branchname'} if ($branch eq C4::Context->userenv->{'branch'}); + } + $default = C4::Context->userenv->{'branch'}; + } +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl # -------------------------------------------------------------------------------------------------------- #in modify mod :default value from $CGIbranch comes from borrowers table #in add mod: default value come from branches table (ip correspendence) +<<<<<<< HEAD:members/memberentry.pl $default=$data{'branchcode'} if ($op eq 'modify'); my $CGIbranch = CGI::scrolling_list(-id => 'branchcode', -name => 'branchcode', @@ -417,18 +617,60 @@ if (C4::Context->preference("memberofinstitution")){ ); } - +======= + $default=$data{'branchcode'} if ($op eq 'modify'); + my $CGIbranch = CGI::scrolling_list(-id => 'branchcode', + -name => 'branchcode', + -values => \@select_branch, + -labels => \%select_branches, + -size => 1, + -override => 1, + -multiple =>0, + -default => $default, + ); + my $CGIorganisations; + my $member_of_institution; + if (C4::Context->preference("memberofinstitution")){ + my $organisations=get_institutions(); + my @orgs; + my %org_labels; + foreach my $organisation (keys %$organisations) { + push @orgs,$organisation; + $org_labels{$organisation}=$organisations->{$organisation}->{'surname'}; + } + $member_of_institution=1; + + $CGIorganisations = CGI::scrolling_list( -id => 'organisations', + -name => 'organisations', + -labels => \%org_labels, + -values => \@orgs, + -size => 5, + -multiple => 'true' + ); + } +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl # -------------------------------------------------------------------------------------------------------- +<<<<<<< HEAD:members/memberentry.pl my $CGIsort1 = buildCGIsort("Bsort1","sort1",$data{'sort1'}); if ($CGIsort1) { $template->param(CGIsort1 => $CGIsort1); +======= + my $CGIsort1 = buildCGIsort("Bsort1","sort1",$data{'sort1'}); + if ($CGIsort1) { + $template->param(CGIsort1 => $CGIsort1); + } +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl $template->param( sort1 => $data{'sort1'}); +<<<<<<< HEAD:members/memberentry.pl } else { $template->param( sort1 => $data{'sort1'}); } +======= +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl +<<<<<<< HEAD:members/memberentry.pl my $CGIsort2 = buildCGIsort("Bsort2","sort2",$data{'sort2'}); if ($CGIsort2) { $template->param(CGIsort2 =>$CGIsort2); @@ -442,13 +684,48 @@ if ($nok) { $template->param(nok => 1); } +======= + my $CGIsort2 = buildCGIsort("Bsort2","sort2",$data{'sort2'}); + if ($CGIsort2) { + $template->param(CGIsort2 => $CGIsort2); + } else { + $template->param( sort2 => $data{'sort2'}); + } + # increase step to see next page + if ($nok) { + foreach (@errors, 'nok') { + $template->param( $_ => 1); + } + } +# else { +# $step++ if $op eq 'add'; +# } +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl #Formatting data for display +<<<<<<< HEAD:members/memberentry.pl if ($data{'dateenrolled'} eq ''){ my $today= sprintf('%04d-%02d-%02d', Today()); $data{'dateenrolled'}=$today; } - +======= + if ($data{'dateenrolled'} eq ''){ + my $today= sprintf('%04d-%02d-%02d', Today()); + #insert ,in field "dateenrolled" , the current date + $data{'dateenrolled'}=$today; + $data{'dateexpiry'} = GetExpiryDate($data{'categorycode'},$today); + } + + $data{'surname' } = uc($data{'surname'}); + $data{'contactname' } = uc($data{'contactname'}); + $data{'firstname' } = ucfirst(lc $data{'firstname'}); + $data{'contactfirstname'}= ucfirst(lc $data{'contactfirstname'}); + $data{'dateenrolled'} = C4::Dates->new($data{'dateenrolled'})->output; + $data{'dateexpiry' } = C4::Dates->new($data{'dateexpiry' })->output; + $data{'dateofbirth' } = C4::Dates->new($data{'dateofbirth' })->output; +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl + +<<<<<<< HEAD:members/memberentry.pl $data{'surname'}=uc($data{'surname'}); $data{'firstname'}=ucfirst(lc $data{'firstname'}); $data{'dateenrolled'}=format_date($data{'dateenrolled'}); @@ -491,6 +768,41 @@ $template->param( CGIbranch => $CGIbranch, memberofinstution => $member_of_institution, CGIorganisations => $CGIorganisations, +======= +# warn "$step"; + $template->param(%data); + $template->param( + BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript + category_type => $category_type,#to know the category type of the borrower + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + select_city => $select_city, + "step_$step" => 1, # associate with step to know where you are + "$category_type" => 1, # associate with step to know where you are + step => $step, + destination => $destination, # for redirect + check_member => $check_member, # to know if the borrower already exist(=>1) or not (=>0) + flags => $data{'flags'}, + "op$op" => 1, + nodouble => $nodouble, + borrowernumber => $borrowernumber, # register number + "contacttitle_".$data{'contacttitle'} => "SELECTED", + guarantorid => $guarantorid, + ethcatpopup => $ethcatpopup, + relshiploop => \@relshipdata, + citypopup => $citypopup, + roadpopup => $roadpopup, + borrotitlepopup => $borrotitlepopup, + guarantorinfo => $guarantorinfo, + flagloop => \@flagdata, + dateformat => C4::Dates->visual(), + check_categorytype =>$check_categorytype, # to recover the category type with checkcategorytype function + modify => $modify, + nok => $nok, # flag to know if an error + CGIbranch => $CGIbranch, + memberofinstution => $member_of_institution, + CGIorganisations => $CGIorganisations, + ); +>>>>>>> Removing CVS tags $Id$ and $Log$. Lots of files, not much change.:members/memberentry.pl ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/moremember.pl b/members/moremember.pl index 484c954cdf..2542a7042e 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 moremember.pl @@ -38,7 +37,7 @@ use C4::Auth; use C4::Context; use C4::Output; use C4::Members; -use C4::Date; +use C4::Dates; use C4::Reserves; use C4::Circulation; use C4::Koha; @@ -53,15 +52,9 @@ my $input = new CGI; my $print = $input->param('print'); my $template_name; -if ( $print eq "page" ) { - $template_name = "members/moremember-print.tmpl"; -} -elsif ( $print eq "slip" ) { - $template_name = "members/moremember-receipt.tmpl"; -} -else { - $template_name = "members/moremember.tmpl"; -} +if ($print eq "page") { $template_name = "members/moremember-print.tmpl"; } +elsif ($print eq "slip") { $template_name = "members/moremember-receipt.tmpl"; } +else { $template_name = "members/moremember.tmpl"; } my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -80,10 +73,7 @@ my $data = GetMember( $borrowernumber ,'borrowernumber'); my $reregistration = $input->param('reregistration'); if ( not defined $data ) { - $template->param ( - unknowuser => 1 - ); - output_html_with_http_headers $input, $cookie, $template->output; + $template->param (unknowuser => 1); exit; } @@ -101,17 +91,14 @@ my $category_type = $borrowercategory->{'category_type'}; # in template => instutitional (A for Adult& C for children) $template->param( $data->{'categorycode'} => 1 ); -$data->{'dateenrolled'} = format_date( $data->{'dateenrolled'} ); -$data->{'dateexpiry'} = format_date( $data->{'dateexpiry'} ); -$data->{'dateofbirth'} = format_date( $data->{'dateofbirth'} ); -$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); - -if ( $data->{'debarred'} - || $data->{'gonenoaddress'} - || $data->{'lost'} - || $data->{'borrowernotes'} ) -{ - $template->param( flagged => 1 ); +foreach (qw(dateenrolled dateexpiry dateofbirth)) { + $data->{$_} = C4::Dates->new($data->{$_}, 'iso')->output() + or die ("failed C4::Dates->new(" . $data->{$_} . ", 'iso')->output()"); +} +$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); + +for (qw(debarred gonenoaddress lost borrowernotes)) { + $data->{$_} and $template->param(flagged => 1) and last; } $data->{'ethnicity'} = fixEthnicity( $data->{'ethnicity'} ); @@ -120,13 +107,9 @@ $data->{ "sex_".$data->{'sex'}."_p" } = 1; if ( $category_type eq 'C' and $data->{'guarantorid'} ne '0' ) { my $data2 = GetMember( $data->{'guarantorid'} ,'borrowernumber'); - $data->{'address'} = $data2->{'address'}; - $data->{'city'} = $data2->{'city'}; - $data->{'B_address'} = $data2->{'B_address'}; - $data->{'B_city'} = $data2->{'B_city'}; - $data->{'phone'} = $data2->{'phone'}; - $data->{'mobile'} = $data2->{'mobile'}; - $data->{'zipcode'} = $data2->{'zipcode'}; + foreach (qw(address city B_address B_city phone mobilezipcode)) { + $data->{$_} = $data2->{$_}; + } } if ( $data->{'ethnicity'} || $data->{'ethnotes'} ) { @@ -142,30 +125,25 @@ if ( $category_type eq 'A' ) { my ( $count, $guarantees ) = GetGuarantees( $data->{'borrowernumber'} ); my @guaranteedata; for ( my $i = 0 ; $i < $count ; $i++ ) { - push( - @guaranteedata, + push(@guaranteedata, { borrowernumber => $guarantees->[$i]->{'borrowernumber'}, cardnumber => $guarantees->[$i]->{'cardnumber'}, name => $guarantees->[$i]->{'firstname'} . " " - . $guarantees->[$i]->{'surname'} + . $guarantees->[$i]->{'surname'} } ); } $template->param( guaranteeloop => \@guaranteedata ); ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' ); - } else { if ($data->{'guarantorid'}){ - my ($guarantor) = GetMember( $data->{'guarantorid'},'biblionumber'); - $template->param( - guarantor => 1, - guarantorborrowernumber => $guarantor->{'borrowernumber'}, - guarantorcardnumber => $guarantor->{'cardnumber'}, - guarantorfirstname => $guarantor->{'firstname'}, - guarantorsurname => $guarantor->{'surname'} - ); + my ($guarantor) = GetMember( $data->{'guarantorid'},'biblionumber'); + $template->param(guarantor => 1); + foreach (qw(borrowernumber cardnumber firstname surname)) { + $template->param("guarantor$_" => $guarantor->{$_}); + } } } @@ -201,13 +179,13 @@ my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} ); # my ( $count, $issue ) = GetPendingIssues($borrowernumber); my $roaddetails = &GetRoadTypeDetails( $data->{'streettype'} ); -my $today = POSIX::strftime("%Y%m%d", localtime); +my $today = POSIX::strftime("%Y%m%d", localtime); # iso format my @issuedata; my $totalprice = 0; my $toggle = 0; for ( my $i = 0 ; $i < $count ; $i++ ) { my $datedue = $issue->[$i]{'date_due'}; - $issue->[$i]{'date_due'} = format_date( $issue->[$i]{'date_due'} ); + $issue->[$i]{'date_due'} = C4::Dates->new($issue->[$i]{'date_due'})->output('iso'); my %row = %{ $issue->[$i] }; $totalprice += $issue->[$i]{'replacementprice'}; $row{'replacementprice'} = $issue->[$i]{'replacementprice'}; @@ -228,12 +206,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { #check item is not reserved my ( $restype, $reserves ) = CheckReserves( $issue->[$i]{'itemnumber'} ); - if ($restype) { - $row{'norenew'} = 1; - } - else { - $row{'norenew'} = 0; - } + $row{'norenew'} = ($restype) ? 1 : 0; push( @issuedata, \%row ); } @@ -250,10 +223,8 @@ if ($borrowernumber) { eval{ scalar @$num_res; }; - if($@){ - next; - } - + ($@) and next; # is this eval just a dumb way of checking to see if the arrays have any elements? + my %getreserv; my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} ); @@ -261,17 +232,15 @@ if ($borrowernumber) { my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers( $num_res->{'itemnumber'} ); - $getreserv{waiting} = 0; - $getreserv{transfered} = 0; - $getreserv{nottransfered} = 0; + foreach (qw(waiting transfered nottransfered)) { + $getreserv{$_} = 0; + } - $getreserv{reservedate} = format_date( $num_res->{'reservedate'} ); - $getreserv{biblionumber} = $getiteminfo->{'biblionumber'}; - $getreserv{title} = $getiteminfo->{'title'}; - $getreserv{itemtype} = $itemtypeinfo->{'description'}; - $getreserv{author} = $getiteminfo->{'author'}; - $getreserv{barcodereserv} = $getiteminfo->{'barcode'}; - $getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'}; + $getreserv{reservedate} = C4::Dates->new($num_res->{'reservedate'})->output() or die "Cannot get new($num_res->{'reservedate'}) from C4::Dates"; + foreach (qw(biblionumber title author barcodereserv itemcallnumber )) { + $getreserv{$_} = $getiteminfo->{$_}; + } + $getreserv{itemtype} = $itemtypeinfo->{'description'}; # check if we have a waitin status for reservations if ( $num_res->{'found'} eq 'W' ) { @@ -283,7 +252,7 @@ if ($borrowernumber) { if ($transfertwhen) { $getreserv{color} = 'transfered'; $getreserv{transfered} = 1; - $getreserv{datesent} = format_date($transfertwhen); + $getreserv{datesent} = C4::Dates->new($transfertwhen, 'iso')->output() or die "Cannot get new($transfertwhen, 'iso') from C4::Dates"; $getreserv{frombranch} = GetBranchName($transfertfrom); } @@ -314,7 +283,6 @@ if ($borrowernumber) { # return result to the template $template->param( reservloop => \@reservloop ); - } # current alert subscriptions diff --git a/members/pay.pl b/members/pay.pl index 88f56ec502..feb09e14e2 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 pay.pl diff --git a/members/setdebar.pl b/members/setdebar.pl index 561afd3c91..905e17f9eb 100755 --- a/members/setdebar.pl +++ b/members/setdebar.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 setdebar.pl diff --git a/misc/bulkupdate.pl b/misc/bulkupdate.pl index 35a290a3b4..385f6f2165 100644 --- a/misc/bulkupdate.pl +++ b/misc/bulkupdate.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 bulkupdate.pl diff --git a/misc/fines-sanop.pl b/misc/fines-sanop.pl index 5445fbef60..f1d0a770ba 100644 --- a/misc/fines-sanop.pl +++ b/misc/fines-sanop.pl @@ -25,7 +25,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use C4::Context; use C4::Circulation; diff --git a/misc/fines2.pl b/misc/fines2.pl index 148aecc361..554a65c738 100755 --- a/misc/fines2.pl +++ b/misc/fines2.pl @@ -25,7 +25,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use C4::Context; use C4::Circulation; diff --git a/misc/testKoha.pl b/misc/testKoha.pl index 312bfbfebd..281c4d13ce 100644 --- a/misc/testKoha.pl +++ b/misc/testKoha.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -w -# $Id$ # Copyright 2000-2002 Katipo Communications @@ -71,7 +70,6 @@ runtests (@tests); exit; -# $Log$ # Revision 1.7 2007/06/18 03:20:19 rangi # Finishing up the last of the tests # diff --git a/opac/maintenance.pl b/opac/maintenance.pl index 2f1d264257..22698a62ae 100755 --- a/opac/maintenance.pl +++ b/opac/maintenance.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index d133c70a5f..fbe7950d12 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/opac/opac-alert-subscribe.pl b/opac/opac-alert-subscribe.pl index d26af246e8..9051e8c0c5 100755 --- a/opac/opac-alert-subscribe.pl +++ b/opac/opac-alert-subscribe.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use CGI; diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 7882545ff4..b01d449f10 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/opac/opac-browser.pl b/opac/opac-browser.pl index 0b42133d49..360dcd9860 100755 --- a/opac/opac-browser.pl +++ b/opac/opac-browser.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 opac-tags_subject.pl diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 293327865f..e84af07390 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/opac/opac-main.pl b/opac/opac-main.pl index dfaf06de8f..5875baa1d3 100755 --- a/opac/opac-main.pl +++ b/opac/opac-main.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 9d4f0b1bce..b202ee5228 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl index 298c090544..74cd6fa68d 100755 --- a/opac/opac-serial-issues.pl +++ b/opac/opac-serial-issues.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use CGI; diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 683610c60f..0b2394f638 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME @@ -230,7 +229,6 @@ output_html_with_http_headers $query, $cookie, $template->output; # -# $Log$ # Revision 1.12 2007/04/24 13:54:29 hdl # functions that were in C4::Interface::CGI::Output are now in C4::Output. # So this implies quite a change for files. diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl index 11cea1653a..65fb5cd10d 100755 --- a/opac/opac-tags_subject.pl +++ b/opac/opac-tags_subject.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 opac-tags_subject.pl diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index cc3a716c58..b77c0ab0c5 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 78bdd71aa7..0e0d037f13 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index 2c55ead86e..8955126626 100755 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index 01df7385db..06e41c7a12 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index 6a31475030..9bb5a8d958 100755 --- a/reports/borrowers_out.pl +++ b/reports/borrowers_out.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 84654f8483..283ed2b542 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index d033b492c3..8b2b61ca75 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl index 93c5469d06..5237cb9268 100755 --- a/reports/catalogue_out.pl +++ b/reports/catalogue_out.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 746c355cb8..35e56c8a83 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index f82847aac8..c3f1c6bfc2 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/issues_by_borrower_category.plugin b/reports/issues_by_borrower_category.plugin index 6e14cdf217..3ed57e612c 100644 --- a/reports/issues_by_borrower_category.plugin +++ b/reports/issues_by_borrower_category.plugin @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 5ed632ee5f..ed59e5a7f6 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reports/itemslost.pl b/reports/itemslost.pl index 3844dd65b2..844b240c91 100755 --- a/reports/itemslost.pl +++ b/reports/itemslost.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -#$Id$ =head1 itemslost diff --git a/reports/itemtypes.plugin b/reports/itemtypes.plugin index 9458afe756..71b00a3f1f 100644 --- a/reports/itemtypes.plugin +++ b/reports/itemtypes.plugin @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/reserve/renewscript.pl b/reserve/renewscript.pl index d06101e231..99e1faee2e 100755 --- a/reserve/renewscript.pl +++ b/reserve/renewscript.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #written 18/1/2000 by chris@katipo.co.nz #script to renew items from the web diff --git a/reserve/request.pl b/reserve/request.pl index 310957ab71..65983ab8e2 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ #writen 2/1/00 by chris@katipo.oc.nz # Copyright 2000-2002 Katipo Communications diff --git a/serials/acqui-search-result.pl b/serials/acqui-search-result.pl index e9d01cc372..09a5d962a8 100755 --- a/serials/acqui-search-result.pl +++ b/serials/acqui-search-result.pl @@ -20,7 +20,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/acqui-search.pl b/serials/acqui-search.pl index e8e09b8b93..60a85d18d2 100755 --- a/serials/acqui-search.pl +++ b/serials/acqui-search.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use CGI; diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl index 7ff00c11c1..aaf4df54e2 100755 --- a/serials/checkexpiration.pl +++ b/serials/checkexpiration.pl @@ -16,7 +16,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/distributedto.pl b/serials/distributedto.pl index 8cf6aa0816..d90f80775a 100755 --- a/serials/distributedto.pl +++ b/serials/distributedto.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/receipt.pl b/serials/receipt.pl index 2a07827ff9..29770e8775 100755 --- a/serials/receipt.pl +++ b/serials/receipt.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use CGI; diff --git a/serials/serial-issues.pl b/serials/serial-issues.pl index 05ea2c12d2..3412d178ef 100755 --- a/serials/serial-issues.pl +++ b/serials/serial-issues.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index 8aa51e92bd..b6a9aec6c7 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use CGI; diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index 84083d462a..233d6000d6 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/serials-home.pl b/serials/serials-home.pl index 2a3820eccc..7b0c464ac9 100755 --- a/serials/serials-home.pl +++ b/serials/serials-home.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/serials-recieve.pl b/serials/serials-recieve.pl index 830c56a975..f6019a45a9 100755 --- a/serials/serials-recieve.pl +++ b/serials/serials-recieve.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/statecollection.pl b/serials/statecollection.pl index 8f42e704ef..fc928eea65 100755 --- a/serials/statecollection.pl +++ b/serials/statecollection.pl @@ -15,7 +15,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; use CGI; diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl index 31ae2e4f75..210e947c0a 100755 --- a/serials/subscription-renew.pl +++ b/serials/subscription-renew.pl @@ -18,7 +18,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/serials/viewalerts.pl b/serials/viewalerts.pl index 24581f6abc..cf2278d3c7 100755 --- a/serials/viewalerts.pl +++ b/serials/viewalerts.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/suggestion/acceptorreject.pl b/suggestion/acceptorreject.pl index d51e01d398..ed7aee9204 100755 --- a/suggestion/acceptorreject.pl +++ b/suggestion/acceptorreject.pl @@ -17,7 +17,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME diff --git a/tools/breeding.pl b/tools/breeding.pl index db304adeb4..26caa870c7 100755 --- a/tools/breeding.pl +++ b/tools/breeding.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Script for handling import of MARC data into Koha db # and Z39.50 lookups @@ -99,7 +98,6 @@ my $file; #--------------- # log cleared, as marcimport is (almost) rewritten from scratch. -# $Log$ # Revision 1.3 2007/04/24 13:54:30 hdl # functions that were in C4::Interface::CGI::Output are now in C4::Output. # So this implies quite a change for files. diff --git a/tools/cleanborrowers.pl b/tools/cleanborrowers.pl index 1385aa8213..e24f647a1d 100755 --- a/tools/cleanborrowers.pl +++ b/tools/cleanborrowers.pl @@ -17,7 +17,6 @@ # # Written by Antoine Farnault antoine@koha-fr.org on Nov. 2006. -# $Id$ =head1 cleanborrowers.pl diff --git a/tools/export.pl b/tools/export.pl index 2d92842682..90fe0b0efd 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -16,7 +16,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ use strict; require Exporter; diff --git a/tools/import.pl b/tools/import.pl index 6b6ca69c9c..a908c556f3 100755 --- a/tools/import.pl +++ b/tools/import.pl @@ -1,7 +1,5 @@ #!/usr/bin/perl -# $Id$ - # Script for handling import of MARC data into Koha db # and Z39.50 lookups @@ -9,7 +7,6 @@ # Licensed under the GPL - # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. @@ -96,7 +93,7 @@ output_html_with_http_headers $input, $cookie, $template->output; #--------------- # log cleared, as marcimport is (almost) rewritten from scratch. -# $Log$ +# # Revision 1.5 2007/04/24 13:54:30 hdl # functions that were in C4::Interface::CGI::Output are now in C4::Output. # So this implies quite a change for files. diff --git a/tools/koha-news.pl b/tools/koha-news.pl index c19dae73f6..49879e71be 100755 --- a/tools/koha-news.pl +++ b/tools/koha-news.pl @@ -26,10 +26,10 @@ use CGI; use C4::Auth; use C4::Koha; use C4::Context; +use C4::Date; use C4::Output; use C4::NewsChannels; use C4::Languages; -use C4::Date; use Date::Calc qw/Date_to_Days Today/; my $cgi = new CGI; @@ -37,7 +37,7 @@ my $cgi = new CGI; my $id = $cgi->param('id'); my $title = $cgi->param('title'); my $new = $cgi->param('new'); -my $expirationdate = format_date_in_iso($cgi->param('expirationdate')); +my $expirationdate = $cgi->param('expirationdate'); my $number = $cgi->param('number'); my $lang = $cgi->param('lang'); @@ -70,19 +70,16 @@ $template->param( lang_list => \@lang_list ); my $op = $cgi->param('op'); if ( $op eq 'add_form' ) { - $template->param( add_form => 1, - DHTMLcalendar_dateformat => get_date_format_string_for_DHTMLcalendar(), - ); + $template->param( add_form => 1 ); if ($id) { $template->param( op => 'edit', - id => $new_detail->{'idnew'}, + id => $new_detail->{'idnew'} ); - $template->param($new_detail,); + $template->param($new_detail); } else { - $template->param( op => 'add', - ); + $template->param( op => 'add' ); } } elsif ( $op eq 'add' ) { @@ -105,8 +102,8 @@ else { foreach my $new ( @$opac_news ) { next unless $new->{'expirationdate'}; - next if $new->{'expirationdate'} eq '0000-00-00'; - if (Date_to_Days( split "-" ,format_date_in_iso($new->{'expirationdate'}) ) < Date_to_Days(&Today) ){ + # next if $new->{'expirationdate'} eq '0000-00-00'; # now saved as null + if (Date_to_Days( split "-" ,$new->{'expirationdate'} ) < Date_to_Days(&Today) ){ $new->{'hasexpirated'} = 1; } } @@ -114,8 +111,10 @@ else { $template->param( $lang => 1, opac_news => $opac_news, - opac_news_count => $opac_news_count - ); + opac_news_count => $opac_news_count, + ); } - +$template->param( + DHTMLcalendar_dateformat => get_date_format_string_for_DHTMLcalendar(C4::Context->preference('dateformat')) , + ); output_html_with_http_headers $cgi, $cookie, $template->output; diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 1f0eb95cd9..1ed205e0f4 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # diff --git a/updater/update22to30.pl b/updater/update22to30.pl index 549db4fc0c..bb7e044db8 100755 --- a/updater/update22to30.pl +++ b/updater/update22to30.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Database Updater # This script checks for required updates to the database. @@ -2214,5 +2213,4 @@ sub SetVersion { } exit; -# $Log$ # Revision 1.172 2007/07/19 10:21:22 hdl diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl index 1ad57753d0..2354458967 100755 --- a/virtualshelves/addbybiblionumber.pl +++ b/virtualshelves/addbybiblionumber.pl @@ -20,7 +20,6 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# $Id$ =head1 NAME @@ -125,7 +124,6 @@ else { # this shelf doesn't already exist. output_html_with_http_headers $query, $cookie, $template->output; } -# $Log$ # Revision 1.8 2007/04/24 13:54:29 hdl # functions that were in C4::Interface::CGI::Output are now in C4::Output. # So this implies quite a change for files. diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index ad2dce6c33..30cb1c8075 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -280,7 +280,6 @@ sub shelves { } # -# $Log$ # Revision 1.13 2007/04/24 13:54:29 hdl # functions that were in C4::Interface::CGI::Output are now in C4::Output. # So this implies quite a change for files. -- 2.39.2