Merge remote branch 'kc/new/bug_5234' into kcmaster
authorChris Cormack <chrisc@catalyst.net.nz>
Fri, 8 Apr 2011 22:22:46 +0000 (10:22 +1200)
committerChris Cormack <chrisc@catalyst.net.nz>
Fri, 8 Apr 2011 22:22:46 +0000 (10:22 +1200)
44 files changed:
C4/AuthoritiesMarc.pm
C4/Heading.pm
C4/Letters.pm
C4/Matcher.pm
C4/Members.pm
C4/Reports/Guided.pm
C4/SQLHelper.pm
C4/Search.pm
acqui/booksellers.pl
acqui/neworderbiblio.pl
acqui/neworderempty.pl
acqui/parcels.pl
acqui/supplier.pl
authorities/authorities-list.pl
cataloguing/addbiblio.pl
cataloguing/addbooks.pl
cataloguing/value_builder/unimarc_field_4XX.pl
cataloguing/z3950_search.pl
circ/overdue.pl
installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_fastadd_framework.sql
installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql
koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/fieldmapping.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
labels/label-item-search.pl
members/memberentry.pl
misc/cronjobs/CONFIGURE.gmail [new file with mode: 0644]
misc/cronjobs/process_message_queue.pl
misc/migration_tools/bulkmarcimport.pl
misc/migration_tools/remove_unused_authorities.pl
reports/guided_reports.pl
t/db_dependent/lib/KohaTest.pm

index 4bbde76..fa2ef00 100644 (file)
@@ -364,7 +364,12 @@ sub CountUsage {
         my $query;
         $query= "an=".$authid;
                my ($err,$res,$result) = C4::Search::SimpleSearch($query,0,10);
-        return ($result);
+        if ($err) {
+            warn "Error: $err from search $query";
+            $result = 0;
+        }
+
+        return $result;
     }
 }
 
@@ -917,7 +922,7 @@ sub FindDuplicateAuthority {
     }
     my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] );
     # there is at least 1 result => return the 1st one
-    if (@$results>0) {
+    if (!defined $error && @{$results} ) {
       my $marcrecord = MARC::File::USMARC::decode($results->[0]);
       return $marcrecord->field('001')->data,BuildSummary($marcrecord,$marcrecord->field('001')->data,$authtypecode);
     }
index 643d820..ba9d23f 100644 (file)
@@ -24,6 +24,7 @@ use MARC::Field;
 use C4::Context;
 use C4::Heading::MARC21;
 use C4::Search;
+use Carp;
 
 our $VERSION = 3.00;
 
@@ -109,6 +110,9 @@ sub authorities {
     my $query = qq(Match-heading,do-not-truncate,ext="$self->{'search_form'}");
     $query .= $self->_query_limiters();
     my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
+    if (defined $error) {
+        carp "Error:$error from search $query";
+    }
     return $results;
 }
 
@@ -126,6 +130,9 @@ sub preferred_authorities {
     my $query = "Match-heading-see-from,do-not-truncate,ext='$self->{'search_form'}'";
     $query .= $self->_query_limiters();
     my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
+    if (defined $error) {
+        carp "Error:$error from search $query";
+    }
     return $results;
 }
 
index 34e3686..269ec78 100644 (file)
@@ -624,7 +624,7 @@ sub SendQueuedMessages (;$) {
         # This is just begging for subclassing
         next MESSAGE if ( lc($message->{'message_transport_type'}) eq 'rss' );
         if ( lc( $message->{'message_transport_type'} ) eq 'email' ) {
-            _send_message_by_email( $message );
+            _send_message_by_email( $message, $params->{'username'}, $params->{'password'}, $params->{'method'} );
         }
         elsif ( lc( $message->{'message_transport_type'} ) eq 'sms' ) {
             _send_message_by_sms( $message );
@@ -789,6 +789,7 @@ ENDSQL
 
 sub _send_message_by_email ($;$$$) {
     my $message = shift or return;
+    my ($username, $password, $method) = @_;
 
     my $to_address = $message->{to_address};
     unless ($to_address) {
@@ -824,6 +825,7 @@ sub _send_message_by_email ($;$$$) {
         Message => $content,
         'content-type' => $message->{'content_type'} || 'text/plain; charset="UTF-8"',
     );
+    $sendmail_params{'Auth'} = {user => $username, pass => $password, method => $method} if $username;
     if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) {
        $sendmail_params{ Bcc } = $bcc;
     }
index 5915c12..9d1df67 100644 (file)
@@ -606,9 +606,12 @@ sub get_matches {
         # FIXME only searching biblio index at the moment
         my ($error, $searchresults, $total_hits) = SimpleSearch($query, 0, $max_matches);
 
-        warn "search failed ($query) $error" if $error;
-        foreach my $matched (@$searchresults) {
-            $matches{$matched} += $matchpoint->{'score'};
+        if (defined $error ) {
+            warn "search failed ($query) $error";
+        } else {
+            foreach my $matched (@{$searchresults}) {
+                $matches{$matched} += $matchpoint->{'score'};
+            }
         }
     }
 
index bf73e0e..f0ac280 100644 (file)
@@ -213,22 +213,28 @@ sub SearchMember {
             $query.=" borrowers.branchcode =".$dbh->quote(C4::Context->userenv->{'branch'})." AND " unless (C4::Context->userenv->{'branch'} eq "insecure");
           }      
         }     
-        $query.="((surname LIKE ? OR surname LIKE ?
-                OR firstname  LIKE ? OR firstname LIKE ?
-                OR othernames LIKE ? OR othernames LIKE ?)
+        $query.="((surname LIKE ? OR (surname LIKE ? AND surname REGEXP ?)
+                OR firstname  LIKE ? OR (firstname LIKE ? AND firstname REGEXP ?)
+                OR othernames LIKE ? OR (othernames LIKE ? AND othernames REGEXP ?))
         " .
         ($category_type?" AND category_type = ".$dbh->quote($category_type):"");
+        my $regex = '[[:punct:][:space:]]'.$data[0];
         @bind = (
-            "$data[0]%", "% $data[0]%", "$data[0]%", "% $data[0]%",
-            "$data[0]%", "% $data[0]%"
+            "$data[0]%", "%$data[0]%", $regex, 
+            "$data[0]%", "%$data[0]%", $regex, 
+            "$data[0]%", "%$data[0]%", $regex 
         );
         for ( my $i = 1 ; $i < $count ; $i++ ) {
-            $query = $query . " AND (" . " surname LIKE ? OR surname LIKE ?
-                OR firstname  LIKE ? OR firstname LIKE ?
-                OR othernames LIKE ? OR othernames LIKE ?)";
+            $query = $query . " AND (" . " surname LIKE ? OR (surname LIKE ? AND surname REGEXP ?)
+                OR firstname  LIKE ? OR (firstname LIKE ? AND firstname REGEXP ?)
+                OR othernames LIKE ? OR (othernames LIKE ? AND othernames REGEXP ?))";
+            $regex = '[[:punct:][:space:]]'.$data[$i];
             push( @bind,
-                "$data[$i]%",   "% $data[$i]%", "$data[$i]%",
-                "% $data[$i]%", "$data[$i]%",   "% $data[$i]%" );
+              "$data[$i]%", "%$data[$i]%", $regex,
+              "$data[$i]%", "%$data[$i]%", $regex,
+              "$data[$i]%", "%$data[$i]%", $regex
+            );
+
 
             # FIXME - .= <<EOT;
         }
index 0da7c13..194c623 100644 (file)
@@ -43,7 +43,7 @@ BEGIN {
            save_report get_saved_reports execute_query get_saved_report create_compound run_compound
                get_column_type get_distinct_values save_dictionary get_from_dictionary
                delete_definition delete_report format_results get_sql
-        select_2_select_count_value update_sql
+        nb_rows update_sql
        );
 }
 
@@ -373,6 +373,14 @@ sub get_criteria {
     return ( \@criteria_array );
 }
 
+sub nb_rows($) {
+    my $sql = shift or return;
+    my $sth = C4::Context->dbh->prepare($sql);
+    $sth->execute();
+    my $rows = $sth->fetchall_arrayref();
+    return scalar (@$rows);
+}
+
 =item execute_query
 
   ($results, $total, $error) = execute_query($sql, $offset, $limit)
@@ -399,16 +407,6 @@ the user in a user-supplied SQL query WILL apply in any case.
 #  ~ remove any LIMIT clause
 #  ~ repace SELECT clause w/ SELECT count(*)
 
-sub select_2_select_count_value ($) {
-    my $sql = shift or return;
-    my $countsql = select_2_select_count($sql);
-    $debug and warn "original query: $sql\ncount query: $countsql\n";
-    my $sth1 = C4::Context->dbh->prepare($countsql);
-    $sth1->execute();
-    my $total = $sth1->fetchrow();
-    $debug and warn "total records for this query: $total\n";
-    return $total;
-}
 sub select_2_select_count ($) {
     # Modify the query passed in to create a count query... (I think this covers all cases -crn)
     my ($sql) = strip_limit(shift) or return;
@@ -468,7 +466,8 @@ sub execute_query ($;$$$) {
 
 =item save_report($sql,$name,$type,$notes)
 
-Given some sql and a name this will saved it so that it can resued
+Given some sql and a name this will saved it so that it can reused
+Returns id of the newly created report
 
 =cut
 
@@ -478,8 +477,10 @@ sub save_report {
     $sql =~ s/(\s*\;\s*)$//; # removes trailing whitespace and /;/
     my $query =
 "INSERT INTO saved_sql (borrowernumber,date_created,last_modified,savedsql,report_name,type,notes)  VALUES (?,now(),now(),?,?,?,?)";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $borrowernumber, $sql, $name, $type, $notes );
+    $dbh->do( $query, undef, $borrowernumber, $sql, $name, $type, $notes );
+    my $id = $dbh->selectrow_array("SELECT max(id) FROM saved_sql WHERE borrowernumber=? AND report_name=?", undef,
+                                   $borrowernumber, $name);
+    return $id;
 }
 
 sub update_sql {
index 060b78f..a15beb8 100644 (file)
@@ -164,6 +164,7 @@ sub UpdateInTable{
     my @ids=@$data{@field_ids};
     my $dbh      = C4::Context->dbh;
     my ($keys,$values)=_filter_hash($tablename,$data,0);
+    return unless ($keys);
     my $query = 
     qq{     UPDATE $tablename
             SET  }.join(",",@$keys).qq{
index a8d5ba7..3b1ec79 100644 (file)
@@ -121,18 +121,19 @@ sub FindDuplicate {
         }
     }
 
-    # FIXME: add error handling
-    my ( $error, $searchresults ) = SimpleSearch($query); # FIXME :: hardcoded !
+    my ( $error, $searchresults, undef ) = SimpleSearch($query); # FIXME :: hardcoded !
     my @results;
-    foreach my $possible_duplicate_record (@$searchresults) {
-        my $marcrecord =
-          MARC::Record->new_from_usmarc($possible_duplicate_record);
-        my $result = TransformMarcToKoha( $dbh, $marcrecord, '' );
-
-        # FIXME :: why 2 $biblionumber ?
-        if ($result) {
-            push @results, $result->{'biblionumber'};
-            push @results, $result->{'title'};
+    if (!defined $error) {
+        foreach my $possible_duplicate_record (@{$searchresults}) {
+            my $marcrecord =
+            MARC::Record->new_from_usmarc($possible_duplicate_record);
+            my $result = TransformMarcToKoha( $dbh, $marcrecord, '' );
+
+            # FIXME :: why 2 $biblionumber ?
+            if ($result) {
+                push @results, $result->{'biblionumber'};
+                push @results, $result->{'title'};
+            }
         }
     }
     return @results;
@@ -154,12 +155,16 @@ This function provides a simple search API on the bibliographic catalog
     * $max_results - if present, determines the maximum number of records to fetch. undef is All. defaults to undef.
 
 
-=item C<Output:>
+=item C<Return:>
 
-    * $error is a empty unless an error is detected
-    * \@results is an array of records.
+    Returns an array consisting of three elements
+    * $error is undefined unless an error is detected
+    * $results is a reference to an array of records.
     * $total_hits is the number of hits that would have been returned with no limit
 
+    If an error is returned the two other return elements are undefined. If error itself is undefined
+    the other two elements are always defined
+
 =item C<usage in the script:>
 
 =back
@@ -173,23 +178,23 @@ if (defined $error) {
     exit;
 }
 
-my $hits = scalar @$marcresults;
+my $hits = @{$marcresults};
 my @results;
 
-for my $i (0..$hits) {
-    my %resultsloop;
-    my $marcrecord = MARC::File::USMARC::decode($marcresults->[$i]);
-    my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,'');
-
-    #build the hash for the template.
-    $resultsloop{title}           = $biblio->{'title'};
-    $resultsloop{subtitle}        = $biblio->{'subtitle'};
-    $resultsloop{biblionumber}    = $biblio->{'biblionumber'};
-    $resultsloop{author}          = $biblio->{'author'};
-    $resultsloop{publishercode}   = $biblio->{'publishercode'};
-    $resultsloop{publicationyear} = $biblio->{'publicationyear'};
+for my $r ( @{$marcresults} ) {
+    my $marcrecord = MARC::File::USMARC::decode($r);
+    my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,q{});
+
+    #build the iarray of hashs for the template.
+    push @results, {
+        title           => $biblio->{'title'},
+        subtitle        => $biblio->{'subtitle'},
+        biblionumber    => $biblio->{'biblionumber'},
+        author          => $biblio->{'author'},
+        publishercode   => $biblio->{'publishercode'},
+        publicationyear => $biblio->{'publicationyear'},
+        };
 
-    push @results, \%resultsloop;
 }
 
 $template->param(result=>\@results);
@@ -207,14 +212,14 @@ sub SimpleSearch {
         return ( undef, $search_result, scalar($result->{hits}) );
     }
     else {
+        return ( 'No query entered', undef, undef ) unless $query;
         # FIXME hardcoded value. See catalog/search.pl & opac-search.pl too.
-        my @servers = defined ( $servers ) ? @$servers : ( "biblioserver" );
-        my @results;
+        my @servers = defined ( $servers ) ? @$servers : ( 'biblioserver' );
         my @zoom_queries;
         my @tmpresults;
         my @zconns;
-        my $total_hits;
-        return ( "No query entered", undef, undef ) unless $query;
+        my $results = [];
+        my $total_hits = 0;
 
         # Initialize & Search Zebra
         for ( my $i = 0 ; $i < @servers ; $i++ ) {
@@ -258,7 +263,7 @@ sub SimpleSearch {
 
                 for my $j ( $first_record..$last_record ) {
                     my $record = $tmpresults[ $i - 1 ]->record( $j-1 )->raw(); # 0 indexed
-                    push @results, $record;
+                    push @{$results}, $record;
                 }
             }
         }
@@ -270,7 +275,7 @@ sub SimpleSearch {
             $zoom_query->destroy();
         }
 
-        return ( undef, \@results, $total_hits );
+        return ( undef, $results, $total_hits );
     }
 }
 
@@ -2641,11 +2646,11 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|);
         warn "BIBLIOADDSAUTHORITIES: $error";
             return (0,0) ;
           }
-      if ($results && scalar(@$results)==1) {
+      if ( @{$results} == 1 ) {
         my $marcrecord = MARC::File::USMARC::decode($results->[0]);
         $field->add_subfields('9'=>$marcrecord->field('001')->data);
         $countlinked++;
-      } elsif (scalar(@$results)>1) {
+      } elsif ( @{$results} > 1 ) {
    #More than One result
    #This can comes out of a lack of a subfield.
 #         my $marcrecord = MARC::File::USMARC::decode($results->[0]);
index 88dbaa9..cc5c084 100755 (executable)
@@ -66,7 +66,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $query,
         type            => 'intranet',
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 'vendors_manage' },
+        flagsrequired   => { acquisition => '*' },
         debug           => 1,
     }
 );
index 9e63492..c348940 100755 (executable)
@@ -112,16 +112,15 @@ if (defined $error) {
 
 my @results;
 
-if ($marcresults) {
-    foreach my $result ( @{$marcresults} ) {
-        my $marcrecord = MARC::File::USMARC::decode( $result );
-        my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' );
+foreach my $result ( @{$marcresults} ) {
+    my $marcrecord = MARC::File::USMARC::decode( $result );
+    my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' );
 
-        $biblio->{booksellerid} = $booksellerid;
-        push @results, $biblio;
+    $biblio->{booksellerid} = $booksellerid;
+    push @results, $biblio;
 
-    }
 }
+
 $template->param(
     basketno             => $basketno,
     booksellerid     => $bookseller->{'id'},
index e6ceccc..386dda7 100755 (executable)
@@ -243,7 +243,7 @@ foreach my $thisbranch ( sort {$branches->{$a}->{'branchname'} cmp $branches->{$
         value      => $thisbranch,
         branchname => $branches->{$thisbranch}->{'branchname'},
     );
-    $row{'selected'} = 1 if( $thisbranch eq $data->{branchcode}) ;
+    $row{'selected'} = 1 if( $thisbranch && $data->{branchcode} && $thisbranch eq $data->{branchcode}) ;
     push @branchloop, \%row;
 }
 $template->param( branchloop => \@branchloop );
index 1e8d44e..915b1e8 100755 (executable)
@@ -91,7 +91,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => 'intranet',
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
+        flagsrequired   => { acquisition => 'order_receive' },
         debug           => 1,
     }
 );
index 52d940c..2a4078a 100755 (executable)
@@ -64,7 +64,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $query,
         type            => 'intranet',
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 'vendors_manage' },
+        flagsrequired   => { acquisition => '*' },
         debug           => 1,
     }
 );
index 9c472f1..eec3233 100755 (executable)
@@ -25,6 +25,9 @@ foreach my $authority (@$dataauthorities){
   $query= "an=".$authority->{'authid'};
   # search for biblios mapped
   my ($err,$res,$used) = C4::Search::SimpleSearch($query,0,10);
+  if (defined $err) {
+      $used = 0;
+  }
   if ($marcauthority && $marcauthority->field($authtypes{$authority->{'authtypecode'}}->{'tag'})){
     print qq("),$marcauthority->field($authtypes{$authority->{'authtypecode'}}->{"tag"})->as_string(),qq(";),qq($authority->{'authid'};"),$authtypes{$authority->{'authtypecode'}}->{'lib'},qq(";$used\n);
   }
index 4bb2012..d2a3841 100755 (executable)
@@ -769,16 +769,16 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|);
         warn "BIBLIOADDSAUTHORITIES: $error";
            return (0,0) ;
          }
-      if ($results && scalar(@$results)==1) {
+      if ( @{$results} == 1) {
         my $marcrecord = MARC::File::USMARC::decode($results->[0]);
         $field->add_subfields('9'=>$marcrecord->field('001')->data);
         $countlinked++;
-      } elsif (scalar(@$results)>1) {
+      } elsif (@{$results} > 1) {
    #More than One result 
    #This can comes out of a lack of a subfield.
 #         my $marcrecord = MARC::File::USMARC::decode($results->[0]);
 #         $record->field($data->{tagfield})->add_subfields('9'=>$marcrecord->field('001')->data);
-  $countlinked++;
+        $countlinked++;
       } else {
   #There are no results, build authority record, add it to Authorities, get authid and add it to 9
   ###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode     
@@ -838,7 +838,7 @@ my $dbh           = C4::Context->dbh;
 my $userflags = ($frameworkcode eq 'FA') ? "fast_cataloging" : "edit_catalogue";
 
 $frameworkcode = &GetFrameworkCode($biblionumber)
-  if ( $biblionumber and not($frameworkcode) );
+  if ( $biblionumber and not($frameworkcode) and $op ne 'addbiblio' );
 
 $frameworkcode = '' if ( $frameworkcode eq 'Default' );
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 4c8a989..5e89ef8 100755 (executable)
@@ -85,8 +85,8 @@ if ($query) {
 
     # format output
     # SimpleSearch() give the results per page we want, so 0 offet here
-    my $total = scalar @$marcresults;
-    my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @$marcresults );
+    my $total = @{$marcresults};
+    my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @{$marcresults} );
     $template->param(
         total          => $total_hits,
         query          => $query,
index 84a6208..ddb6547 100755 (executable)
@@ -335,7 +335,10 @@ sub plugin {
         my $orderby;
         $search = 'kw,wrdl='.$search.' and mc-itemtype='.$itype if $itype;
         my ( $errors, $results, $total_hits ) = SimpleSearch($search, $startfrom * $resultsperpage, $resultsperpage );
-        my $total = scalar(@$results);
+        if (defined $errors ) {
+            $results = [];
+        }
+        my $total = @{$results};
 
         #        warn " biblio count : ".$total;
 
index 6311c0b..b12a9c9 100755 (executable)
@@ -103,6 +103,14 @@ if ( $op ne "do_search" ) {
 }
 else {
     my @id = $input->param('id');
+
+    if ( not defined @id ) {
+        # empty server list -> report and exit
+        $template->param( emptyserverlist => 1 );
+        output_html_with_http_headers $input, $cookie, $template->output;
+        exit;
+    }
+
     my @oConnection;
     my @oResult;
     my @errconn;
index 3510a2b..f801644 100755 (executable)
@@ -229,7 +229,15 @@ if ($noreport) {
     $bornamefilter =~s/\?/\_/g;
 
     my $strsth="SELECT date_due,
+        borrowers.title as borrowertitle,
         concat(surname,' ', firstname) as borrower, 
+        borrowers.streetnumber,
+        borrowers.streettype, 
+        borrowers.address,
+        borrowers.address2,
+        borrowers.city,
+        borrowers.zipcode,
+        borrowers.country,
         borrowers.phone,
         borrowers.email,
         issues.itemnumber,
@@ -290,7 +298,15 @@ if ($noreport) {
             borrowernumber         => $data->{borrowernumber},
             barcode                => $data->{barcode},
             itemnum                => $data->{itemnumber},
+            borrowertitle          => $data->{borrowertitle},
             name                   => $data->{borrower},
+            streetnumber           => $data->{streetnumber},                   
+            streettype             => $data->{streettype},                     
+            address                => $data->{address},                        
+            address2               => $data->{address2},                       
+            city                   => $data->{city},                   
+            zipcode                => $data->{zipcode},                        
+            country                => $data->{country},
             phone                  => $data->{phone},
             email                  => $data->{email},
             biblionumber           => $data->{biblionumber},
index f259c10..d1e6944 100644 (file)
@@ -101,7 +101,7 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib
                ('942','n','OPAC-Anzeige unterdrücken', 'OPAC-Anzeige unterdrücken', 0, 0, NULL, 9, '', '', '', 0, 5, 'FA', '', '', NULL),
                ('942','s','Kennzeichen für Zeitschrift', 'Zeitschrift', 0, 0, 'biblio.serial', 9, '', '', '', NULL, 5, 'FA', '', '', NULL),
                ('952','0','Ausgeschieden','Ausgeschieden',0,0,'items.wthdrawn',10,'WITHDRAWN','','',NULL,0,'FA','',NULL,NULL),
-               ('952','1','Spezifische Materialangaben (gebundener Band oder anderer Teil)','Spezifische Materialangaben (gebundener Band oder anderer Teil)',0,0,'items.itemlost',10,'LOST','','',NULL,0,'FA','',NULL,NULL),
+               ('952','1','Verloren','Verloren',0,0,'items.itemlost',10,'LOST','','',NULL,0,'FA','',NULL,NULL),
                ('952','2','Klassifikation oder Aufstellungssystematik','Klassifikation oder Aufstellungssystematik',0,0,'items.cn_source',10,'cn_source','','',NULL,0,'FA','',NULL,NULL),
                ('952','3','Spezifische Materialangaben (gebundener Band oder anderer Teil)','Spezifische Materialangaben (gebundener Band oder anderer Teil)',0,0,'items.materials',10,'','','',NULL,0,'FA','',NULL,NULL),
                ('952','4','Beschädigt','Beschädigt',0,0,'items.damaged',10,'DAMAGED','','',NULL,0,'FA','',NULL,NULL),
index dc5fce8..8c46b7b 100644 (file)
@@ -23,251 +23,251 @@ INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES
 INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'ETAT', '5', 'En traitement');
 INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'CAND', 'Candidat descripteur', 'Candidat descripteur');
 INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'CAND', 'Rejeté', 'Mot clé abandonné');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'an', 'Antilles Néerlandaises');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cr', 'Costa Rica');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'er', 'Allemagne');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', ' fr', '   France');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'de', 'Allemagne');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cn', 'Chine');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'in', 'Inde');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'is', 'Islande');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'nl', 'Pays Bas');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pa', 'Espagne');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 're', 'France');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'es', 'Espagne');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'us', '  EtatsUnis');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gb', ' GrandeBretagne');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ad', 'Andorre');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'af', 'Afghanistan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'al', 'Albanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ag', 'AntiguaetBarbuda');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'am', 'Arménie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ao', 'Angola');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'aq', 'Antarctique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ar', 'Argentine');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'as', 'Samoa américaines');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'at', 'Autriche');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'au', 'Australie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'aw', 'Aruba');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ax', 'Aland, Ã®les d''');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'az', 'Azerbaïdjan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ba', 'BosnieHerzégovine');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bb', 'Barbade');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bd', 'Bangladesh');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'be', 'Belgique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bf', 'Burkina Faso');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bf', 'HauteVolta');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bg', 'Bulgarie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bh', 'Bahreïn');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bi', 'Burundi');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bj', 'Bénin');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bm', 'Bermudes');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bn', 'Brunéi');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bo', 'Bolivie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'br', 'Brésil');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bs', 'Bahamas');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bt', 'Bhoutan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bv', 'Bouvet, Ã®le');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bw', 'Botswana');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'by', 'Biélorussie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'bz', 'Belize');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ca', 'Canada');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cc', 'Cocos, Ã®le des');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cc', 'Keeling');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cd', 'Zaïre');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cd', 'Congo');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cf', 'Centrafrique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cg', 'Congo');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ch', '  Suisse');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ci', 'Côte d''Ivoire');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ck', 'Cook, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cl', 'Chili');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cm', 'Cameroun');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cs', 'SerbieetMonténégro');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cu', 'Cuba');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cv', 'CapVert');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cx', 'Christmas, Ã®le');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cy', 'Chypre');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'cz', 'Tchèque, République');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'dj', 'Djibouti');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'dk', 'Danemark');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'dm', 'Dominique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'do', 'Dominicaine, République');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'dz', 'Algérie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ec', 'Equateur');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ee', 'Estonie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'eg', 'Egypte');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'eh', 'Sahara occidental');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'fi', 'Finlande');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'fj', 'Fidji');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'fk', 'Falkland, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'fm', 'Micronésie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'fo', 'Féroé, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ga', 'Gabon');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gd', 'Grenade');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ge', 'Géorgie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gf', 'Guyane française');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gh', 'Ghana');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gi', 'Gibraltar');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gl', 'Groenland');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gm', 'Gambie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gn', 'Guinée');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gp', 'Guadeloupe');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gq', 'Guinée');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gq', 'Guinée Ã©quatoriale');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gr', 'Grèce');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gs', 'Géorgie du sud et les Ã®les sandwich du Sud');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gt', 'Guatemala');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gu', 'Guam');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gw', 'GuinéeBissau');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'gy', 'Guyana');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'hk', 'HongKong');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'hm', 'Heard et Ã®les McDonald, Ã®le');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'hn', 'Honduras');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'hr', 'Croatie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ht', 'Haïti');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'hu', 'Hongrie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'id', 'Indonésie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ie', 'Irlande');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ii', 'intergouvernemental');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'il', 'Israël');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'iq', 'Iraq');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ir', 'Iran');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'it', 'Italie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'jm', 'Jamaïque');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'jo', 'Jordanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'jp', 'Japon');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ke', 'Kenya');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kg', 'Kirghizistan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kh', 'Cambodge');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ki', 'Kiribati');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'km', 'Comores');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kn', 'SaintKittsetNevis');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kp', 'Corée du Nord');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kr', 'Corée du Sud');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kw', 'Koweït');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ky', 'Caïmanes, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'kz', 'Kazakhstan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'la', 'Lao');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lb', 'Liban');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lc', 'SainteLucie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'li', 'Liechtenstein');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lk', 'Sri Lanka');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lr', 'Libéria');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ls', 'Lesotho');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lt', 'Lituanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lu', 'Luxembourg');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'lv', 'Lettonie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ly', 'Lybie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ma', 'Maroc');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mc', 'Monaco');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'md', 'Moldavie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mg', 'Madagascar');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mh', 'Marshall, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mk', 'Macédoine');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ml', 'Mali');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mm', 'Birmanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mm', 'Myanmar');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mn', 'Mongolie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mo', 'Macao');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mp', 'Mariannes du Nord, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mq', 'Martinique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mr', 'Mauritanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ms', 'Montserrat');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mt', 'Malte');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mu', 'Maurice');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mv', 'Maldives');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mw', 'Malawi');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mx', 'Mexique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'my', 'Malaisie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'mz', 'Mozambique');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'na', 'Namibie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'nc', 'NouvelleCalédonie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ne', 'Niger');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'nf', 'Norfolk');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ni', 'Nicaragua');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'no', 'Norvège');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'np', 'Népal');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'nr', 'Nauru');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'nu', 'Nioué');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'nz', 'NouvelleZélande');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'om', 'Oman');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pe', 'Pérou');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pf', 'Polynésie française');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pg', 'Papouasie NouvelleGuinée');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ph', 'Philippines');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pk', 'Pakistan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pm', 'SaintPierreetMiquelon');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pn', 'Pitcairn');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pr', 'Porto Rico');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ps', 'Palestine');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pt', 'Portugal');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'pw', 'Palau');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'py', 'Paraguay');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'qa', 'Qatar');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ro', 'Roumanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ru', 'Russie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'rw', 'Rwanda');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sa', 'Arabie saoudite');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sb', 'Salomon, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sc', 'Seychelles');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sd', 'Soudan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'se', 'Suède');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sg', 'Singapour');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sh', 'SainteHélène');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'si', 'Slovénie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sj', 'Svalbard et Ã®le Jan Mayen');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sk', 'Slovaquie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sl', 'Sierra Leone');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sm', 'SaintMarin');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sn', 'Sénégal');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'so', 'Somalie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sr', 'Suriname');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'st', 'Sao ToméetPrincipe');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'su', 'URSS');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sv', 'Salvador');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sy', 'Syrie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'sz', 'Swaziland');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tc', 'Turks et Caïques, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'td', 'Tchad');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tg', 'Togo');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'th', 'Thaïlande');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tj', 'Tadjikistan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tk', 'Tokélau');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tl', 'Timor oriental');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tm', 'Turkménistan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tn', 'Tunisie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'to', 'Tonga');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tr', 'Turquie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tt', 'TrinitéetTobago');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tv', 'Tuvalu');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tw', 'taïwan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'tz', 'Tanzanie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ua', 'Ukraine');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ug', 'Ouganda');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'um', 'îles mineures Ã©loignées des Etatsunis');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'uy', 'Uruguay');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'uz', 'Ouzbékistan');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'va', 'Vatican');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'vc', 'SaintVincentetles Grenadines');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 've', 'Venezuela');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'vg', 'Iles Vierges britanniques');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'vi', 'Iles Vierges (Etatsunis)');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'vn', 'Viet Nam');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'vu', 'Vanuatu');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'wf', 'Wallis et Futuna, Ã®les');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ws', 'Samoa');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'xc', 'Tchécoslovaquie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'xd', 'Allemagne avant 1945');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'xe', 'Europe');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'xk', 'Corée avant 1948');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'yd', 'Yémen');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'Yu', 'Yougoslavie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'za', 'Afrique du Sud');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'zm', 'Zambie');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'zw', 'Zimbabwe');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'zz', 'multiple');
-INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ta', 'Italie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AN', 'Antilles Néerlandaises');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CR', 'Costa Rica');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ER', 'Allemagne');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'FR', 'France');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'DE', 'Allemagne');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CN', 'Chine');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IN', 'Inde');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IS', 'Islande');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NL', 'Pays Bas');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PA', 'Espagne');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'RE', 'France');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ES', 'Espagne');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'US', '  EtatsUnis');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GB', ' GrandeBretagne');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AD', 'Andorre');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AF', 'Afghanistan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AL', 'Albanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AG', 'AntiguaetBarbuda');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AM', 'Arménie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AO', 'Angola');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AQ', 'Antarctique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AR', 'Argentine');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AS', 'Samoa américaines');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AT', 'Autriche');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AU', 'Australie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AW', 'Aruba');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AX', 'Aland, Ã®les d''');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'AZ', 'Azerbaïdjan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BA', 'BosnieHerzégovine');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BB', 'Barbade');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BD', 'Bangladesh');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BE', 'Belgique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BF', 'Burkina Faso');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BF', 'HauteVolta');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BG', 'Bulgarie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BH', 'Bahreïn');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BI', 'Burundi');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BJ', 'Bénin');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BM', 'Bermudes');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BN', 'Brunéi');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BO', 'Bolivie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BR', 'Brésil');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BS', 'Bahamas');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BT', 'Bhoutan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BV', 'Bouvet, Ã®le');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BW', 'Botswana');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BY', 'Biélorussie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'BZ', 'Belize');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CA', 'Canada');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CC', 'Cocos, Ã®le des');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CC', 'Keeling');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CD', 'Zaïre');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CD', 'Congo');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CF', 'Centrafrique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CG', 'Congo');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CH', '  Suisse');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CI', 'Côte d''Ivoire');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CK', 'Cook, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CL', 'Chili');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CM', 'Cameroun');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CS', 'SerbieetMonténégro');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CU', 'Cuba');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CV', 'CapVert');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CX', 'Christmas, Ã®le');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CY', 'Chypre');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'CZ', 'Tchèque, République');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'DJ', 'Djibouti');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'DK', 'Danemark');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'DM', 'Dominique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'DO', 'Dominicaine, République');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'DZ', 'Algérie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'EC', 'Equateur');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'EE', 'Estonie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'EG', 'Egypte');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'EH', 'Sahara occidental');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'FI', 'Finlande');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'FJ', 'Fidji');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'FK', 'Falkland, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'FM', 'Micronésie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'FO', 'Féroé, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GA', 'Gabon');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GD', 'Grenade');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GE', 'Géorgie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GF', 'Guyane française');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GH', 'Ghana');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GI', 'Gibraltar');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GL', 'Groenland');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GM', 'Gambie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GN', 'Guinée');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GP', 'Guadeloupe');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GQ', 'Guinée');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GQ', 'Guinée Ã©quatoriale');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GR', 'Grèce');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GS', 'Géorgie du sud et les Ã®les sandwich du Sud');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GT', 'Guatemala');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GU', 'Guam');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GW', 'GuinéeBissau');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'GY', 'Guyana');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'HK', 'HongKong');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'HM', 'Heard et Ã®les McDonald, Ã®le');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'HN', 'Honduras');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'HR', 'Croatie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'HT', 'Haïti');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'HU', 'Hongrie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ID', 'Indonésie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IE', 'Irlande');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'II', 'intergouvernemental');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IL', 'Israël');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IQ', 'Iraq');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IR', 'Iran');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'IT', 'Italie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'JM', 'Jamaïque');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'JO', 'Jordanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'JP', 'Japon');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KE', 'Kenya');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KG', 'Kirghizistan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KH', 'Cambodge');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KI', 'Kiribati');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KM', 'Comores');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KN', 'SaintKittsetNevis');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KP', 'Corée du Nord');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KR', 'Corée du Sud');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KW', 'Koweït');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KY', 'Caïmanes, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'KZ', 'Kazakhstan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LA', 'Lao');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LB', 'Liban');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LC', 'SainteLucie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LI', 'Liechtenstein');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LK', 'Sri Lanka');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LR', 'Libéria');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LS', 'Lesotho');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LT', 'Lituanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LU', 'Luxembourg');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LV', 'Lettonie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'LY', 'Lybie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MA', 'Maroc');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MC', 'Monaco');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MD', 'Moldavie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MG', 'Madagascar');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MH', 'Marshall, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MK', 'Macédoine');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ML', 'Mali');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MM', 'Birmanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MM', 'Myanmar');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MN', 'Mongolie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MO', 'Macao');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MP', 'Mariannes du Nord, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MQ', 'Martinique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MR', 'Mauritanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MS', 'Montserrat');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MT', 'Malte');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MU', 'Maurice');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MV', 'Maldives');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MW', 'Malawi');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MX', 'Mexique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MY', 'Malaisie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'MZ', 'Mozambique');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NA', 'Namibie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NC', 'NouvelleCalédonie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NE', 'Niger');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NF', 'Norfolk');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NI', 'Nicaragua');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NO', 'Norvège');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NP', 'Népal');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NR', 'Nauru');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NU', 'Nioué');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'NZ', 'NouvelleZélande');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'OM', 'Oman');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PE', 'Pérou');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PF', 'Polynésie française');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PG', 'Papouasie NouvelleGuinée');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PH', 'Philippines');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PK', 'Pakistan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PM', 'SaintPierreetMiquelon');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PN', 'Pitcairn');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PR', 'Porto Rico');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PS', 'Palestine');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PT', 'Portugal');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PW', 'Palau');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'PY', 'Paraguay');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'QA', 'Qatar');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'RO', 'Roumanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'RU', 'Russie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'RW', 'Rwanda');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SA', 'Arabie saoudite');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SB', 'Salomon, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SC', 'Seychelles');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SD', 'Soudan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SE', 'Suède');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SG', 'Singapour');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SH', 'SainteHélène');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SI', 'Slovénie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SJ', 'Svalbard et Ã®le Jan Mayen');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SK', 'Slovaquie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SL', 'Sierra Leone');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SM', 'SaintMarin');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SN', 'Sénégal');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SO', 'Somalie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SR', 'Suriname');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ST', 'Sao ToméetPrincipe');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SU', 'URSS');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SV', 'Salvador');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SY', 'Syrie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'SZ', 'Swaziland');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TC', 'Turks et Caïques, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TD', 'Tchad');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TG', 'Togo');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TH', 'Thaïlande');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TJ', 'Tadjikistan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TK', 'Tokélau');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TL', 'Timor oriental');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TM', 'Turkménistan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TN', 'Tunisie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TO', 'Tonga');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TR', 'Turquie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TT', 'TrinitéetTobago');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TV', 'Tuvalu');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TW', 'taïwan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TZ', 'Tanzanie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'UA', 'Ukraine');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'UG', 'Ouganda');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'UM', 'îles mineures Ã©loignées des Etatsunis');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'UY', 'Uruguay');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'UZ', 'Ouzbékistan');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VA', 'Vatican');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VC', 'SaintVincentetles Grenadines');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VE', 'Venezuela');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VG', 'Iles Vierges britanniques');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VI', 'Iles Vierges (Etatsunis)');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VN', 'Viet Nam');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'VU', 'Vanuatu');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'WF', 'Wallis et Futuna, Ã®les');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'WS', 'Samoa');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'XC', 'Tchécoslovaquie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'XD', 'Allemagne avant 1945');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'XE', 'Europe');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'XK', 'Corée avant 1948');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'YD', 'Yémen');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'YU', 'Yougoslavie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ZA', 'Afrique du Sud');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ZM', 'Zambie');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ZW', 'Zimbabwe');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'ZZ', 'multiple');
+INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'COUNTRY', 'TA', 'Italie');
 INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'qualif', '370', 'Réalisateur');
 INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'qualif', '673', ' Directeur');
 INSERT INTO `authorised_values` ( `category`, `authorised_value`, `lib`) VALUES ( 'qualif', '605', 'Présentateur');
index 9f7a8e5..a11417a 100644 (file)
         new YAHOO.widget.Button("editcontracts");
 
         var manageorders = [
-            { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->&op=add_form"},
-            { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=<!--TMPL_VAR Name="id"-->"},
-            { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->"},
+            <!-- TMPL_IF name="CAN_user_acquisition_order_manage" -->
+                { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->&op=add_form"},
+                { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=<!--TMPL_VAR Name="id"-->"},
+                { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->"},
+            <!-- /TMPL_IF -->
             { text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?supplierid=<!--TMPL_VAR Name="id"-->" },
             <!-- TMPL_IF name="basketno" -->
                 { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR NAME="id" -->&basketno=<!--TMPL_VAR name="basketno" -->&owner=1"}
     </script>
     <ul id="toolbar-list" class="toolbar">
         <!-- TMPL_IF NAME="id" -->
-            <li><a id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->&amp;op=enter">Edit</a></li>
-            <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=<!-- TMPL_VAR name="id" -->">New Contract</a></li>
-            <li><a id="editcontracts" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR name="id" -->">Contracts</a></li>
-            <!-- TMPL_UNLESS NAME="basketcount" -->
-                <li><a id="newbasket" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=<!-- TMPL_VAR name="id" -->&op=add_form">New Basket</a></li>
-            <!-- /TMPL_UNLESS -->
+            <!-- TMPL_IF name="CAN_user_acquisition_vendors_manage" -->
+                <li><a id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->&amp;op=enter">Edit</a></li>
+                <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=<!-- TMPL_VAR name="id" -->">New Contract</a></li>
+                <li><a id="editcontracts" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR name="id" -->">Contracts</a></li>
+                <!-- TMPL_UNLESS NAME="basketcount" -->
+                    <li><a id="newbasket" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=<!-- TMPL_VAR name="id" -->&op=add_form">New Basket</a></li>
+                <!-- /TMPL_UNLESS -->
+            <!-- /TMPL_IF -->
         <!-- TMPL_ELSE -->
             <li><a id="newbudget" href="/cgi-bin/koha/acqui/supplier.pl?op=enter">New Vendor</a></li>
         <!-- /TMPL_IF -->
index 02b0a06..6a3044b 100644 (file)
                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a> by <!-- TMPL_VAR NAME="author" -->
                                     <!-- TMPL_IF name="notes" --> <!--TMPL_VAR name="notes" --><!-- /TMPL_IF -->
                                     <!-- TMPL_IF name="isbn"--> - <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
+                                    <!-- TMPL_IF name="issn"--> - <!-- TMPL_VAR name="issn" --><!-- /TMPL_IF -->
                                     <!-- TMPL_IF name="publishercode" -->, <!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF -->
                                     <!-- TMPL_IF name="publicationyear" -->, <!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
                             </p>
index 50b3ea7..6d64251 100644 (file)
         <!-- TMPL_ELSE -->
             <tr>
         <!-- /TMPL_UNLESS -->
-                <td>   <!-- TMPL_IF name="active" -->
+                <td><!-- TMPL_IF name="CAN_user_acquisition_order_manage" -->
+                    <!-- TMPL_IF name="active" -->
                         <a href="basketheader.pl?booksellerid=<!-- TMPL_VAR name="supplierid" -->&amp;op=add_form">New basket</a>
                     <!-- TMPL_ELSE -->
                         Inactive
                     <!-- /TMPL_IF -->
+                    <!-- /TMPL_IF -->
                 </td>
                 <td>   <a href="parcels.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->">Receive shipment</a>
                 </td>
index 52e9dc7..0eacf19 100644 (file)
@@ -171,7 +171,9 @@ $(document).ready(function()
 <fieldset class="rows">
         <legend>
             Catalog details
-            <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!--TMPL_VAR NAME= "biblionumber"-->"> Edit record</a></span>
+            <!-- TMPL_IF name="biblionumber" -->
+                <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!--TMPL_VAR NAME= "biblionumber"-->"> Edit record</a></span>
+            <!-- /TMPL_IF -->
         </legend>
         <!-- TMPL_UNLESS name="existing" -->
         <input type="hidden" name="existing" value="no" />
index 0e4e0a0..91951b9 100644 (file)
@@ -19,7 +19,7 @@ $(document).ready(function() {
 <body>
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
-
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Keyword to MARC Mapping</div>
 <div id="doc3" class="yui-t2">
        <div id="yui-main">
                <div class="yui-b">
index bb7fab2..671d3c9 100644 (file)
                     <input type="text" name="defaultvalue" id="defaultvalue<!-- TMPL_VAR NAME="row" -->" value="<!-- TMPL_VAR NAME="defaultvalue" -->" /></li>
                 <li><label for="hidden<!-- TMPL_VAR NAME="row" -->">hidden</label><input type="text" id="hidden<!-- TMPL_VAR NAME="row" -->" name="hidden" value="<!-- TMPL_VAR name="hidden" -->" size="2" /> (see online help)</li>
                 <li><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL:</label><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is a URL and can be clicked)</li>
-                <li><label for="link<!-- TMPL_VAR NAME="row" -->">Link:</label><input type="text" id="link<!-- TMPL_VAR NAME="row" -->" name="link" value="<!-- TMPL_VAR NAME="link" -->" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>Warning: This value should not change after data has been added to your catalog</em></span></li>
+                <li><label for="link<!-- TMPL_VAR NAME="row" -->">Link:</label><input type="text" id="link<!-- TMPL_VAR NAME="row" -->" name="link" value="<!-- TMPL_VAR NAME="link" -->" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li>
                 <li><label for="kohafield<!-- TMPL_VAR NAME="row" -->">Koha link:</label><!-- TMPL_VAR NAME="kohafield" --></li>
                        </ol>
        </fieldset>
index e587967..1e9fb34 100644 (file)
@@ -160,7 +160,6 @@ $(document).ready(function() {
         <!--/TMPL_IF -->
     </p>
 </form>
-<p>NOTE : if you change the link between a MARC subfield and a non-MARC field, ask your administrator to run misc/batchRebuildBiblioTables.pl script.</p>
 <span id="pagertable_marctagstructure" class="pager">
        <form class="formpager">&nbsp;<strong>page(s)</strong>&nbsp;:
                <img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/>
index 762b157..c982bc5 100644 (file)
@@ -1,5 +1,6 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
     <title>Print Notices for <!-- TMPL_VAR NAME="today" --></title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <style type="text/css">
         <!-- 
         .message { page-break-after: always }
index 16c2c5b..4610720 100644 (file)
                 <!-- TMPL_IF NAME="card1" --><li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=<!-- TMPL_VAR NAME="borrower1" -->"><!-- TMPL_VAR NAME="card1" --></a>&nbsp;</li><!-- /TMPL_IF -->
                <!-- TMPL_IF NAME="card2" --><li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=<!-- TMPL_VAR NAME="borrower2" -->"><!-- TMPL_VAR NAME="card2" --></a>&nbsp;</li><!-- /TMPL_IF -->
                 <li><span class="label">Paid for?:</span> <!-- TMPL_VAR NAME="paidfor" -->&nbsp;</li>
-            <li><span class="label">Serial enumeration/chronology:</span> <!-- TMPL_VAR NAME="enumchron" -->&nbsp;</li>
+            <li><span class="label">Serial enumeration:</span> <!-- TMPL_VAR NAME="enumchron" -->&nbsp;</li>
             <li><span class="label">Public Note:</span>
                 <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->
               <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
index f0b11f8..d4b292f 100644 (file)
@@ -22,6 +22,7 @@ function closemenu(){
     $(".linktools").hide();
     $("tr").removeClass("selected");
 }
+
 $(document).ready(function(){
     $("#CheckAll").click(function(){
         $(".checkboxed").checkCheckboxes();
@@ -52,6 +53,13 @@ $(document).ready(function(){
             var row = $(this).parent();
             row.addClass("selected");
         });
+    $("form[name='f']").submit(function(){
+        if ($('input[type=checkbox]').filter(':checked').length == 0) {
+            alert(_("Please choose at least one Z39.50 target"));
+            return false;
+        } else
+            return true;
+    });
 });
 
 //]]>
@@ -153,9 +161,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
     <!-- /TMPL_LOOP --></tbody>
 </table>
     <!-- TMPL_ELSE -->
-        <!-- TMPL_LOOP name="errconn" -->
-            Connection failed to <!-- TMPL_VAR NAME="server" -->
-        <!-- /TMPL_LOOP -->
+        <!-- TMPL_IF NAME="emptyserverlist" -->
+            You didn't select any Z39.50 target.
+        <!-- TMPL_ELSE -->
+            <!-- TMPL_LOOP name="errconn" -->
+                Connection failed to <!-- TMPL_VAR NAME="server" -->
+            <!-- /TMPL_LOOP -->
+        <!-- /TMPL_IF -->
        <p>Nothing found. <a href="/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Try another search</a>.</p>
     <!-- /TMPL_IF -->
 
index 46ba414..82d1c1e 100644 (file)
@@ -99,7 +99,7 @@ To edit the subfields associated with the tag, click 'Subfields' to the right of
        <li>on a field that is a link (4xx) to reach another bib record. For example, put 011a in 464$x, will find the serials that are with this ISSN.</li>
 </ul>
 </li>
-       <li style="color: #990000;">Important: This value should not change after data has been added to your catalog</li>
+       <li style="color: #990000;">NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</li>
 </ul>
 </li>
 </ul>
index eb8d4fb..705fd6a 100644 (file)
@@ -617,6 +617,9 @@ Sub report:<select name="subreport">
 <h2>Your report has been saved</h2>
 <p>The report you have created has now been saved. You can now</p>
 <ul>
+    <!-- TMPL_IF NAME="id"  -->
+    <li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&amp;phase=Run%20this%20report">Run this report</a></li>
+    <!-- /TMPL_IF -->
     <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports Page</a></li>
     <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
     <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Guided Reports</a></li>
index 4553f1a..4863f9d 100644 (file)
@@ -11,9 +11,6 @@
 //<![CDATA[
 $(document).ready(function(){
        $("#processfile").hide();
-       $("#uploadfile").submit(function(){
-               alert("Hey!");
-       });
 });
 function CheckForm(f) {
     if ($("#fileToUpload").value == '') {
index f04a51c..aa295c9 100644 (file)
@@ -9,7 +9,7 @@ a, a:visited {
        color : #006699;
 }
 
-a:hover,input.editshelf:hover,a.editshelf:hover,input.deleteshelf:hover {
+a:hover,#toolbar input.editshelf:hover,input.editshelf:hover,a.editshelf:hover,input.deleteshelf:hover {
        color : #990033;
 }
 
index e8d18f8..0ee0e66 100644 (file)
@@ -211,7 +211,7 @@ $(function() {
 
 <a class="print tag_hides" href="opac-shelves.pl" onclick="print(); return false;">Print List</a>
 
-                <!-- TMPL_IF NAME="manageshelf" --> | <a class="editshelf tag_hides" href="/cgi-bin/koha/opac-shelves.pl?shelfnumber=<!-- TMPL_VAR NAME="shelfnumber" -->&amp;op=modif">Edit List</a>
+                <!-- TMPL_IF NAME="manageshelf" --> | <form method="get" action="opac-shelves.pl" class="tag_hides"><input type="hidden" name="op" value="modif" /><!-- TMPL_IF NAME="showprivateshelves" --><input type="hidden" name="display" value="privateshelves" /><!-- /TMPL_IF --> <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /> <input type="submit" class="editshelf tag_hides" value="Edit List" /></form>
                       <form method="post" action="opac-shelves.pl" class="tag_hides">
                         <input type="hidden" value="1" name="shelves"/>
                     <!-- TMPL_IF NAME="showprivateshelves" -->
@@ -477,7 +477,7 @@ $(function() {
                       </table>
                       <div class="pages"><!-- TMPL_VAR name="pagination_bar"--></div>
                     <!-- TMPL_ELSE -->
-                         No Private Lists.
+                         <p>No private lists.</p>
                     <!-- /TMPL_IF --><!-- /shelveslooppriv -->
                   <!-- /TMPL_IF --><!-- /showprivateshelves -->
                   <!-- TMPL_ELSE --><!-- /loggedinusername -->
@@ -541,7 +541,7 @@ $(function() {
                       </table>
                   <!-- TMPL_IF NAME="pagination_bar" --><div class="pages"><!-- TMPL_VAR name="pagination_bar"--></div><!-- /TMPL_IF -->
                   <!-- TMPL_ELSE --><!-- /shelvesloop -->
-                    <!-- TMPL_IF NAME="showpublicshelves" -->No Public Lists.<!-- /TMPL_IF -->
+                    <!-- TMPL_IF NAME="showpublicshelves" --><p>No public lists.</p><!-- /TMPL_IF -->
                   <!-- /TMPL_IF --><!-- /shelvesloop -->
                   
                     </div><!-- /publicshelves -->
index bdc2109..9b92009 100755 (executable)
@@ -92,8 +92,8 @@ if ( $op eq "do_search" ) {
     ( $error, $marcresults, $total_hits ) =
       SimpleSearch( $ccl_query, $offset, $resultsperpage );
 
-    if (scalar($marcresults) > 0) {
-        $show_results = scalar @$marcresults;
+    if (!defined $error && @{$marcresults} ) {
+        $show_results = @{$marcresults};
     }
     else {
         $debug and warn "ERROR label-item-search: no results from SimpleSearch";
index 52b39b8..c665b6e 100755 (executable)
@@ -619,6 +619,10 @@ if ($nok) {
 if (!defined($data{'dateenrolled'}) or $data{'dateenrolled'} eq ''){
   $data{'dateenrolled'}=C4::Dates->today('iso');
 }
+if ( $op eq 'duplicate' ) {
+    $data{'dateenrolled'} = C4::Dates->today('iso');
+    $data{'dateexpiry'} = GetExpiryDate( $data{'categorycode'}, $data{'dateenrolled'} );
+}
 if (C4::Context->preference('uppercasesurnames')) {
        $data{'surname'}    =uc($data{'surname'}    );
        $data{'contactname'}=uc($data{'contactname'});
diff --git a/misc/cronjobs/CONFIGURE.gmail b/misc/cronjobs/CONFIGURE.gmail
new file mode 100644 (file)
index 0000000..221c583
--- /dev/null
@@ -0,0 +1,65 @@
+=============================
+Installation Guide for Configuring a Koha Server to Use a Gmail Account as its SMTP Server
+=============================
+
+Copyright (C) 2010 Foundations Bible College (http://www.foundations.edu)
+
+Author: Chris Nighswonger (cnighswonger AT foundations DOT edu
+
+Feedback/bug reports: Koha Developer's List:
+http://lists.koha.org/mailman/listinfo/koha-devel
+
+This document last modified: 13 February 2010
+
+Configuration Instructions
+=============================
+
+To use your gmail account as an SMTP server you will need to execute the following from a shell prompt.
+
+(These steps are taken from http://jonspriggs.posterous.com/use-gmails-smtp-gateway-using-the-command-lin)
+
+sudo apt-get install openssl xinetd
+
+sudo tee /usr/bin/gmail-smtp <<EOF >/dev/null
+#!/bin/sh
+# Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guide
+/usr/bin/openssl s_client -connect smtp.gmail.com:465 -quiet 2>/dev/null
+EOF
+sudo chmod +x /usr/bin/gmail-smtp
+
+sudo tee /etc/xinetd.d/gmail-smtp <<EOF >/dev/null
+# default: on
+# description: Gmail SMTP wrapper for clients without SSL support
+# Thanks to http://ubuntuforums.org/showthread.php?t=918335 for this install guide
+service gmail-smtp
+{
+    disable         = no
+    bind            = localhost
+    port            = 10025
+    socket_type     = stream
+    protocol        = tcp
+    wait            = no
+    user            = root
+    server          = /usr/bin/gmail-smtp
+    type            = unlisted
+}
+EOF
+sudo /etc/init.d/xinetd reload
+
+Edit Mail/Sendmail.pm and set the port to 10025. (Note: This file will be located where ever your Perl libraries are.)
+
+Script Setup Instructions
+=============================
+
+After successfully executing the above steps, you will need to run the process_message_queue.pl script with the
+following syntax:
+
+perl process_message_queue.pl -u librarian@foo.tld -p supersecret -m LOGIN
+
+This, of course, assumes that you have all other scripts in place and functional to generate notices.
+
+Misc Helpful Notes
+=============================
+
+NOTE: In order to debug problems, you can set the debug level in Mail/Sendmail.pm to 11 which will give plenty of
+commentary to STDOUT.
index 4ff29a4..c79fea8 100755 (executable)
@@ -28,12 +28,19 @@ BEGIN {
 use C4::Letters;
 use Getopt::Long;
 
+my $username = undef;
+my $password = undef;
+my $method = 'LOGIN';
 my $help = 0;
 my $verbose = 0;
 
-GetOptions( 'h'    => \$help,
-            'v'    => \$verbose,
-       );
+GetOptions(
+    'u|username:s'      => \$username,
+    'p|password:s'      => \$password,
+    'm|method:s'        => \$method,
+    'h|help|?'          => \$help,
+    'v|verbose'         => \$verbose,
+);
 my $usage = << 'ENDUSAGE';
 
 This script processes the message queue in the message_queue database
@@ -43,12 +50,15 @@ you run this regularly from cron, especially if you are using the
 advance_notices.pl script.
 
 This script has the following parameters :
-    -h help: this message
-    -v verbose
+    -u --username: username of mail account
+    -p --password: password of mail account
+    -m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.)
+    -h --help: this message
+    -v --verbose: provides verbose output to STDOUT
 
 ENDUSAGE
 
 die $usage if $help;
 
-C4::Letters::SendQueuedMessages( { verbose => $verbose } );
+C4::Letters::SendQueuedMessages( { verbose => $verbose, username => $username, password => $password, method => $method } );
 
index 3bb9ed8..1d31382 100755 (executable)
@@ -222,15 +222,15 @@ RECORD: while (  ) {
        my ($error, $results,$totalhits)=C4::Search::SimpleSearch( $query, 0, 3, [$server] );
        die "unable to search the database for duplicates : $error" if (defined $error);
        #warn "$query $server : $totalhits";
-       if ($results && scalar(@$results)==1){
+       if ( @{$results} == 1 ){
            my $marcrecord = MARC::File::USMARC::decode($results->[0]);
                   $id=GetRecordId($marcrecord,$tagid,$subfieldid);
        } 
-       elsif  ($results && scalar(@$results)>1){
-       $debug && warn "more than one match for $query";
+       elsif  ( @{$results} > 1){
+           $debug && warn "more than one match for $query";
        } 
        else {
-       $debug && warn "nomatch for $query";
+           $debug && warn "nomatch for $query";
        }
     }
        my $originalid;
index 070a109..fbeee78 100755 (executable)
@@ -62,6 +62,10 @@ while (my $data=$rqselect->fetchrow_hashref){
     $query= "an=".$data->{'authid'};
     # search for biblios mapped
     my ($err,$res,$used) = C4::Search::SimpleSearch($query,0,10);
+    if (defined $err) {
+        warn "error: $err on search $query\n";
+        next;
+    }
     print ".";
     print "$counter\n" unless $counter++ % 100;
     # if found, delete, otherwise, just count
index a53712e..9745134 100755 (executable)
@@ -133,6 +133,7 @@ elsif ( $phase eq 'Update SQL'){
         update_sql( $id, $sql, $reportname, $notes );
         $template->param(
             'save_successful'       => 1,
+            'id'                    => $id,
         );
     }
     
@@ -367,9 +368,10 @@ elsif ( $phase eq 'Save Report' ) {
         );
     }
     else {
-        save_report( $borrowernumber, $sql, $name, $type, $notes );
+        my $id = save_report( $borrowernumber, $sql, $name, $type, $notes );
         $template->param(
             'save_successful'       => 1,
+            'id'                    => $id,
         );
     }
 }
@@ -484,7 +486,7 @@ elsif ($phase eq 'Run this report'){
             $sql =~ s/<<$split[$i*2+1]>>/$quoted/;
         }
         my ($sth, $errors) = execute_query($sql, $offset, $limit);
-        my $total = select_2_select_count_value($sql) || 0;
+        my $total = nb_rows($sql) || 0;
         unless ($sth) {
             die "execute_query failed to return sth for report $report: $sql";
         } else {
index 1282e38..47f7538 100644 (file)
@@ -590,8 +590,8 @@ sub add_biblios {
 
     $self->reindex_marc();
     my $query = 'Finn Test';
-    my ( $error, $results ) = SimpleSearch( $query );
-    if ( $param{'count'} <= scalar( @$results ) ) {
+    my ( $error, $results, undef ) = SimpleSearch( $query );
+    if ( !defined $error && $param{'count'} <=  @{$results} ) {
         pass( "found all $param{'count'} titles" );
     } else {
         fail( "we never found all $param{'count'} titles" );