Patch from Joe Atzberger to remove $Id$ and $Log$ from scripts
authorChris Cormack <crc@liblime.com>
Thu, 18 Oct 2007 09:05:39 +0000 (04:05 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 18 Oct 2007 21:27:04 +0000 (16:27 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
91 files changed:
acqui/acqui-home.pl
acqui/basket.pl
acqui/booksellers.pl
acqui/currency.pl
acqui/histsearch.pl
acqui/lateorders.pl
acqui/newordersuggestion.pl
acqui/orderreceive.pl
acqui/parcel.pl
acqui/parcels.pl
acqui/supplier.pl
authorities/authorities.pl
catalogue/detail.pl
catalogue/issuehistory.pl
catalogue/moredetail.pl
cataloguing/addbiblio.pl
cataloguing/addbooks.pl
cataloguing/additem.pl
cataloguing/plugin_launcher.pl
circ/bookcount.pl
circ/branchoverdues.pl
circ/overdue.pl
circ/pendingreserves.pl
circ/stats.pl
circ/transferstodo.pl
circ/transferstoreceive.pl
circ/waitingreserves.pl
members/boraccount.pl
members/borrowers_details.pl
members/deletemem.pl
members/guarantor_search.pl
members/member-picupload.pl
members/member.pl
members/memberentry.pl
members/moremember.pl
members/pay.pl
members/setdebar.pl
misc/bulkupdate.pl
misc/fines-sanop.pl
misc/fines2.pl
misc/testKoha.pl
opac/maintenance.pl
opac/opac-ISBDdetail.pl
opac/opac-alert-subscribe.pl
opac/opac-basket.pl
opac/opac-browser.pl
opac/opac-detail.pl
opac/opac-main.pl
opac/opac-readingrecord.pl
opac/opac-serial-issues.pl
opac/opac-shelves.pl
opac/opac-tags_subject.pl
opac/opac-topissues.pl
opac/opac-user.pl
reports/acquisitions_stats.pl
reports/bor_issues_top.pl
reports/borrowers_out.pl
reports/borrowers_stats.pl
reports/cat_issues_top.pl
reports/catalogue_out.pl
reports/catalogue_stats.pl
reports/issues_avg_stats.pl
reports/issues_by_borrower_category.plugin
reports/issues_stats.pl
reports/itemslost.pl
reports/itemtypes.plugin
reserve/renewscript.pl
reserve/request.pl
serials/acqui-search-result.pl
serials/acqui-search.pl
serials/checkexpiration.pl
serials/distributedto.pl
serials/receipt.pl
serials/serial-issues.pl
serials/serials-collection.pl
serials/serials-edit.pl
serials/serials-home.pl
serials/serials-recieve.pl
serials/statecollection.pl
serials/subscription-renew.pl
serials/viewalerts.pl
suggestion/acceptorreject.pl
tools/breeding.pl
tools/cleanborrowers.pl
tools/export.pl
tools/import.pl
tools/koha-news.pl
tools/viewlog.pl
updater/update22to30.pl
virtualshelves/addbybiblionumber.pl
virtualshelves/shelves.pl

index 7b35c3f..b8e6162 100755 (executable)
@@ -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
index a94422b..a0519d3 100755 (executable)
@@ -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;
index 178a749..54ef329 100755 (executable)
@@ -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
 
index 7362264..f2fb44f 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #written by chris@katipo.co.nz
 #9/10/2000
index 1da1fc3..c7e3c32 100755 (executable)
@@ -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
 
index d78a959..034ab5b 100755 (executable)
@@ -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
 
index 5f637c1..8be5b45 100755 (executable)
@@ -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
 
index b20b4a5..84728f1 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #script to recieve orders
 #written by chris@katipo.co.nz 24/2/2000
index cbc0b5e..0a1feec 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #script to recieve orders
 #written by chris@katipo.co.nz 24/2/2000
index 8f35a2b..0e6de93 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #script to show display basket of orders
 #written by chris@katipo.co.nz 24/2/2000
index e3bf2e0..5fb7708 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #script to show display basket of orders
 #written by chris@katipo.co.nz 24/2/2000
index dc41e46..7bd6e06 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 6f301b9..998ab1e 100755 (executable)
@@ -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;
index 673629d..113e77d 100755 (executable)
@@ -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;
index 453217e..6f3542c 100755 (executable)
@@ -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;
index 5d96c45..d216757 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl 
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index e22556a..38b7eb4 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 8bc26aa..929b07f 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index a3b166b..51189d3 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 65e5f5c..383b69b 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #written 7/3/2002 by Finlay
 #script to display reports
index 52e3f21..fc14693 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 #
 # This file is part of Koha.
 #
index f5120e2..760ba7c 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 3a7b720..a158854 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 874fd89..5c1248b 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #written 14/1/2000
 #script to display reports
index 174061a..ff00c88 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 34d3cc8..697a41a 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index f3a0f6f..c379975 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 3f2c0a9..350b537 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #writen 11/1/2000 by chris@katipo.oc.nz
 #script to display borrowers account details
index 0aa987a..b4f1181 100755 (executable)
@@ -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
index c694350..cf7da43 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #script to delete items
 #written 2/5/00
index 6204880..8059b72 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # script to find a guarantor
 
index 6190ac7..6ca68a7 100755 (executable)
@@ -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
index 99e8340..24429cd 100755 (executable)
@@ -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
index 3d0a58a..d1bde60 100755 (executable)
@@ -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;
index 484c954..2542a70 100755 (executable)
@@ -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 <TMPL_IF name="I"> => 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
index 88f56ec..feb09e1 100755 (executable)
@@ -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
 
index 561afd3..905e17f 100755 (executable)
@@ -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
 
index 35a290a..385f6f2 100644 (file)
@@ -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 
index 5445fbe..f1d0a77 100644 (file)
@@ -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;
index 148aecc..554a65c 100755 (executable)
@@ -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;
index 312bfbf..281c4d1 100644 (file)
@@ -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
 #
index 2f1d264..22698a6 100755 (executable)
@@ -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;
index d133c70..fbe7950 100755 (executable)
@@ -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
 
index d26af24..9051e8c 100755 (executable)
@@ -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;
index 7882545..b01d449 100755 (executable)
@@ -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;
index 0b42133..360dcd9 100755 (executable)
@@ -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
 
index 2933278..e84af07 100755 (executable)
@@ -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;
index dfaf06d..5875baa 100755 (executable)
@@ -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;
index 9d4f0b1..b202ee5 100755 (executable)
@@ -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;
index 298c090..74cd6fa 100755 (executable)
@@ -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;
index 683610c..0b2394f 100755 (executable)
@@ -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.
index 11cea16..65fb5cd 100755 (executable)
@@ -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
 
index cc3a716..b77c0ab 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 78bdd71..0e0d037 100755 (executable)
@@ -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;
index 2c55ead..8955126 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 01df738..06e41c7 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 6a31475..9bb5a8d 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 84654f8..283ed2b 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index d033b49..8b2b61c 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 93c5469..5237cb9 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 746c355..35e56c8 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index f82847a..c3f1c6b 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 6e14cdf..3ed57e6 100644 (file)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 5ed632e..ed59e5a 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 3844dd6..844b240 100755 (executable)
@@ -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
 
index 9458afe..71b00a3 100644 (file)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index d06101e..99e1fae 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #written 18/1/2000 by chris@katipo.co.nz
 #script to renew items from the web
index 310957a..65983ab 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #writen 2/1/00 by chris@katipo.oc.nz
 # Copyright 2000-2002 Katipo Communications
index e9d01cc..09a5d96 100755 (executable)
@@ -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
 
index e8e09b8..60a85d1 100755 (executable)
@@ -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;
index 7ff00c1..aaf4df5 100755 (executable)
@@ -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
 
index 8cf6aa0..d90f807 100755 (executable)
@@ -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
 
index 2a07827..29770e8 100755 (executable)
@@ -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;
index 05ea2c1..3412d17 100755 (executable)
@@ -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
 
index 8aa51e9..b6a9aec 100755 (executable)
@@ -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;
index 84083d4..233d600 100755 (executable)
@@ -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
 
index 2a3820e..7b0c464 100755 (executable)
@@ -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
 
index 830c56a..f6019a4 100755 (executable)
@@ -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
 
index 8f42e70..fc928ee 100755 (executable)
@@ -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;
index 31ae2e4..210e947 100755 (executable)
@@ -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
 
index 24581f6..cf2278d 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index d51e01d..ed7aee9 100755 (executable)
@@ -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
 
index db304ad..26caa87 100755 (executable)
@@ -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.
index 1385aa8..e24f647 100755 (executable)
@@ -17,7 +17,6 @@
 #
 #   Written by Antoine Farnault antoine@koha-fr.org on Nov. 2006.
 
-# $Id$
 
 =head1 cleanborrowers.pl
 
index 2d92842..90fe0b0 100755 (executable)
@@ -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;
index 6b6ca69..a908c55 100755 (executable)
@@ -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.
index c19dae7..49879e7 100755 (executable)
@@ -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;
index 1f0eb95..1ed205e 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
index 549db4f..bb7e044 100755 (executable)
@@ -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
index 1ad5775..2354458 100755 (executable)
@@ -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.
index ad2dce6..30cb1c8 100755 (executable)
@@ -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.