Merge branch 'translation' of git://git.workbuffer.org/git/koha into master
authorGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 20:26:37 +0000 (16:26 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 20:26:53 +0000 (16:26 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
200 files changed:
C4/AuthoritiesMarc.pm
C4/Creators/Batch.pm
C4/Creators/Layout.pm
C4/Creators/Profile.pm
C4/Creators/Template.pm
C4/Installer/PerlDependencies.pm
C4/Koha.pm
C4/Labels/Label.pm
C4/Letters.pm
C4/Members.pm
C4/Search.pm
C4/Serials.pm
C4/VirtualShelves.pm
C4/VirtualShelves/Page.pm
INSTALL.debian
INSTALL.ubuntu
INSTALL.ubuntu.lucid [new file with mode: 0644]
acqui/addorder.pl
acqui/neworderempty.pl
acqui/z3950_search.pl
admin/preferences.pl
admin/systempreferences.pl
catalogue/detail.pl
catalogue/labeledMARCdetail.pl
cataloguing/additem.pl
cataloguing/value_builder/labs_theses.pl
cataloguing/value_builder/unimarc_field_4XX.pl
cataloguing/z3950_search.pl
debian/build-git-snapshot
debian/koha-common.README.Debian
debian/koha-common.cron.d
debian/koha-common.cron.daily [new file with mode: 0644]
debian/koha-common.install
debian/scripts/koha-create
debian/scripts/koha-email-disable [new file with mode: 0755]
debian/scripts/koha-email-enable [new file with mode: 0755]
debian/scripts/koha-enable [changed mode: 0644->0755]
debian/scripts/koha-foreach
debian/scripts/koha-list
debian/scripts/koha-rebuild-zebra
docs/history.txt
etc/zebradb/etc/word-phrase-utf.chr
install_misc/apt-get-debian-lenny.sh
install_misc/ubuntu-pkg-check.sh [new file with mode: 0755]
install_misc/ubuntu.packages
installer/data/mysql/de-DE/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/z3950servers.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-CD-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-Tape-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BookOnCD.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BookOnTape.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Download-Audio-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DownloadableAudio.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference.png
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS-32px.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS.png
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-CD-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-Tape-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BookOnCD.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BookOnTape.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Download-Audio-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DownloadableAudio.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference.png
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS-32px.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS.png
labels/label-create-pdf.pl
labels/label-edit-layout.pl
labels/label-edit-profile.pl
labels/label-edit-template.pl
members/member.pl
members/memberentry.pl
misc/cronjobs/cleanup_database.pl
misc/cronjobs/overdue_notices.pl
misc/migration_tools/rebuild_zebra.pl
misc/translator/tmpl_process3.pl
opac/opac-addbybiblionumber.pl
serials/subscription-detail.pl
t/Boolean.t
t/Koha.t
t/db_dependent/Auth.t [deleted file]
t/db_dependent/Auth_with_ldap.t [deleted file]
t/db_dependent/Budgets.t
t/db_dependent/Context.t
t/db_dependent/Labels/t_Batch.t
t/db_dependent/Labels/t_Layout.t
t/db_dependent/Labels/t_Profile.t
t/db_dependent/Labels/t_Template.t
t/db_dependent/Patroncards/t_Patroncards.t [deleted file]
t/db_dependent/SQLHelper.t
t/db_dependent/Search.t
t/db_dependent/VirtualShelves.t
t/db_dependent/needs_user_input/Auth.t [new file with mode: 0755]
t/db_dependent/needs_user_input/Auth_with_ldap.t [new file with mode: 0755]
tags/review.pl
virtualshelves/addbybiblionumber.pl

index f6c9d35..b4a0d78 100644 (file)
@@ -1327,9 +1327,17 @@ sub merge {
                 my $tag=$field->tag();          
                 if ($auth_number==$mergefrom) {
                 my $field_to=MARC::Field->new(($tag_to?$tag_to:$tag),$field->indicator(1),$field->indicator(2),"9"=>$mergeto);
+               my $exclude='9';
                 foreach my $subfield (@record_to) {
                     $field_to->add_subfields($subfield->[0] =>$subfield->[1]);
+                   $exclude.= $subfield->[0];
                 }
+               $exclude='['.$exclude.']';
+#              add subfields in $field not included in @record_to
+               my @restore= grep {$_->[0]!~/$exclude/} $field->subfields();
+                foreach my $subfield (@restore) {
+                   $field_to->add_subfields($subfield->[0] =>$subfield->[1]);
+               }
                 $marcrecord->delete_field($field);
                 $marcrecord->insert_grouped_field($field_to);            
                 $update=1;
index cff7419..f54e3da 100644 (file)
@@ -149,6 +149,7 @@ sub retrieve {
     };
     while (my $record = $sth->fetchrow_hashref) {
         $self->{'branch_code'} = $record->{'branch_code'};
+        $self->{'creator'} = $record->{'creator'};
         push (@{$self->{'items'}}, {$number_type => $record->{$number_type}, label_id => $record->{'label_id'}});
         $record_flag = 1;       # true if one or more rows were retrieved
     }
index a38f347..3281e15 100644 (file)
@@ -40,6 +40,8 @@ sub _check_params {
         'format_string',
         'layout_xml',           # FIXME: all layouts should be stored in xml format to greatly simplify handling -chris_n
         'creator',
+        'units',
+        'start_label',
     );
     if (scalar(@_) >1) {
         my %given_params = @_;
@@ -68,6 +70,9 @@ sub new {
     my $type = ref($invocant) || $invocant;
     if (grep {$_ eq 'Labels'} @_) {
        $self = {
+            layout_xml      =>      '',
+            units           =>      'POINT',
+            start_label     =>      1,
             barcode_type    =>      'CODE39',
             printing_type   =>      'BAR',
             layout_name     =>      'DEFAULT',
@@ -95,8 +100,6 @@ sub retrieve {
     my %opts = @_;
     my $type = ref($invocant) || $invocant;
     my $query = "SELECT * FROM creator_layouts WHERE layout_id = ? AND creator = ?";
-    #warn "QUERY: $query\n";    #XXX Remove
-    #warn "PARAMS: layout_id=" . $opts{'layout_id'} . " creator=" . $opts{'creator'} . "\n";    #XXX Remove
     my $sth = C4::Context->dbh->prepare($query);
     $sth->execute($opts{'layout_id'}, $opts{'creator'});
     if ($sth->err) {
@@ -221,7 +224,7 @@ sub get_text_wrap_cols {
     my $string = '';
     my $strwidth = 0;
     my $col_count = 0;
-    my $textlimit = $params{'label_width'} - ( 3 * $params{'left_text_margin'});
+    my $textlimit = $params{'label_width'} - (( 3 * $params{'left_text_margin'} ) || 13.5 );
 
     while ($strwidth < $textlimit) {
         $string .= '0';
index aab0e27..6b6e192 100644 (file)
@@ -122,6 +122,7 @@ sub delete {
         warn sprintf('Database returned the following error on attempted DELETE: %s', $sth->errstr);
         return -1;
     }
+    return 0;
 }
 
 sub save {
index 0bbeadf..8a7564c 100644 (file)
@@ -154,7 +154,7 @@ sub delete {
         warn sprintf('%s : Cannot delete template as the creator type is invalid or non-existant.', $call_type) if !$query_params[1];
         return -1;
     }
-    my $query = "DELETE FROM " . $opts{'table_name'} . " WHERE template_id = ? AND creator = ?";
+    my $query = "DELETE FROM creator_templates WHERE template_id = ? AND creator = ?";
     my $sth = C4::Context->dbh->prepare($query);
     $sth->execute(@query_params);
     $self->{'template_stat'} = 0;
index 19a84a0..3ac49dc 100644 (file)
@@ -464,6 +464,11 @@ our $PERL_DEPS = {
         'required' => '0',
         'min_ver'  => '0.97',
     },
+    'Business::ISBN' => {
+        'usage'    => 'Core',
+        'required' => '0',
+        'min_ver'  => '2.05',
+    },
 };
 
 1;
index cb93034..ab9131a 100644 (file)
@@ -24,6 +24,7 @@ use C4::Context;
 use C4::Output;
 use URI::Split qw(uri_split);
 use Memoize;
+use Business::ISBN;
 
 use vars qw($VERSION @ISA @EXPORT $DEBUG);
 
@@ -597,6 +598,7 @@ sub _getImagesFromDirectory {
     if ( opendir ( my $dh, $directoryname ) ) {
         my @images = grep { /\.(gif|png)$/i } readdir( $dh );
         closedir $dh;
+        @images = sort(@images);
         return @images;
     } else {
         warn "unable to opendir $directoryname: $!";
@@ -1235,10 +1237,14 @@ sub GetNormalizedUPC {
 }
 
 # Normalizes and returns the first valid ISBN found in the record
+# ISBN13 are converted into ISBN10. This is required to get Amazon cover book.
 sub GetNormalizedISBN {
     my ($isbn,$record,$marcflavour) = @_;
     my @fields;
     if ($isbn) {
+        # Koha attempts to store multiple ISBNs in biblioitems.isbn, separated by " | "
+        # anything after " | " should be removed, along with the delimiter
+        $isbn =~ s/(.*)( \| )(.*)/$1/;
         return _isbn_cleanup($isbn);
     }
     return undef unless $record;
@@ -1321,19 +1327,12 @@ sub _normalize_match_point {
 }
 
 sub _isbn_cleanup ($) {
-    my $normalized_isbn = shift;
-    $normalized_isbn =~ s/-//g;
-    $normalized_isbn =~/([0-9x]{1,})/i;
-    $normalized_isbn = $1;
-    if (
-        $normalized_isbn =~ /\b(\d{13})\b/ or
-        $normalized_isbn =~ /\b(\d{12})\b/i or
-        $normalized_isbn =~ /\b(\d{10})\b/ or
-        $normalized_isbn =~ /\b(\d{9}X)\b/i
-    ) { 
-        return $1;
-    }
-    return undef;
+    my $isbn = Business::ISBN->new( shift );
+    return undef unless $isbn;
+    $isbn = $isbn->as_isbn10 if $isbn->type eq 'ISBN13';
+    $isbn = $isbn->as_string;
+    $isbn =~ s/-//g;
+    return $isbn;
 }
 
 1;
index ef5fa15..6437537 100644 (file)
@@ -470,6 +470,10 @@ sub draw_label_text {
     return \@label_text;
 }
 
+sub draw_guide_box {
+    return $_[0]->{'guidebox'};
+}
+
 sub barcode {
     my $self = shift;
     my %params = @_;
index 885ed5f..62b339a 100644 (file)
@@ -275,7 +275,7 @@ sub SendAlerts {
 
             # and parse borrower ...
             my $innerletter = $letter;
-            my $borinfo = GetMember( 'borrowernumber' => $_->{'borrowernumber'});
+            my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'});
             parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} );
 
             # ... then send mail
index cddbf41..4c1d37c 100644 (file)
@@ -484,7 +484,7 @@ sub patronflags {
         $flags{'NOTES'}      = \%flaginfo;
     }
     my ( $odues, $itemsoverdue ) = checkoverdues($patroninformation->{'borrowernumber'});
-    if ( $odues > 0 ) {
+    if ( $odues && $odues > 0 ) {
         my %flaginfo;
         $flaginfo{'message'}  = "Yes";
         $flaginfo{'itemlist'} = $itemsoverdue;
@@ -937,22 +937,16 @@ with the modified information
 
 #'
 sub UpdateGuarantees {
-    my (%data) = @_;
+    my %data = shift;
     my $dbh = C4::Context->dbh;
     my ( $count, $guarantees ) = GetGuarantees( $data{'borrowernumber'} );
-    for ( my $i = 0 ; $i < $count ; $i++ ) {
-
-        # FIXME
-        # It looks like the $i is only being returned to handle walking through
-        # the array, which is probably better done as a foreach loop.
-        #
+    foreach my $guarantee (@$guarantees){
         my $guaquery = qq|UPDATE borrowers 
-              SET address='$data{'address'}',fax='$data{'fax'}',
-                  B_city='$data{'B_city'}',mobile='$data{'mobile'}',city='$data{'city'}',phone='$data{'phone'}'
-              WHERE borrowernumber='$guarantees->[$i]->{'borrowernumber'}'
+              SET address=?,fax=?,B_city=?,mobile=?,city=?,phone=?
+              WHERE borrowernumber=?
         |;
-        my $sth3 = $dbh->prepare($guaquery);
-        $sth3->execute;
+        my $sth = $dbh->prepare($guaquery);
+        $sth->execute($data{'address'},$data{'fax'},$data{'B_city'},$data{'mobile'},$data{'city'},$data{'phone'},$guarantee->{'borrowernumber'});
     }
 }
 =head2 GetPendingIssues
index 8434886..d36459a 100644 (file)
@@ -1426,12 +1426,11 @@ sub searchResults {
     # loop through all of the records we've retrieved
     for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
         my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] );
-        if ($bibliotag<10){
-            $fw = GetFrameworkCode($marcrecord->field($bibliotag)->data);
-        }else{
-            $fw = GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf));
-        }
-
+        $fw = $scan
+             ? undef
+             : $bibliotag < 10
+               ? GetFrameworkCode($marcrecord->field($bibliotag)->data)
+               : GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf));
         my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw );
         $oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw);
         $oldbiblio->{result_number} = $i + 1;
@@ -2573,7 +2572,7 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|);
   #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
   ###NOTICE : This can be a problem. We should also look into other types and rejected forms.
-         my $authtypedata=C4::AuthoritiesMarc->GetAuthType($data->{authtypecode});
+         my $authtypedata=C4::AuthoritiesMarc::GetAuthType($data->{authtypecode});
          next unless $authtypedata;
          my $marcrecordauth=MARC::Record->new();
          my $authfield=MARC::Field->new($authtypedata->{auth_tag_to_report},'','',"a"=>"".$field->subfield('a'));
index 032246c..32e46be 100644 (file)
@@ -287,10 +287,10 @@ sub UpdateClaimdateIssues {
     my $dbh = C4::Context->dbh;
     $date = strftime( "%Y-%m-%d", localtime ) unless ($date);
     my $query = "
-        UPDATE serial SET claimdate=$date,status=7
-        WHERE  serialid in (" . join( ",", @$serialids ) . ")";
+        UPDATE serial SET claimdate = ?, status = 7
+        WHERE  serialid in (" . join( ",", map { '?' } @$serialids ) . ")";
     my $rq = $dbh->prepare($query);
-    $rq->execute;
+    $rq->execute($date, @$serialids);
     return $rq->rows;
 }
 
@@ -2082,15 +2082,15 @@ returns a count of items from serial matching the subscriptionid
 sub HasItems {
     my ($subscriptionid) = @_;
     my $dbh              = C4::Context->dbh;
-    my $query = qq|
+    my $query = q|
             SELECT COUNT(serialitems.itemnumber)
             FROM   serial 
                        LEFT JOIN serialitems USING(serialid)
-            WHERE  subscriptionid=? AND serialitems.serialid NOT NULL
+            WHERE  subscriptionid=? AND serialitems.serialid IS NOT NULL
         |;
     my $sth=$dbh->prepare($query);
     $sth->execute($subscriptionid);
-    my ($countitems)=$sth->fetchrow;
+    my ($countitems)=$sth->fetchrow_array();
     return $countitems;  
 }
 
index fa599bd..715cace 100644 (file)
@@ -40,7 +40,7 @@ BEGIN {
        @ISA    = qw(Exporter);
        @EXPORT = qw(
             &GetShelves &GetShelfContents &GetShelf
-            &AddToShelf &AddToShelfFromBiblio &AddShelf
+            &AddToShelf &AddShelf
             &ModShelf
             &ShelfPossibleAction
             &DelFromShelf &DelShelf
@@ -67,7 +67,7 @@ C4::VirtualShelves - Functions for manipulating Koha virtual virtualshelves
 
 This module provides functions for manipulating virtual virtualshelves,
 including creating and deleting virtualshelves, and adding and removing
-items to and from virtualshelves.
+bibs to and from virtualshelves.
 
 =head1 FUNCTIONS
 
@@ -237,7 +237,7 @@ sub GetShelf ($) {
 
 =head2 GetShelfContents
 
-  $itemlist = &GetShelfContents($shelfnumber);
+  $biblist = &GetShelfContents($shelfnumber);
 
 Looks up information about the contents of virtual virtualshelves number
 C<$shelfnumber>.  Sorted by a field in the biblio table.  copyrightdate 
@@ -331,8 +331,8 @@ sub AddShelf {
 
   &AddToShelf($biblionumber, $shelfnumber);
 
-Adds item number C<$biblionumber> to virtual virtualshelves number
-C<$shelfnumber>, unless that item is already on that shelf.
+Adds bib number C<$biblionumber> to virtual virtualshelves number
+C<$shelfnumber>, unless that bib is already on that shelf.
 
 =cut
 
@@ -364,42 +364,6 @@ sub AddToShelf {
        $sth->execute( $shelfnumber );
 }
 
-=head2 AddToShelfFromBiblio
-
-    &AddToShelfFromBiblio($biblionumber, $shelfnumber)
-
-this function allow to add a virtual into the shelf number $shelfnumber
-from biblionumber.
-
-=cut
-
-sub AddToShelfFromBiblio {
-    my ( $biblionumber, $shelfnumber ) = @_;
-    return unless $biblionumber;
-    my $query = qq(
-        SELECT *
-        FROM   virtualshelfcontents
-        WHERE  shelfnumber=? AND biblionumber=?
-    );
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $shelfnumber, $biblionumber );
-    unless ( $sth->rows ) {
-        my $query =qq(
-            INSERT INTO virtualshelfcontents
-                (shelfnumber, biblionumber, flags)
-            VALUES
-                (?, ?, 0)
-        );
-        $sth = $dbh->prepare($query);
-        $sth->execute( $shelfnumber, $biblionumber );
-               $query = qq(UPDATE virtualshelves
-                                       SET lastmodified = CURRENT_TIMESTAMP
-                                       WHERE shelfnumber = ?);
-               $sth = $dbh->prepare($query);
-               $sth->execute( $shelfnumber );
-    }
-}
-
 =head2 ModShelf
 
 ModShelf($shelfnumber, $hashref)
@@ -486,8 +450,8 @@ sub ShelfPossibleAction {
 
   &DelFromShelf( $biblionumber, $shelfnumber);
 
-Removes item number C<$biblionumber> from virtual virtualshelves number
-C<$shelfnumber>. If the item wasn't on that virtualshelves to begin with,
+Removes bib number C<$biblionumber> from virtual virtualshelves number
+C<$shelfnumber>. If the bib wasn't on that virtualshelves to begin with,
 nothing happens.
 
 =cut
index 73ca42d..9d15847 100644 (file)
@@ -89,7 +89,8 @@ sub shelfpage ($$$$$) {
         if ( $shelfnumber = $query->param('viewshelf') ) {
             if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ) ) {
                 if ( $barcode = $query->param('addbarcode') ) {
-                    if ( $item = GetItem( 0, $barcode ) ) {
+                    $item = GetItem( 0, $barcode );
+                    if (defined $item && $item->{'itemnumber'}){
                         $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'} );
                         AddToShelf( $biblio->{'biblionumber'}, $shelfnumber )
                           or push @paramsloop, { duplicatebiblio => $barcode };
index e90942b..cb38921 100644 (file)
@@ -69,8 +69,8 @@ sources
 
 Run the following command:
 
-    $ sudo cpan Algorithm::CheckDigits SMS::Send HTTP::OAI IPC::Cmd \\
-      Memoize::Memcached PDF::API2::Simple PDF::Table Storable Test::More \\
+    $ sudo cpan Algorithm::CheckDigits SMS::Send HTTP::OAI IPC::Cmd \
+      Memoize::Memcached PDF::API2::Simple PDF::Table Storable Test::More \
       Locale::Currency::Format
 
 Note: you may need to run CPAN initialization if you've not run cpan
index 771a842..9b654fa 100644 (file)
@@ -156,6 +156,8 @@ When the configuration is completed CPAN will install the Perl modules.
 
     /etc/perl/XML/SAX/ParserDetails.ini
 
+    You will need to move the entire section for '[XML::LibXML::SAX::Parser]' to the bottom of the ini file.
+
 2.4 Install DBD::mysql Perl module
 
 In order to handle UTF-8 correctly, Koha requires at least version 4.004
diff --git a/INSTALL.ubuntu.lucid b/INSTALL.ubuntu.lucid
new file mode 100644 (file)
index 0000000..7ad39da
--- /dev/null
@@ -0,0 +1,358 @@
+=============================
+Installation Guide for Installing Koha on Ubuntu Lucid Lynx (10.04 LTS) with MySQL 5
+=============================
+
+Copyright (C) 2007, 2008 LibLime (http://liblime.com)
+Some parts copyright 2010 Chris Nighswonger
+
+Original author: Joshua Ferraro
+Modified for Ubuntu by: Chris Nighswonger (cnighswonger AT foundations DOT edu)
+
+Feedback/bug reports: Koha Developer's List:
+http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
+
+This document last modified: 11 Sep 2010
+
+Installation Instructions
+=============================
+
+All commands can be performed as a system user with sudo privileges,
+as indicated or by running the command directly as root.
+
+1. Prepare System and Install Dependencies
+
+1.1 Install Ubuntu Lucid Lynx via CD
+
+See http://www.ubuntu.com/getubuntu/download
+
+1.2 Set up your locale
+
+Your locale should be set to UTF-8, as should Apache2 and MySQL 5.
+This step is VERY IMPORTANT for a UNICODE compliant system. Please
+read over the following document carefully:
+
+http://wiki.koha.org/doku.php?id=encodingscratchpad
+
+You can verify your system locale by typing the following command:
+
+    $ locale
+
+IMPORTANT:  You _MUST_ follow all the steps outlined there for
+            Apache2, MySQL 5, etc. BEFORE you install Koha.
+
+1.3 Get Koha
+
+1.3.1 Option A: Download Koha via Git (optional)
+
+    $ sudo apt-get install git-core git-email
+    $ git clone git://git.koha-community.org/pub/scm/koha.git kohaclone
+    $ cd kohaclone
+    $ git checkout -b myinstall origin
+
+Note: for more information about Git, please see the Koha Git Usage Guide:
+
+    http://wiki.koha-community.org/wiki/Version_Control_Using_Git
+
+1.3.2 Option B: Download Koha from http://download.koha-community.org
+
+    $ wget http://download.koha-community.org/koha-3.02.00.tar.gz
+    ( Note: use the latest stable version)
+
+1.4 Install additional Ubuntu dependencies
+
+IMPORTANT:  You should only use CPAN for Perl dependencies which are NOT
+            available from the package maintainer. You have been warned!
+
+Using the ubuntu.packages file included in the Koha source tree,
+run the following:
+
+    $ sudo dpkg --set-selections < install_misc/ubuntu.packages
+
+Now start dselect (you may need to 'sudo apt-get install dselect'):
+
+    $ sudo dselect
+
+Choose [I]nstall and accept packages to be installed (hit return)
+
+(may take a while)
+
+Choose [C]onfigure, [R]emove and [Q]uit until dselect has completed.
+
+Note: If you are installing on an older version of Ubuntu, not all of the
+      packages listed in ubuntu.packages may be available as packages.  You
+      will want to verify which ones are installed and which ones not.
+      This can be done by running the following command:
+
+    $ install_misc/ubuntu-pkg-check.sh | grep none
+
+When tracking down any "(none)" results, note that sometimes Ubuntu does the
+right thing and installs a later, differently named version of the package in
+place.  To see if this is happening, it is useful to run a command like:
+
+    $ dpkg --get-selections | grep [base_package_name]
+
+1.5 Install Perl dependencies that aren't packaged into Ubuntu Lucid Lynx
+sources
+
+Run the following command:
+
+    $ sudo cpan HTTP::OAI Locale::Currency::Format Memoize::Memcached \
+                PDF::API2::Simple Storable Text::CSV::Encoded
+
+Note: you may need to run CPAN initialization if you've not run cpan
+before:
+
+    /etc/perl/CPAN/Config.pm initialized.
+
+    CPAN is the world-wide archive of perl resources. It consists of about
+    100 sites that all replicate the same contents all around the globe.
+    Many countries have at least one CPAN site already. The resources
+    found on CPAN are easily accessible with the CPAN.pm module. If you
+    want to use CPAN.pm, you have to configure it properly.
+
+    If you do not want to enter a dialog now, you can answer 'no' to this
+    question and I'll try to autoconfigure. (Note: you can revisit this
+    dialog anytime later by typing 'o conf init' at the cpan prompt.)
+
+    Are you ready for manual configuration? [yes]
+
+When the configuration is completed CPAN will install the Perl modules.
+
+2. Configuration of dependencies
+
+2.1 Update root MySQL password (if dselect didn't do it for you already)
+
+    $ sudo mysqladmin password <password>
+
+2.2 Create the Koha database
+
+    Create the database and user with associated privileges:
+
+    $ mysqladmin -uroot -p<password> create <kohadatabasename>
+    $ mysql -uroot -p<password>
+
+    Welcome to the MySQL monitor.  Commands end with ; or \g.
+    Your MySQL connection id is 22
+    Server version: 5.0.32-Debian_7etch3-log Debian etch distribution
+
+    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
+
+    mysql> grant all on <kohadatabasename>.* to '<kohadatabaseuser>'@'localhost' identified by '<kohadatabaseuserpassword>';
+    Query OK, 0 rows affected (0.00 sec)
+
+    mysql> flush privileges;
+    Query OK, 0 rows affected (0.00 sec)
+
+    mysql> quit
+
+2.3 Test your SAX Parser and correct where necessary
+
+    You must be sure you're using the XML::LibXML SAX parser, not Expat or
+    PurePerl, both of which have outstanding bugs with pre-composed
+    characters. You can test your SAX parser by running:
+
+    $ cd koha
+    $ misc/sax_parser_print.pl
+
+    You should see something like::
+
+    XML::LibXML::SAX::Parser=HASH(0x81fe220)
+
+    If you're using PurePerl or Expat, you'll need to edit your
+    ini file, typically located at:
+
+    /etc/perl/XML/SAX/ParserDetails.ini
+
+    You will need to move the entire section for '[XML::LibXML::SAX::Parser]'
+    to the bottom of the ini file.
+
+3. Run the Koha installer
+
+    $ perl Makefile.PL
+    ( answer questions )
+    $ make
+    $ make test
+    $ sudo make install
+
+4. Configure and start Apache
+    $ sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
+    (note that the path to koha-httpd.conf may be different depending on your
+    installation choices)
+
+Add the following lines to /etc/apache2/ports.conf:
+
+    Listen 80
+    Listen 8080
+
+If not running named virtual hosts (The default koha installation does not use
+named virtual hosts.), comment out the following line:
+
+    NameVirtualHost *:80
+
+Run the following commands:
+
+    $ sudo a2enmod rewrite
+    $ sudo a2ensite koha
+    $ sudo apache2ctl restart
+
+Note: you may still see the usual Apache default site if your VirtualHost
+configuration isn't correct.  The command "sudo a2dissite default" may be a
+quick fix, but may have side-effects.  See the Apache HTTPD manual section on
+virtual hosts for full instructions.
+
+5. Configure and start Zebra
+
+Note: it's recommended that you daemonize the Zebra process and add it to your
+startup profile. For a non-production test/development installation, running
+Zebra from the command line can be useful. Pick from the two available options
+below, or roll your own :-)
+
+Note: it's also recommended that you create a Koha system user, which you will
+have specified during the install process. Alternatively, Zebra can be
+configured to run as the root user.
+
+To add a user do:
+
+    $ sudo adduser koha
+
+Option 1: run the Zebra processes from the command line:
+
+1.1 Zebra Search Server
+
+This process send responses to search requests sent by Koha or
+Z39.50/SRU/SRW clients.
+
+    $ sudo -u ${KOHA_USER} zebrasrv -f /etc/koha/koha-conf.xml
+    (note that the path to koha-conf.xml may be different depending on your
+    installation choices)
+
+Note: the user you run Zebra as will be the only user with write permission
+      on the Zebra index; in development mode, you may wish to use your
+      system user.
+
+1.2 Zebra Indexer
+
+Added/updated/deleted records in Koha MySQL database must be indexed
+into Zebra. A specific script must be launched each time a bibliographic
+or an authority record is edited.
+
+    $ sudo -u ${KOHA_USER} misc/migration_tools/rebuild_zebra -z -b -a
+    NOTE: This script should be run as the kohauser (the default is 'koha').
+
+Option 2: run the Zebra process as a daemon, and add to startup process:
+
+Note that references to $SCRIPT_DIR refer to the directory where
+Koha's command-line scripts are installed, e.g., /usr/share/koha/bin.
+
+1.1 Zebra Search Server
+
+    $ sudo ln -s ${SCRIPT_DIR}/koha-zebra-ctl.sh  /etc/init.d/koha-zebra-daemon
+    (Note: ${SCRIPT_DIR} is /usr/share/koha/bin/ by default in a standard install)
+    $ sudo update-rc.d koha-zebra-daemon defaults
+    ( Note: see man chkconfig(8) on other distros )
+
+    $ sudo ${SCRIPT_DIR}/koha-zebra-ctl.sh start
+
+1.2 Zebra Indexer
+
+Add an entry in Koha user crontab to scheduled added/updated/deleted records
+indexing by Zebra with this command:
+
+  <path/to/koha>/misc/migration_tools/rebuild_zebra -z -b -a
+
+See check misc/cronjobs/crontab.example for usage examples.
+NOTE: This job should be setup under the kohauser (the default is 'koha').
+
+6. Run the Web Installer, populate the database, initial configuration of settings
+
+    Point your browser to http://<servername>:8080/
+
+    It should redirect you to the Web Installer where you can continue the setup.
+    You can install the sample data for libraries, patrons, etc. via the Web Installer
+
+7. What next?
+
+    Once the installer has completed, you can import and index MARC records from the
+    command line thusly (Note: you can also use the 'Stage MARC records for import' from
+    the Tools area of Koha's Staff Client to import a batch of MARC records):
+
+    $ export KOHA_CONF=/usr/share/koha/etc/koha-conf.xml
+      (note: use the correct path to your koha-conf.xml)
+
+7.1 Import:
+    Bibliographic data in MARC21 format
+    $ misc/migration_tools/bulkmarcimport.pl -file /path/to/marc.iso2709
+    Authority data in MARC21 format
+    $ misc/migration_tools/bulkauthimport.pl -file /path/to/auth.iso2709
+
+7.2 Fast Index:
+    $ misc/migration_tools/rebuild_zebra.pl -b -w
+
+    Once the indexing has completed, you will be able to search for records in your system.
+    NOTE: This script should be run as the kohauser (the default is 'koha').
+
+7.3 Schedule regular index updates
+
+    You need to run rebuild_zebra.pl -b -a -z as a regular cron job in orde to pick up new bibs
+    and items as you add them. Check misc/cronjobs/crontab.example for usage examples. See 7.0 above.
+    NOTE: This job should be setup under the kohauser (the default is 'koha').
+
+7.4 To enable public Z39.50/SRU servers, you'll need to edit your koha-conf.xml and
+    change the <listen> options to listen on a TCP port; then restart the zebra daemon.
+
+UPGRADE
+=======
+If you are upgrading from a previous installation of Koha 3, you can
+use the following:
+
+ perl Makefile.PL --prev-install-log /path/to/koha-install-log
+ make
+ make test
+ sudo make upgrade
+
+Uninstall Instructions
+=============================
+1) Stop Services:
+   $ sudo a2dissite koha
+   $ sudo rm /etc/apache2/sites-available/koha
+   $ sudo apache2ctl restart
+
+   $ sudo update-rc.d koha-zebra-daemon remove
+   $ sudo rm /etc/init.d/koha-zebra-daemon
+
+2) Remove Database and Indexes
+
+   # MySQL
+   $ mysql -u<kohauser> -p<kohapassword>
+   > drop database koha;
+
+   # Zebra Indexes
+   $ zebraidx -c <prefix>/etc/zebradb/zebra-biblios.cfg -g iso2709 -d biblios init
+   $ zebraidx -c <prefix>/etc/zebradb/zebra-authorities.cfg -g iso2709 -d authorities init
+
+3) Remove Koha Install Directories and Configuration Files
+   Don't forget about any crontab entries
+
+Tested on the following operating environments
+==============================================
+- Ubuntu Jaunty Jackalope 9.04
+
+Installer Bug reports
+=====================
+Please log any installer bug reports at http://bugs.koha-community.org
+
+Other Notes
+=====================
+This file is part of Koha
+
+Koha is free software; you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+You should have received a copy of the GNU General Public License along
+with Koha; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
index 2ab5252..94560c4 100755 (executable)
@@ -189,17 +189,18 @@ my $bibitemnum;
 if ( $orderinfo->{quantity} ne '0' ) {
     #TODO:check to see if biblio exists
     unless ( $$orderinfo{biblionumber} ) {
-
         #if it doesnt create it
         my $record = TransformKohaToMarc(
             {
                 "biblio.title"                => "$$orderinfo{title}",
-                "biblio.author"               => "$$orderinfo{author}",
+                "biblio.author"               => $$orderinfo{author}          ? $$orderinfo{author}        : "",
                 "biblio.seriestitle"          => $$orderinfo{series}          ? $$orderinfo{series}        : "",
                 "biblioitems.isbn"            => $$orderinfo{isbn}            ? $$orderinfo{isbn}          : "",
                 "biblioitems.publishercode"   => $$orderinfo{publishercode}   ? $$orderinfo{publishercode} : "",
                 "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
+                "biblio.copyrightdate"        => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
             });
+
         # create the record in catalogue, with framework ''
         my ($biblionumber,$bibitemnum) = AddBiblio($record,'');
         # change suggestion status if applicable
index a580ae7..6c10459 100755 (executable)
@@ -340,7 +340,7 @@ $template->param(
     orderexists      => ( $new eq 'yes' ) ? 0 : 1,
     title            => $data->{'title'},
     author           => $data->{'author'},
-    publicationyear  => $data->{'publicationyear'},
+    publicationyear  => $data->{'publicationyear'} ? $data->{'publicationyear'} : $data->{'copyrightdate'},
     budget_loop      => $budget_loop,
     isbn             => $data->{'isbn'},
     seriestitle      => $data->{'seriestitle'},
index 444c893..0215873 100755 (executable)
@@ -54,6 +54,7 @@ my $author        = $input->param('author');
 my $isbn          = $input->param('isbn');
 my $issn          = $input->param('issn');
 my $lccn          = $input->param('lccn');
+my $lccall          = $input->param('lccall');
 my $subject= $input->param('subject');
 my $dewey = $input->param('dewey');
 my $op            = $input->param('op');
@@ -114,6 +115,7 @@ if ( $op ne "do_search" ) {
         isbn         => $isbn,
         issn         => $issn,
         lccn         => $lccn,
+        lccall       => $lccall,
         title        => $title,
         author       => $author,
         serverloop   => $serverloop,
@@ -158,6 +160,10 @@ else {
         $query .= " \@attr 1=9 $lccn ";
         $nterms++;
     }
+    if ($lccall) {
+        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
+        $nterms++;
+    }
 for my $i (1..$nterms-1) {
     $query = "\@and " . $query;
 }
index b5bcde8..7fcf5fc 100755 (executable)
@@ -266,7 +266,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 $lang = $template->param( 'lang' );
 my $op = $input->param( 'op' ) || '';
 my $tab = $input->param( 'tab' );
-$tab ||= 'local-use';
+$tab ||= 'acquisitions'; # Ideally this should be "local-use" but preferences.pl
+                         # does not presently support local use preferences
 
 my $highlighted;
 
index 824b058..411f434 100755 (executable)
@@ -801,7 +801,7 @@ if ( $op eq 'add_form' ) {
         $row_data->{delete} = "$script_name?op=delete_confirm&amp;searchfield=" . $results->[$i]{'variable'};
         push( @loop_data, $row_data );
     }
-    $tab = ( $tab ? $tab : "Local Use" );
+    $tab = ( $tab ? $tab : "local-use" );
     $template->param( loop => \@loop_data, $tab => 1 );
     if ( $offset > 0 ) {
         my $prevpage = $offset - $pagesize;
index 85819c0..4f6c23f 100755 (executable)
@@ -106,7 +106,7 @@ my $dat = &GetBiblioData($biblionumber);
 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
 my @subscriptions       = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
 my @subs;
-$dat->{'serial'}=1 if $subscriptionsnumber;
+
 foreach my $subscription (@subscriptions) {
     my %cell;
        my $serials_to_display;
@@ -212,7 +212,7 @@ $template->param(
        itemdata_enumchron  => $itemfields{enumchron},
        itemdata_uri        => $itemfields{uri},
        itemdata_copynumber => $itemfields{copynumber},
-       volinfo                         => $itemfields{enumchron} || $dat->{'serial'} ,
+       volinfo                         => $itemfields{enumchron},
        z3950_search_params     => C4::Search::z3950_search_args($dat),
        C4::Search::enabled_staff_search_views,
 );
index de67677..e72a6d1 100755 (executable)
@@ -25,6 +25,7 @@ use C4::Auth;
 use C4::Context;
 use C4::Output;
 use C4::Biblio;
+use C4::Items;
 use C4::Search;                # enabled_staff_search_views
 
 my $query        = new CGI;
@@ -51,7 +52,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-$template->param( count => 1, bibliotitle => $biblio->{title} );
+#count of item linked
+my $itemcount = GetItemsCount($biblionumber);
+$template->param( count => $itemcount,
+                                       bibliotitle => $biblio->{title}, );
 
 #Getting the list of all frameworks
 my $queryfwk =
index ea4daf9..6a50b9c 100755 (executable)
@@ -33,6 +33,8 @@ use C4::Dates;
 
 use MARC::File::XML;
 
+my $dbh = C4::Context->dbh;
+
 sub find_value {
     my ($tagfield,$insubfield,$record) = @_;
     my $result;
@@ -69,8 +71,27 @@ sub set_item_default_location {
     }
 }
 
+# NOTE: This code is subject to change in the future with the implemenation of ajax based autobarcode code
+# NOTE: 'incremental' is the ONLY autoBarcode option available to those not using javascript
+sub _increment_barcode {
+    my ($record, $frameworkcode) = @_;
+    my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
+    unless ($record->field($tagfield)->subfield($tagsubfield)) {
+        my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items");
+        $sth_barcode->execute;
+        my ($newbarcode) = $sth_barcode->fetchrow;
+        $newbarcode++;
+        # OK, we have the new barcode, now create the entry in MARC record
+        my $fieldItem = $record->field($tagfield);
+        $record->delete_field($fieldItem);
+        $fieldItem->add_subfields($tagsubfield => $newbarcode);
+        $record->insert_fields_ordered($fieldItem);
+    }
+    return $record;
+}
+
+
 my $input = new CGI;
-my $dbh = C4::Context->dbh;
 my $error        = $input->param('error');
 my $biblionumber = $input->param('biblionumber');
 my $itemnumber   = $input->param('itemnumber');
@@ -126,22 +147,8 @@ if ($op eq "additem") {
     my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit');
     my $number_of_copies           = $input->param('number_of_copies');
 
-    # if autoBarcode is set to 'incremental', calculate barcode...
-       # NOTE: This code is subject to change in 3.2 with the implemenation of ajax based autobarcode code
-       # NOTE: 'incremental' is the ONLY autoBarcode option available to those not using javascript
     if (C4::Context->preference('autoBarcode') eq 'incremental') {
-        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
-        unless ($record->field($tagfield)->subfield($tagsubfield)) {
-            my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items");
-            $sth_barcode->execute;
-            my ($newbarcode) = $sth_barcode->fetchrow;
-            $newbarcode++;
-            # OK, we have the new barcode, now create the entry in MARC record
-            my $fieldItem = $record->field($tagfield);
-            $record->delete_field($fieldItem);
-            $fieldItem->add_subfields($tagsubfield => $newbarcode);
-            $record->insert_fields_ordered($fieldItem);
-        }
+        $record = _increment_barcode($record, $frameworkcode);
     }
 
     my $addedolditem = TransformMarcToKoha($dbh,$record);
@@ -164,22 +171,18 @@ if ($op eq "additem") {
 
     # If we have to add & duplicate
     if ($add_duplicate_submit) {
-
-        # We try to get the next barcode
-        use C4::Barcodes;
-        my $barcodeobj = C4::Barcodes->new;
-        my $barcodevalue = $barcodeobj->next_value($addedolditem->{'barcode'}) if $barcodeobj;
-        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
-        if ($record->field($tagfield)->subfield($tagsubfield)) {
-            # If we got the next codebar value, we put it in the record
-            if ($barcodevalue) {
-                $record->field($tagfield)->update($tagsubfield => $barcodevalue);
-            # If not, we delete the recently inserted barcode from the record (so the user can input a barcode himself)
-            } else {
-                $record->field($tagfield)->update($tagsubfield => '');
-            }
-        }
         $itemrecord = $record;
+        if (C4::Context->preference('autoBarcode') eq 'incremental') {
+            $itemrecord = _increment_barcode($itemrecord, $frameworkcode);
+        }
+        else {
+            # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
+            my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
+            my $fieldItem = $itemrecord->field($tagfield);
+            $itemrecord->delete_field($fieldItem);
+            $fieldItem->delete_subfields($tagsubfield);
+            $itemrecord->insert_fields_ordered($fieldItem);
+        }
     }
 
     # If we have to add multiple copies
@@ -433,7 +436,10 @@ foreach my $tag (sort keys %{$tagslib}) {
           foreach my $thisbranch (@$branches) {
               push @authorised_values, $thisbranch->{value};
               $authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname};
-             # $value = $thisbranch->{value} if $thisbranch->{selected};
+              # in edit item this is set to the data value otherwise use default
+              if ($op ne 'edititem' && $thisbranch->{selected} ) {
+                  $value = $thisbranch->{value};
+              }
           }
       }
       elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
index 24ce1e1..d486649 100755 (executable)
@@ -108,7 +108,7 @@ sub plugin {
                        = get_template_and_user({template_name => "value_builder/labs_theses.tmpl",
                                        query => $query,
                                        type => 'intranet',
-                                       authnotrequired => 1,
+                                       authnotrequired => 0,
                                        debug => 1,
                                        });
 
@@ -165,7 +165,7 @@ sub plugin {
                        = get_template_and_user({template_name => "value_builder/labs_theses.tmpl",
                                                query => $query,
                                                type => "intranet",
-                                               authnotrequired => 1,
+                                               authnotrequired => 0,
                                        });
 
                $template->param(
index 7eadc5d..84a6208 100755 (executable)
@@ -345,7 +345,7 @@ sub plugin {
                   "cataloguing/value_builder/unimarc_field_4XX.tmpl",
                 query           => $query,
                 type            => 'intranet',
-                authnotrequired => 1,
+                authnotrequired => 0,
                 debug           => 1,
             }
         );
@@ -463,7 +463,7 @@ sub plugin {
                   "cataloguing/value_builder/unimarc_field_4XX.tmpl",
                 query           => $query,
                 type            => "intranet",
-                authnotrequired => 1,
+                authnotrequired => 0,
             }
         );
 
index cf9e7b2..9b6c8f1 100755 (executable)
@@ -41,6 +41,7 @@ my $author        = $input->param('author');
 my $isbn          = $input->param('isbn');
 my $issn          = $input->param('issn');
 my $lccn          = $input->param('lccn');
+my $lccall        = $input->param('lccall');
 my $subject       = $input->param('subject');
 my $dewey         = $input->param('dewey');
 my $controlnumber      = $input->param('controlnumber');
@@ -88,6 +89,7 @@ if ( $op ne "do_search" ) {
         isbn         => $isbn,
         issn         => $issn,
         lccn         => $lccn,
+        lccall       => $lccall,
         title        => $title,
         author       => $author,
         controlnumber=> $controlnumber,
@@ -136,6 +138,10 @@ else {
         $query .= " \@attr 1=9 $lccn ";
         $nterms++;
     }
+    if ($lccall) {
+        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
+        $nterms++;
+    }
     if ($controlnumber) {
         $query .= " \@attr 1=12 \"$controlnumber\" ";
         $nterms++;
index 4b63141..99475a6 100755 (executable)
@@ -46,7 +46,7 @@ reset_debian_changelog() {
 build_package() {
     git archive --format=tar --prefix="koha-$1/" HEAD | 
         gzip -9 > "../koha_$1.tar.gz"
-    pdebuild
+    pdebuild $2
 }
 
 if ! everything_is_commited
@@ -55,6 +55,10 @@ then
 fi
 
 version="$(newversion)"
+if [ -n "$1" ]
+then
+    pdebuildopts="--buildresult $1"
+fi
 adjust_debian_changelog "$version"
-build_package "$version"
+build_package "$version" "$pdebuildopts"
 reset_debian_changelog
index 42167eb..ba831af 100644 (file)
@@ -33,6 +33,8 @@ The Debian packaging of Koha puts files in the following places:
 
 * /etc/koha -- system configuration files
 * /etc/cron.hourly/koha-common -- cron job
+* /etc/cron.daily/koha-common -- cron job
+* /etc/cron.d/koha-common -- cron job
 * /usr/share/koha -- shared files (HTML templates, Perl code, etc)
 
 Each Koha instance has files in the following places:
index 715d1b0..cd7f3c2 100644 (file)
@@ -7,3 +7,4 @@ SHELL=/bin/sh
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 */5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra $(koha-list --enabled)
+*/15 * * * * root koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/process_message_queue.pl
diff --git a/debian/koha-common.cron.daily b/debian/koha-common.cron.daily
new file mode 100644 (file)
index 0000000..059682e
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# /etc/cron.daily/koha-common -- Daily housekeeping tasks for all Kohas.
+# Copyright 2010  Catalyst IT, Ltd
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/overdue_notices.pl -t
+koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl
+koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/advance_notices.pl -c
+koha-foreach --enabled /usr/share/koha/bin/cronjobs/holds/cancel_expired_holds.pl >/dev/null 2>&1
+koha-foreach --enabled /usr/share/koha/bin/cronjobs/services_throttle.pl > /dev/null 2>&1
+koha-foreach --enabled /usr/share/koha/bin/cronjobs/cleanup_database.pl --sessions --zebraqueue 10
+koha-foreach --enabled --noemail /usr/share/koha/bin/cronjobs/cleanup_database.pl --mail
index 986aa07..6ed2587 100644 (file)
@@ -3,7 +3,7 @@ debian/tmp/usr/*                            usr
 debian/tmp/etc/koha/pazpar2
 debian/tmp/etc/koha/zebradb/[!z]*
 debian/templates/* etc/koha
-debian/koha-post-install-setup usr/sbin
+debian/koha-post-install-setup              usr/sbin
 debian/unavailable.html                     usr/share/koha/intranet/htdocs
 debian/unavailable.html                     usr/share/koha/opac/htdocs
 debian/templates/*                          etc/koha
@@ -12,6 +12,8 @@ debian/scripts/koha-create-dirs             usr/sbin
 debian/scripts/koha-disable                 usr/sbin
 debian/scripts/koha-dump                    usr/sbin
 debian/scripts/koha-dump-defaults           usr/sbin
+debian/scripts/koha-email-disable           usr/sbin
+debian/scripts/koha-email-enable            usr/sbin
 debian/scripts/koha-enable                  usr/sbin
 debian/scripts/koha-foreach                 usr/sbin
 debian/scripts/koha-list                    usr/sbin
index 43e7c4e..672c841 100755 (executable)
@@ -117,6 +117,7 @@ then
     fi
     adduser --no-create-home --disabled-login \
         --gecos "Koha instance $username" \
+        --home "/var/lib/koha/$name" \
         --quiet "$username"
 
     # Create the site-specific directories.
@@ -233,3 +234,9 @@ if [ "$op" = request ]
 then
     koha-disable "$name"
 fi
+
+echo <<eoh
+
+Email for this instance is disabled. When you're ready to enable it, use:
+koha-email-enable $name
+eoh
diff --git a/debian/scripts/koha-email-disable b/debian/scripts/koha-email-disable
new file mode 100755 (executable)
index 0000000..5d381cb
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# koha-email-disable -- turn off the email for a Koha instance
+# Copyright 2010  Catalyst IT, Ltd
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+if [ "$#" = 0 ]
+then
+    echo "Disables the email for a koha instance." 1>&2
+    echo "Usage: $0 instancename..." 1>&2
+    exit 1
+fi
+libdir=/var/lib/koha
+for name in "$@"
+do
+    if [ ! -d $libdir/$name ]
+    then 
+        echo "$0: no koha instance \"$name\"" 1>&2
+        continue
+    fi
+    rm -f $libdir/$name/email.enabled
+done
diff --git a/debian/scripts/koha-email-enable b/debian/scripts/koha-email-enable
new file mode 100755 (executable)
index 0000000..da63589
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# koha-email-enable -- turn on the email for a Koha instance
+# Copyright 2010  Catalyst IT, Ltd
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+if [ "$#" = 0 ]
+then
+    echo "Enables email for a koha instance." 1>&2
+    echo "Usage: $0 instancename..." 1>&2
+    exit 1
+fi
+libdir=/var/lib/koha
+for name in "$@"
+do
+    if [ ! -d $libdir/$name ]
+    then 
+        echo "$0: no koha instance \"$name\"" 1>&2
+        continue
+    fi
+    touch $libdir/$name/email.enabled
+done
old mode 100644 (file)
new mode 100755 (executable)
index 80152bc..9cf150d 100755 (executable)
 
 set -e
 
-
 listopts=""
-if [ "$1" = --enabled ]
-then
-    listopts="--enabled"
+while [ ! -z "$1" ]
+do
+    case "$1" in
+        --email) listopts="$listopts --email";;
+      --noemail) listopts="$listopts --noemail";;
+      --enabled) listopts="$listopts --enabled";;
+              *) break;;
+    esac
     shift
-fi
-
-
+done
+            
 for name in $(koha-list $listopts)
 do
     sudo -u "$name-koha" \
index af810ae..1e19f1a 100755 (executable)
@@ -29,19 +29,46 @@ is_enabled() {
     fi
 }
 
-all=yes
-if [ "$1" = --enabled ]
-then
+help() {
+    echo <<eoh
+Lists Koha instances, optionally only those that are enabled or have
+email turned on.
+    
+Usage: $0 [--enabled] [--email] [-h]
+Options:
+    --enabled       only show instances that are enabled
+    --email         only show instances that have email enabled
+    --noemail       only show instances that do not have email enabled
+    -h              this help
+
+The filtering options can be combined, and you probably want to do this
+(except --email and --noemail, that's just silly.)
+eoh
+}
+
+enabled=no
+email=no
+noemail=no
+args=$(getopt -l enabled,email,noemail -o h -n $0 -- "$@")
+set -- $args
+while [ ! -z "$1" ]
+do
+    case "$1" in
+         -h) help; exit;;
+    --email) email=yes;;
+  --enabled) enabled=yes;;
+  --noemail) noemail=yes;;
+          *) break;;
+    esac
     shift
-    all=no
-fi
+done
 
 find /etc/koha/sites -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | 
 sort |
 while read name
 do
-    if [ "$all" = yes ] || is_enabled "$name"
-    then
-        echo "$name"
-    fi
+    [ "$enabled" = yes ] && ! is_enabled "$name" && continue
+    [ "$email" = yes ] && [ ! -e /var/lib/koha/$name/email.enabled ] && continue
+    [ "$noemail" = yes ] && [ -e /var/lib/koha/$name/email.enabled ] && continue
+    echo "$name"
 done
index 7da1066..3ae693b 100755 (executable)
@@ -31,7 +31,7 @@ fi
 
 for name in "$@"
 do
-    sudo -u "$name-koha" \
+    sudo -u "$name-koha" -H \
     env PERL5LIB=/usr/share/koha/lib \
         KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
         /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a $opts
index cf9f5ab..a1179d5 100644 (file)
@@ -493,3 +493,11 @@ May 4 2010 Community Handover meeting http://wiki.koha-community.org/wiki/Commun
 May 5 2010     General IRC meeting http://wiki.koha-community.org/wiki/General_Meeting,_May_5_2010
 May 5 2010     Matthew Hunt becomes the 114th committer to have a patch accepted
 May 19 2010    Marcel de Rooy becomes the 115th committer to have a patch accepted
+July 19 2010   Andrew Chilton becomes the 116th committer to have a patch accepted
+June 2 2010    General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_June_2010
+July 7 2010    General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_July_2010
+June 25 2010   Koha 3.2 Beta released http://koha-community.org/koha-3-2-beta-released/
+July 13 2010   License meeting http://wiki.koha-community.org/wiki/License_Upgrade_Vote_IRC_Meeting,_13_July_2010
+August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010
+September 1 2010       General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010
+
index 3268c62..b41b298 100644 (file)
@@ -252,27 +252,27 @@ map ý                    y
 map Ý                 y
 
 # mapping blank string
-map (^impr)         @
+map (^impr\s)       @
 map (^impr\.)       @
-map (^Impr)         @
+map (^Impr\s)       @
 map (^Impr\.)       @
-map (^IMPR)         @
+map (^IMPR\s)       @
 map (^IMPR\.)       @
-map (^DL)           @
+map (^DL\s)         @
 map (^DL\.)         @
-map (^Dl)           @
+map (^Dl\s)         @
 map (^Dl\.)         @
-map (^dl)           @
+map (^dl\s)         @
 map (^dl\.)         @
-map (^cop)          @
+map (^cop\s)        @
 map (^cop\.)        @
-map (^Cop)          @
+map (^Cop\s)        @
 map (^Cop\.)        @
-map (^COP)          @
+map (^COP\s)        @
 map (^COP\.)        @
-map (^c)            @
+map (^c\s)          @
 map (^c\.)          @
-map (^C)            @
+map (^C\s)          @
 map (^C\.)          @
 map (^\[sd\])       @
 map (^\[s\.d\.\])   @
index 48c53e4..4e48f59 100755 (executable)
@@ -12,14 +12,13 @@ idzebra-2.0 \
 idzebra-2.0-utils \
 libalgorithm-checkdigits-perl \
 libbiblio-endnotestyle-perl \
+libbusiness-isbn-perl \
 libcgi-session-perl \
 libcgi-session-serialize-yaml-perl \
 libclass-accessor-perl \
 libclass-factory-util-perl \
 libdata-ical-perl \
 libdate-calc-perl \
-libdate-calc-perl  \
-libdate-ical-perl \
 libdate-ical-perl \
 libdate-manip-perl  \
 libdatetime-format-mail-perl  \
@@ -29,20 +28,16 @@ libdatetime-locale-perl \
 libdatetime-perl \
 libdatetime-timezone-perl \
 libdbd-mysql-perl \
-libdbd-mysql-perl  \
 libdbd-sqlite2-perl \
 libdbi-perl \
 libdigest-sha-perl \
 libemail-date-perl \
-libemail-date-perl \
 libgcrypt11-dev  \
 libgcrypt11  \
 libgd2-xpm-dev  \
 libgd-barcode-perl \
-libgd-barcode-perl \
 libgd-gd2-perl \
 libhtml-scrubber-perl \
-libhtml-scrubber-perl \
 libhtml-template-pro-perl  \
 libidzebra-2.0-dev \
 libidzebra-2.0 \
@@ -57,30 +52,24 @@ libjson-perl \
 libjson-xs-perl \
 liblingua-ispell-perl \
 liblingua-stem-perl \
-liblingua-stem-perl  \
 liblist-moreutils-perl \
 liblocale-gettext-perl \
 liblocale-po-perl \
 libmail-sendmail-perl \
-libmail-sendmail-perl \
-libmail-sendmail-perl  \
 libmarc-charset-perl \
 libmarc-crosswalk-dublincore-perl \
 libmarc-record-perl \
 libmarc-xml-perl \
 libmime-lite-perl \
-libmime-lite-perl \
-libmime-lite-perl        \
 libmysqlclient15-dev  \
 libnet-ldap-perl \
-libnet-ldap-perl \
 libnet-z3950-zoom-perl \
+libnet-server-perl \
 libnumber-format-perl \
 libpdf-api2-perl \
-libpdf-api2-perl \
 libpdf-reuse-barcode-perl \
 libpdf-reuse-perl \
-libpoe-perl \
+libpdf-table-perl \
 libpoe-perl \
 libschedule-at-perl \
 libtext-charwidth-perl \
diff --git a/install_misc/ubuntu-pkg-check.sh b/install_misc/ubuntu-pkg-check.sh
new file mode 100755 (executable)
index 0000000..9303082
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+UBUNTU_PACKAGES=`dirname $0`/ubuntu.packages
+
+# sanity checks
+
+if [ ! -e $UBUNTU_PACKAGES ]; then
+  echo ERROR:  Could not find $UBUNTU_PACKAGES file for running check.
+  exit
+fi
+
+# main
+
+UBUNTU_PACKAGES_LIST=`awk '{print $1}' $UBUNTU_PACKAGES | grep -v '^\s*#' | grep -v '^\s*$'`
+for F in $UBUNTU_PACKAGES_LIST; do
+  UBUNTU_PKG_POLICY=`apt-cache policy $F | grep "Installed:"`
+  UBUNTU_PKG_VERSION=`echo $UBUNTU_PKG_POLICY | awk '{print $2}'`
+  echo "$F = $UBUNTU_PKG_VERSION"
+done
index 56430bf..8a69342 100644 (file)
-at install
-apache2 install
-cvs    install
-daemon install
-libgcrypt11 install
-libgcrypt11-dev install
-make install
-gcc install
-gettext install
-mysql-server install
-libcgi-session-perl    install
-libclass-factory-util-perl     install
-libdate-calc-perl install
-libdate-manip-perl install
-libdate-ical-perl      install
-libdatetime-format-mail-perl install
-libgraphics-magick-perl install
-libmail-sendmail-perl install
-liblingua-ispell-perl  install
-liblingua-stem-perl install
-libdbd-mysql-perl install
-idzebra-2.0    install
-idzebra-2.0-common     install
-idzebra-2.0-doc        install
-idzebra-2.0-utils      install
-libclass-factory-util-perl     install
+apache2                                        install
+at                                     install
+daemon                                 install
+gcc                                    install
+gettext                                        install
+make                                   install
+
+# mysql packages
+
+mysql-server                           install
+libmysqlclient16                       install
+libmysqlclient16-dev                   install
+
+# yaz packages
+
+yaz                                    install
+yaz-doc                                        install
+libyaz3                                        install
+libyaz3-dev                            install
+
+# zebra packages
+
+idzebra-2.0                            install
+idzebra-2.0-common                     install
+idzebra-2.0-doc                                install
+idzebra-2.0-utils                      install
+libidzebra-2.0-0                       install
+libidzebra-2.0-dev                     install
+libidzebra-2.0-mod-alvis               install
+libidzebra-2.0-mod-grs-marc            install
+libidzebra-2.0-mod-grs-regx            install
+libidzebra-2.0-mod-grs-xml             install
+libidzebra-2.0-mod-text                        install
+libidzebra-2.0-modules                 install
+
+# crypto packages
+
+libgcrypt11                            install
+libgcrypt11-dev                                install
+
+# xml/xslt packages
+
+libxml2                                        install
+libxml2-dev                            install
+libxml2-utils                          install
+libxslt1.1                             install
+libxslt1-dev                           install
+
+# perl packages
+
+libalgorithm-checkdigits-perl          install
+libauthen-cas-client-perl              install
+libbiblio-endnotestyle-perl            install
+libcgi-session-perl                    install
+libcgi-session-serialize-yaml-perl     install
+libclass-factory-util-perl             install
+libdata-ical-perl                      install
+libdate-calc-perl                      install
+libdate-ical-perl                      install
+libdate-manip-perl                     install
+libdatetime-perl                       install
+libdatetime-format-mail-perl           install
 libdatetime-format-strptime-perl       install
-libdatetime-format-w3cdtf-perl install
-libdatetime-locale-perl        install
-libdatetime-perl       install
-liblist-moreutils-perl install
-libdatetime-timezone-perl      install
-libdbi-perl    install
-libidzebra-2.0 install
-libidzebra-2.0-dev     install
-libidzebra-2.0-mod-alvis       install
-libidzebra-2.0-mod-grs-marc    install
-libidzebra-2.0-mod-grs-regx    install
-libidzebra-2.0-mod-grs-xml     install
-libidzebra-2.0-mod-text        install
-libidzebra-2.0-modules install
-libmysqlclient15-dev install
-libnet-ldap-perl       install
-liblist-moreutils-perl install
-liblocale-gettext-perl install
-liblocale-po-perl      install
-libpdf-api2-perl       install
-libmime-lite-perl       install
-libpoe-perl    install
-libtext-csv-perl       install
-libtext-charwidth-perl install
-libtext-iconv-perl     install
-libtext-wrapi18n-perl  install
-libtime-duration-perl  install
-libtime-format-perl    install
-libtimedate-perl       install
-libunix-syslog-perl    install
-libxml-dom-perl        install
-libxml-dumper-perl     install
-libxml-namespacesupport-perl   install
-libxml-parser-perl     install
-libxml-perl    install
-libxml-simple-perl install
-libxml-regexp-perl     install
-libxml-xslt-perl       install
-libxml-libxml-perl     install
-libxml-libxslt-perl    install
-libxml2        install
-libxml2-dev    install
-libxml2-utils  install
-libxslt1-dev   install
-libxslt1.1     install
-libyaml-syck-perl install
-libyaz install
-libyaz-dev     install
-yaz    install
-yaz-doc        install
-libcgi-session-serialize-yaml-perl install
-libdata-ical-perl install
-libhtml-template-pro-perl install
-libmarc-charset-perl install
-bmarc-record-perl install
-libmarc-xml-perl install
-libnet-z3950-zoom-perl install
-libpdf-reuse-perl install
-libpdf-reuse-barcode-perl install
-libsms-send-perl install
-libschedule-at-perl install
-libxml-rss-perl install
-libmime-lite-perl install
+libdatetime-format-w3cdtf-perl         install
+libdatetime-locale-perl                        install
+libdatetime-timezone-perl              install
+libdbd-mysql-perl                      install
+libdbd-sqlite2-perl                    install
+libdbi-perl                            install
+libemail-date-perl                     install
+libgd-barcode-perl                     install
+libgraphics-magick-perl                        install
+libhtml-scrubber-perl                  install
+libhtml-template-pro-perl              install
+liblingua-ispell-perl                  install
+liblingua-stem-perl                    install
+liblingua-stem-snowball-perl           install
+liblist-moreutils-perl                 install
+liblocale-gettext-perl                 install
+liblocale-po-perl                      install
+libmail-sendmail-perl                  install
+libmarc-charset-perl                   install
+libmarc-crosswalk-dublincore-perl      install
+libmarc-record-perl                    install
+libmarc-xml-perl                       install
+libmime-lite-perl                      install
+libmodule-install-perl                 install
+libnet-ldap-perl                       install
+libnet-server-perl                     install
+libnet-z3950-zoom-perl                 install
+libnumber-format-perl                  install
+libpdf-api2-perl                       install
+libpdf-reuse-perl                      install
+libpdf-reuse-barcode-perl              install
+libpdf-table-perl                      install
+libpoe-perl                            install
+libschedule-at-perl                    install
+libsms-send-perl                       install
+libtext-charwidth-perl                 install
+libtext-csv-perl                       install
+libtext-iconv-perl                     install
+libtext-wrapi18n-perl                  install
+libtimedate-perl                       install
+libtime-duration-perl                  install
+libtime-format-perl                    install
+libuniversal-require-perl              install
+libunix-syslog-perl                    install
+libxml-perl                            install
+libxml-dom-perl                                install
+libxml-dumper-perl                     install
+libxml-libxml-perl                     install
+libxml-libxslt-perl                    install
+libxml-namespacesupport-perl           install
+libxml-parser-perl                     install
+libxml-regexp-perl                     install
+libxml-rss-perl                                install
+libxml-sax-writer-perl                 install
+libxml-simple-perl                     install
+libxml-xslt-perl                       install
+libyaml-perl                           install
+libyaml-syck-perl                      install
index 49a02ea..fd51ea5 100644 (file)
@@ -20,7 +20,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoMemberNum',1,'If ON, patron number is auto-calculated','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BiblioDefaultView','normal','Choose the default detail view in the catalog; choose between normal, marc or isbd','normal|marc|isbd','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerMandatoryField','zipcode|surname|cardnumber','Choose the mandatory fields for a patron\'s account',NULL,'free');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('borrowerRelationship','father|mother','Define valid relationships between a guarantor & a guarantee (separated by | or ,)','','free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('borrowerRelationship','Vater|Mutter','Define valid relationships between a guarantor & a guarantee (separated by | or ,)','','free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowersLog',1,'If ON, log edit/create/delete actions on patron data',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casAuthentication', '0', 'Enable or disable CAS authentication', '', 'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casLogout', '0', 'Does a logout from Koha should also log the user out of CAS?', '', 'YesNo');
@@ -132,7 +132,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dateformat','us','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy/mm/dd)','metric|us|iso','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclanguages','en','Set the default language in the OPAC.',NULL,'Languages');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclanguagesdisplay',0,'If ON, enables display of Change Language feature on OPAC','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowersTitles','Mr|Mrs|Miss|Ms','Define appropriate Titles for patrons',NULL,'free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowersTitles','Herr|Frau','Define appropriate Titles for patrons',NULL,'free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('gist',0,'Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST','','Integer');
 -- need AddressType to distinguish between US and other, telephone numbers, maori stuff, sex, nationality, etc.
 -- LDAP ? required fields?
index eda7985..228ebf3 100644 (file)
@@ -87,7 +87,7 @@ function confirm_items_deletion() {
                { text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" },
                { text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;frameworkcode=&amp;op=duplicate" },
                        { text: _("Delete Record"), onclick: {fn: confirm_deletion }<!-- TMPL_IF NAME="count" -->,id:'disabled'<!-- /TMPL_IF --> },
-            { text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }
+            { text: _("Delete all Items"), onclick: {fn: confirm_items_deletion }<!-- TMPL_UNLESS NAME="count" -->,id:'disabled'<!-- /TMPL_UNLESS --> }
            ];
                
                var savemenu = [
index 803184b..d1b096e 100644 (file)
@@ -67,7 +67,7 @@ YAHOO.util.Event.onContentReady("header_search", function() {
         <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF -->
       <!-- /TMPL_LOOP --></select>
                  <label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
-        <option value="">Any</option><!-- TMPL_LOOP name="categoryloop" -->
+        <option value="">Any</option><!-- TMPL_LOOP name="categories" -->
         <!-- TMPL_IF NAME="selected" -->
         <option value="<!-- TMPL_VAR name="categorycode" -->" selected="selected"><!-- TMPL_VAR name="description" --></option><!-- TMPL_ELSE -->
         <option value="<!-- TMPL_VAR name="categorycode" -->"><!-- TMPL_VAR name="description" --></option><!-- /TMPL_IF -->
index b72e305..1fc624a 100644 (file)
@@ -5,7 +5,7 @@
 <!-- TMPL_IF NAME="authorities" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a></li>
 <!-- TMPL_IF NAME="cataloguing" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a></li>
 <!-- TMPL_IF NAME="circulation" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a></li>
-<!-- TMPL_IF NAME="Creators" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Creators" href="/cgi-bin/koha/admin/preferences.pl?tab=creators">Creators</a></li>
+<!-- TMPL_IF NAME="creators" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Creators" href="/cgi-bin/koha/admin/preferences.pl?tab=creators">Creators</a></li>
 <!-- TMPL_IF NAME="enhanced-content" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Enhanced Content Settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced-content">Enhanced Content</a></li>
 <!-- TMPL_IF NAME="i18n-l10n" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Internationalization and Localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n-l10n">I18N/L10N</a></li>
 <!-- TMPL_IF NAME="local-use" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/systempreferences.pl">Local Use</a></li>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc
deleted file mode 100644 (file)
index 3b2fea4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<div id="menu">
-<ul>
-<!-- TMPL_IF NAME="Acquisitions" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a></li>
-<!-- TMPL_IF NAME="Admin" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a></li>
-<!-- TMPL_IF NAME="Authorities" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a></li>
-<!-- TMPL_IF NAME="Cataloging" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloging">Cataloging</a></li>
-<!-- TMPL_IF NAME="Circulation" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a></li>
-<!-- TMPL_IF NAME="Creators" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Creators" href="/cgi-bin/koha/admin/preferences.pl?tab=creators">Creators</a></li>
-<!-- TMPL_IF NAME="EnhancedContent" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced-content">Enhanced Content</a></li>
-<!-- TMPL_IF NAME="I18N/L10N" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Internationalization and Localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n-l10n">I18N/L10N</a></li>
-<!-- TMPL_IF NAME="" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/systempreferences.pl">Local Use</a></li>
-<!-- TMPL_IF NAME="Logs" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Transaction Logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a></li>
-<!-- TMPL_IF NAME="OPAC" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a></li>
-<!-- TMPL_IF NAME="Patrons" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a></li>
-<!-- TMPL_IF NAME="Searching" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a></li>
-<!-- TMPL_IF NAME="Serials" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a></li>
-<!-- TMPL_IF NAME="StaffClient" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Staff Client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff-client">Staff Client</a></li>
-<!-- TMPL_IF NAME="OAI-PMH" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Web Services" href="/cgi-bin/koha/admin/preferences.pl?tab=web-services">Web Services</a></li>
-</ul>
-</div>
index d494cf2..64d5a67 100644 (file)
                 <li>Danny Bouman</li>
                 <li>Stan Brinkerhoff</li>
                 <li>Roger Buck</li>
-                <li>Jared Camins-Esakov</li>
+                <li><a href="https://www.ohloh.net/p/koha/contributors/6620692376789">Jared Camins-Esakov</a></li>
                 <li>Colin Campbell</li>
                 <li>DeAndre Carroll</li>
                 <li>Chris Catalfo (new plugin MARC editor)</li>
                 <li>Ecole des Mines de Saint Etienne, Philippe Jaillon (OAI-PMH support)</li>
                 <li>Stephen Edwards</li>
                 <li>Andrew Elwell</li>
-                <li>Magnus Enger</li>
+                <li><a href="https://www.ohloh.net/p/koha/contributors/6618544677502">Magnus Enger</a></li>
                 <li>Esiee School (Jérome Vizcaino, Michel Lerenard, Pierre Cauchois)</li>
                 <li>Pate Eyler (Kaitiaki from 2002 to 2004)</li>
                 <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609865">Antoine Farnault</a></li>
-                <li>Katrin Fischer</li>
+                <li><a href="https://www.ohloh.net/p/koha/contributors/6618544670742">Katrin Fischer</a></li>
                 <li>Clay Fouts</li>
                 <li>Marco Gaiarin</li>
                 <li>Brendan A. Gallagher</li>
index 603d517..1534e75 100644 (file)
@@ -80,7 +80,7 @@ ff.submit();
         <legend>Basket details</legend>
                <ol>
         <!-- TMPL_IF NAME="basketnote" --><li><span class="label">Internal note:</span> <!-- TMPL_VAR NAME="basketnote" --></li><!-- /TMPL_IF -->
-        <!-- TMPL_IF NAME="basketbooksellernote" --><li><span class="label">Vendor note</span>: <!-- TMPL_VAR NAME="basketbooksellernote" --></li><!-- /TMPL_IF -->
+        <!-- TMPL_IF NAME="basketbooksellernote" --><li><span class="label">Vendor note:</span> <!-- TMPL_VAR NAME="basketbooksellernote" --></li><!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="basketcontractno" -->
             <li><span class="label">Contract number: </span><!-- TMPL_VAR NAME="basketcontractno" --></li>
             <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=<!-- TMPL_VAR NAME="basketcontractno" -->"><!-- TMPL_VAR NAME="basketcontractname" --></a></li>
@@ -176,16 +176,16 @@ ff.submit();
         <li>
             <!-- TMPL_IF name="biblionumber" -->
             <span class="label">ISBN: </span>
-                <input type="hidden" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
+                <input type="hidden" size="20" name="isbn" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
             <!-- TMPL_ELSE -->
             <label for="ISBN">ISBN: </label>
-                <input type="text" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" />
+                <input type="text" size="20" name="isbn" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" />
             <!-- /TMPL_IF -->
         </li>
         <li>
             <!-- TMPL_IF name="biblionumber" -->
             <span class="label">Series: </span>
-                <input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><span class="title"><!-- TMPL_VAR NAME="seriestitle" --></span>
+                <input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><!-- TMPL_VAR NAME="seriestitle" -->
             <!-- TMPL_ELSE -->
             <label for="series">Series: </label>
                 <input type="text" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" />
index afa2a35..05ca4e4 100644 (file)
@@ -18,7 +18,7 @@
 <div class="yui-u first">
 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
 <fieldset>
-<h4><a href="/cgi-bin/koha/admin/systempreferences.pl">Global system preferences</a></h4>
+<h4><a href="/cgi-bin/koha/admin/preferences.pl">Global system preferences</a></h4>
        <p>Manage global system preferences like MARC flavor, date format, administrator email, and templates.</p>
         <input type="hidden" name="op" value="search" />
         <input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
index 8d54fe0..de9a592 100644 (file)
 </div>
 </div>
 <div class="yui-b">
-<!-- TMPL_INCLUDE NAME="sysprefs-menu.inc" -->
+<!-- TMPL_INCLUDE NAME="prefs-menu.inc" -->
 </div>
 </div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
index f0bcb38..a6e4723 100644 (file)
@@ -2,9 +2,8 @@
 <Title>Koha -- Authority details</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript">
-    window.onload = go();
-    
-    function go(){
+//<![CDATA[
+    $(document).ready(function(){
         var index_start = "<!-- TMPL_VAR NAME='index' -->";
         var whichfield;
         try {
@@ -40,7 +39,8 @@
                window.close();
             
                return false;
-    }
+    });
+//]]>
 </script>
 </head>
 <body>
@@ -55,4 +55,4 @@
 </div>
 </div>
 
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
index e722afb..3e510c5 100644 (file)
@@ -324,12 +324,12 @@ function CloneField(index) {
             
             // setting its '+' and '-' buttons
             try {
-                var spans = divs[i].getElementsByTagName('span');
-                for (var j = 0; j < spans.length; j++) {
-                    if(spans[j].getAttribute('class') == 'buttonPlus'){
-                        spans[j].setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
-                    } else if (spans[j].getAttribute('class') == 'buttonMinus') {
-                        spans[j].setAttribute('onclick',"UnCloneField('" + divs[i].getAttribute('id') + "')");
+                var anchors = divs[i].getElementsByTagName('a');
+                for (var j = 0; j < anchors.length; j++) {
+                    if(anchors[j].getAttribute('class') == 'buttonPlus'){
+                        anchors[j].setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')");
+                    } else if (anchors[j].getAttribute('class') == 'buttonMinus') {
+                        anchors[j].setAttribute('onclick',"UnCloneField('" + divs[i].getAttribute('id') + "')");
                     }
                 }
             }
@@ -479,19 +479,19 @@ function CloneSubfield(index){
     label.setAttribute('for',id_input);
     <!-- /TMPL_UNLESS -->
     
-    // setting a new if for the parent div
+    // setting a new id for the parent div
     clone.setAttribute('id',new_id);
     
     try {
         var buttonUp = clone.getElementsByTagName('img')[0];
         buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')");
-       var spans = clone.getElementsByTagName('span');
-       if(spans.length){
-               for(var i = 0 ,lenspans = spans.length ; i < lenspans ; i++){
-                       if(spans[i].getAttribute('class') == 'buttonPlus'){
-                    spans[i].setAttribute('onclick',"CloneSubfield('" + new_id + "')");
-                } else if (spans[i].getAttribute('class') == 'buttonMinus') {
-                    spans[i].setAttribute('onclick',"UnCloneField('" + new_id + "')");
+        var anchors = clone.getElementsByTagName('a');
+        if(anchors.length){
+            for(var i = 0 ,lenanchors = anchors.length ; i < lenanchors ; i++){
+                if(anchors[i].getAttribute('class') == 'buttonPlus'){
+                    anchors[i].setAttribute('onclick',"CloneSubfield('" + new_id + "')");
+                } else if (anchors[i].getAttribute('class') == 'buttonMinus') {
+                    anchors[i].setAttribute('onclick',"UnCloneField('" + new_id + "')");
                 }
             }
         }
@@ -810,8 +810,8 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
                 <!-- TMPL_VAR NAME="marc_value" -->
                 
                 <!-- TMPL_IF NAME="repeatable" -->
-                    <span class="subfield_controls"><a href="#" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->'); return false;"><img src="/intranet-tmpl/prog/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /></a>
-                                        <a href="#" onclick="UnCloneField('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->'); return false;"><img src="/intranet-tmpl/prog/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /></a></span>
+                    <span class="subfield_controls"><a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->'); return false;"><img src="/intranet-tmpl/prog/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /></a>
+                                        <a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->'); return false;"><img src="/intranet-tmpl/prog/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /></a></span>
                 <!-- /TMPL_IF -->
 
                 
index d0bc350..cf1625f 100644 (file)
@@ -12,6 +12,4 @@
 
 <p>It is a good idea to be selective in choosing servers. Defining more than five or six checked servers may slow down your Z39.50 search results, even if they are queried all together.</p>
 
-<p>IMPORTANT NOTE : the z3950search will NOT work until your system administrator has not activated the z3950 client daemon on your server. The daemon is in KohaDirectory/script/z3950daemon. It should be added to rc.d to be launched during server boot.</p>
-
 <!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file
index 094e375..86d1baf 100644 (file)
@@ -11,7 +11,7 @@
         <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF -->
       <!-- /TMPL_LOOP --></select></li>
    <li><label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
-        <option value="">Any</option><!-- TMPL_LOOP name="categoryloop" -->
+        <option value="">Any</option><!-- TMPL_LOOP name="categories" -->
         <!-- TMPL_IF NAME="selected" -->
         <option value="<!-- TMPL_VAR name="categorycode" -->" selected="selected"><!-- TMPL_VAR name="description" --></option><!-- TMPL_ELSE -->
         <option value="<!-- TMPL_VAR name="categorycode" -->"><!-- TMPL_VAR name="description" --></option><!-- /TMPL_IF -->
index 62ee69a..547668a 100644 (file)
@@ -100,7 +100,7 @@ function placeHold () {
                }
 
                if (_alertString.length==0) {
-                       document.Aform.submit();
+            document.f.submit();
                } else {
                        alertString2 = _("Form not submitted because of the following problem(s)");
                        alertString2 += "\n------------------------------------------------------------------------------------\n\n";
index 0067cef..4756615 100644 (file)
             <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
         </xsl:for-each>
 
-        <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+        <xsl:for-each select="marc:datafield[@tag=490]">
              <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
                         <xsl:call-template name="chopPunctuation">
                             <xsl:with-param name="chopString">
                 <xsl:call-template name="chopPunctuation">
                   <xsl:with-param name="chopString">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">bcg</xsl:with-param>
+                        <xsl:with-param name="codes">abcg</xsl:with-param>
                     </xsl:call-template>
                    </xsl:with-param>
                </xsl:call-template>
             <xsl:call-template name="chopPunctuation">
                 <xsl:with-param name="chopString">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
+                        <xsl:with-param name="codes">abcdtvxyz</xsl:with-param>
                         <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
                         <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
                     </xsl:call-template>
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT-32px.png
new file mode 100644 (file)
index 0000000..d6dab68
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT.png
new file mode 100644 (file)
index 0000000..70104c3
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ACT.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY-32px.png
new file mode 100644 (file)
index 0000000..f87bc92
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY.png
new file mode 100644 (file)
index 0000000..e8423d9
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BLURAY.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK-32px.png
new file mode 100644 (file)
index 0000000..c0aaad5
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK.png
new file mode 100644 (file)
index 0000000..b6fe7ac
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BOOK.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-32px.png
new file mode 100644 (file)
index 0000000..c0aaad5
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-CD-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-CD-32px.png
new file mode 100644 (file)
index 0000000..771b5af
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-CD-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-Tape-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-Tape-32px.png
new file mode 100644 (file)
index 0000000..74316bf
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book-On-Tape-32px.png differ
index 4349222..b6fe7ac 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Book.png differ
index 159ebf1..8f01d47 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BookOnCD.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BookOnCD.png differ
index ecbec62..ead4780 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BookOnTape.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/BookOnTape.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD-32px.png
new file mode 100644 (file)
index 0000000..e2ffa3f
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD-32px.png differ
index 96f7952..7fc4e05 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DVD.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Download-Audio-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Download-Audio-32px.png
new file mode 100644 (file)
index 0000000..22a5921
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Download-Audio-32px.png differ
index f71571b..2a19282 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DownloadableAudio.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/DownloadableAudio.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC-32px.png
new file mode 100644 (file)
index 0000000..6b012cc
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC.png
new file mode 100644 (file)
index 0000000..542beae
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EDUC.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP-32px.png
new file mode 100644 (file)
index 0000000..3ab531d
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP.png
new file mode 100644 (file)
index 0000000..f4c9271
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/EQUIP.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC-32px.png
new file mode 100644 (file)
index 0000000..cf30598
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC.png
new file mode 100644 (file)
index 0000000..218a1bf
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/FIC.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY-32px.png
new file mode 100644 (file)
index 0000000..87615d3
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY.png
new file mode 100644 (file)
index 0000000..3e231a8
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/HOLIDAY.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware-32px.png
new file mode 100644 (file)
index 0000000..8342d47
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware.png
new file mode 100644 (file)
index 0000000..c77cb44
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Hardware.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL-32px.png
new file mode 100644 (file)
index 0000000..da751ce
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL.png
new file mode 100644 (file)
index 0000000..4574284
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/ILL.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit-32px.png
new file mode 100644 (file)
index 0000000..722fb7f
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit.png
new file mode 100644 (file)
index 0000000..939613c
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word-32px.png
new file mode 100644 (file)
index 0000000..722fb7f
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word-32px.png differ
index 530e3d5..939613c 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Kit_Bag_Word.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint-32px.png
new file mode 100644 (file)
index 0000000..bca3572
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint-32px.png differ
index b411764..d86060b 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/LargePrint.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass-32px.png
new file mode 100644 (file)
index 0000000..2bed6c7
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass-32px.png differ
index 11e9427..4963df5 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/MuseumPass.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music-32px.png
new file mode 100644 (file)
index 0000000..53b2dde
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music-32px.png differ
index cbb80fb..5f16fc5 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Music.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK-32px.png
new file mode 100644 (file)
index 0000000..5d9af0d
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK.png
new file mode 100644 (file)
index 0000000..0bf4fc5
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NEWBK.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC-32px.png
new file mode 100644 (file)
index 0000000..e5bb95e
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC.png
new file mode 100644 (file)
index 0000000..62fac2b
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/NFIC.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical-32px.png
new file mode 100644 (file)
index 0000000..71d6aab
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical-32px.png differ
index ec73ed7..4ee997d 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Periodical.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway-32px.png
new file mode 100644 (file)
index 0000000..1aac44e
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway-32px.png differ
index 496973e..9c27cf8 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/PlayAway.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference-32px.png
new file mode 100644 (file)
index 0000000..7ac5f9b
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference-32px.png differ
index e9b6267..426ca1c 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Reference.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special-32px.png
new file mode 100644 (file)
index 0000000..2bed6c7
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special-32px.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special.png
new file mode 100644 (file)
index 0000000..4963df5
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/Special.png differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS-32px.png b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS-32px.png
new file mode 100644 (file)
index 0000000..183b8bf
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS-32px.png differ
index 2ab763f..a376ef8 100644 (file)
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS.png and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/vokal/VHS.png differ
index bb2078a..b79ddab 100644 (file)
@@ -122,7 +122,7 @@ $(function() {
                }
 
                if (_alertString.length==0) {
-                       document.Aform.submit();
+                       document.f.submit();
                } else {
                        alertString2 = _("Form not submitted because of the following problem(s)");
                        alertString2 += "\n------------------------------------------------------------------------------------\n\n";
index 3572379..95d3303 100755 (executable)
             <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
         </xsl:for-each>
 
-        <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+        <xsl:for-each select="marc:datafield[@tag=490]">
              <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
                         <xsl:call-template name="chopPunctuation">
                             <xsl:with-param name="chopString">
                 <xsl:call-template name="chopPunctuation">
                   <xsl:with-param name="chopString">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">bcg</xsl:with-param>
+                        <xsl:with-param name="codes">abcg</xsl:with-param>
                     </xsl:call-template>
                    </xsl:with-param>
                </xsl:call-template>
             <xsl:call-template name="chopPunctuation">
                 <xsl:with-param name="chopString">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
+                        <xsl:with-param name="codes">abcdtvxyz</xsl:with-param>
                         <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
                         <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
                     </xsl:call-template>
index 65e14e5..aaa702a 100644 (file)
     <span class="label">Publisher: </span> 
             <xsl:for-each select="marc:datafield[@tag=260]">
                     <xsl:call-template name="subfieldSelect">
-                        <xsl:with-param name="codes">bcg</xsl:with-param>
+                        <xsl:with-param name="codes">abcg</xsl:with-param>
                     </xsl:call-template>
             </xsl:for-each>
        </span>
             </xsl:for-each>
        </span>
     </xsl:if>
-
-    <span class="results_summary">
-                          <span class="label">Availability: </span>
-                               <xsl:choose>
-                        <xsl:when test="marc:datafield[@tag=856]">
+    <xsl:if test="marc:datafield[@tag=856]">
+         <span class="results_summary">
+                          <span class="label">Online Access: </span>
                             <xsl:for-each select="marc:datafield[@tag=856]">
                             <xsl:if test="$OPACURLOpenInNewWindow='0'">
                                    <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
                                     </a>
                               </xsl:if>
                                     <xsl:choose>
-                                    <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
+                                    <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
                                     <xsl:otherwise> | </xsl:otherwise>
                                     </xsl:choose>
                             </xsl:for-each>
-                        </xsl:when>
-
-
+                            </span>
+                        </xsl:if>
+                        <span class="results_summary">
+                        <span class="label">Availability: </span>
+                        <xsl:choose>
                                   <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0">No copies available
                                   </xsl:when>
                    <xsl:when test="count(key('item-by-status', 'available'))>0">
                            select="key('item-by-status', 'available')"/>
                        <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
                            <xsl:value-of select="items:homebranch"/>
-                                                  <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                                                  <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
                            <xsl:text> (</xsl:text>
                            <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
                            <xsl:text>)</xsl:text>
                            select="key('item-by-status', 'reference')"/>
                        <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
                            <xsl:value-of select="items:homebranch"/>
-                                                  <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                                                  <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
                            <xsl:text> (</xsl:text>
                            <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
                            <xsl:text>)</xsl:text>
index 26aed37..69e5cf6 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
   xmlns:items="http://www.koha.org/items"
index 6917ca2..1290e94 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
   xmlns:items="http://www.koha.org/items"
index ce7f459..f5cf99f 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version='1.0'?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
   <xsl:template name="datafield">
     </xsl:if>
   </xsl:template>
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT-32px.png
new file mode 100644 (file)
index 0000000..d6dab68
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT.png
new file mode 100644 (file)
index 0000000..70104c3
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ACT.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY-32px.png
new file mode 100644 (file)
index 0000000..f87bc92
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY.png
new file mode 100644 (file)
index 0000000..e8423d9
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BLURAY.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK-32px.png
new file mode 100644 (file)
index 0000000..c0aaad5
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK.png
new file mode 100644 (file)
index 0000000..b6fe7ac
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BOOK.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-32px.png
new file mode 100644 (file)
index 0000000..c0aaad5
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-CD-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-CD-32px.png
new file mode 100644 (file)
index 0000000..771b5af
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-CD-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-Tape-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-Tape-32px.png
new file mode 100644 (file)
index 0000000..74316bf
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book-On-Tape-32px.png differ
index 4349222..b6fe7ac 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Book.png differ
index 159ebf1..8f01d47 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BookOnCD.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BookOnCD.png differ
index ecbec62..ead4780 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BookOnTape.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/BookOnTape.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD-32px.png
new file mode 100644 (file)
index 0000000..e2ffa3f
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD-32px.png differ
index 96f7952..7fc4e05 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DVD.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Download-Audio-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Download-Audio-32px.png
new file mode 100644 (file)
index 0000000..22a5921
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Download-Audio-32px.png differ
index f71571b..2a19282 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DownloadableAudio.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/DownloadableAudio.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC-32px.png
new file mode 100644 (file)
index 0000000..6b012cc
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC.png
new file mode 100644 (file)
index 0000000..542beae
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EDUC.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP-32px.png
new file mode 100644 (file)
index 0000000..3ab531d
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP.png
new file mode 100644 (file)
index 0000000..f4c9271
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/EQUIP.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC-32px.png
new file mode 100644 (file)
index 0000000..cf30598
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC.png
new file mode 100644 (file)
index 0000000..218a1bf
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/FIC.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY-32px.png
new file mode 100644 (file)
index 0000000..87615d3
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY.png
new file mode 100644 (file)
index 0000000..3e231a8
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/HOLIDAY.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware-32px.png
new file mode 100644 (file)
index 0000000..8342d47
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware.png
new file mode 100644 (file)
index 0000000..c77cb44
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Hardware.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL-32px.png
new file mode 100644 (file)
index 0000000..da751ce
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL.png
new file mode 100644 (file)
index 0000000..4574284
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/ILL.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit-32px.png
new file mode 100644 (file)
index 0000000..722fb7f
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit.png
new file mode 100644 (file)
index 0000000..939613c
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word-32px.png
new file mode 100644 (file)
index 0000000..722fb7f
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word-32px.png differ
index 530e3d5..939613c 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Kit_Bag_Word.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint-32px.png
new file mode 100644 (file)
index 0000000..bca3572
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint-32px.png differ
index b411764..d86060b 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/LargePrint.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass-32px.png
new file mode 100644 (file)
index 0000000..2bed6c7
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass-32px.png differ
index 11e9427..4963df5 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/MuseumPass.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music-32px.png
new file mode 100644 (file)
index 0000000..53b2dde
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music-32px.png differ
index cbb80fb..5f16fc5 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Music.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK-32px.png
new file mode 100644 (file)
index 0000000..5d9af0d
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK.png
new file mode 100644 (file)
index 0000000..0bf4fc5
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NEWBK.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC-32px.png
new file mode 100644 (file)
index 0000000..e5bb95e
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC.png
new file mode 100644 (file)
index 0000000..62fac2b
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/NFIC.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical-32px.png
new file mode 100644 (file)
index 0000000..71d6aab
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical-32px.png differ
index ec73ed7..4ee997d 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Periodical.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway-32px.png
new file mode 100644 (file)
index 0000000..1aac44e
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway-32px.png differ
index 496973e..9c27cf8 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/PlayAway.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference-32px.png
new file mode 100644 (file)
index 0000000..7ac5f9b
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference-32px.png differ
index e9b6267..426ca1c 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Reference.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special-32px.png
new file mode 100644 (file)
index 0000000..2bed6c7
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special-32px.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special.png
new file mode 100644 (file)
index 0000000..4963df5
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/Special.png differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS-32px.png b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS-32px.png
new file mode 100644 (file)
index 0000000..183b8bf
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS-32px.png differ
index 2ab763f..a376ef8 100644 (file)
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS.png and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/vokal/VHS.png differ
index 607e873..1108726 100755 (executable)
@@ -114,6 +114,7 @@ foreach my $item (@{$items}) {
                                         format_string       => $layout->get_attr('format_string'),
                                         text_wrap_cols      => $layout->get_text_wrap_cols(label_width => $template->get_attr('label_width'), left_text_margin => $template->get_attr('left_text_margin')),
                                           );
+        $pdf->Add($label_a->draw_guide_box) if $layout->get_attr('guidebox');
         my $label_a_text = $label_a->create_label();
         _print_text($label_a_text);
         ($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly);
@@ -136,6 +137,7 @@ foreach my $item (@{$items}) {
                                         format_string       => $layout->get_attr('format_string'),
                                         text_wrap_cols      => $layout->get_text_wrap_cols(label_width => $template->get_attr('label_width'), left_text_margin => $template->get_attr('left_text_margin')),
                                           );
+        $pdf->Add($label_b->draw_guide_box) if $layout->get_attr('guidebox');
         my $label_b_text = $label_b->create_label();
         ($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly);
         next LABEL_ITEMS;
@@ -161,6 +163,7 @@ foreach my $item (@{$items}) {
                                         format_string       => $layout->get_attr('format_string'),
                                         text_wrap_cols      => $layout->get_text_wrap_cols(label_width => $template->get_attr('label_width'), left_text_margin => $template->get_attr('left_text_margin')),
                                           );
+        $pdf->Add($label->draw_guide_box) if $layout->get_attr('guidebox');
         my $label_text = $label->create_label();
         _print_text($label_text) if $label_text;
         ($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly);
index a1879af..470092d 100755 (executable)
@@ -122,15 +122,15 @@ elsif  ($op eq 'save') {
         $cgi->param('format_string', $format_string);
     }
     my @params = (
-                    barcode_type    => $cgi->param('barcode_type'),
-                    printing_type   => $cgi->param('printing_type'),
-                    layout_name     => $cgi->param('layout_name'),
+                    barcode_type    => $cgi->param('barcode_type') || 'CODE39',
+                    printing_type   => $cgi->param('printing_type') || 'BAR',
+                    layout_name     => $cgi->param('layout_name') || 'DEFAULT',
                     guidebox        => ($cgi->param('guidebox') ? 1 : 0),
-                    font            => $cgi->param('font'),
-                    font_size       => $cgi->param('font_size'),
+                    font            => $cgi->param('font') || 'TR',
+                    font_size       => $cgi->param('font_size') || 3,
                     callnum_split   => ($cgi->param('callnum_split') ? 1 : 0),
-                    text_justify    => $cgi->param('text_justify'),
-                    format_string   => $cgi->param('format_string'),
+                    text_justify    => $cgi->param('text_justify') || 'L',
+                    format_string   => $cgi->param('format_string') || 'title, author, isbn, issn, itemtype, barcode, callnumber',
     );
     if ($layout_id) {   # if a label_id was passed in, this is an update to an existing layout
         $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id);
index baaeb8a..b114554 100755 (executable)
@@ -54,13 +54,13 @@ if ($op eq 'edit') {
 }
 elsif ($op eq 'save') {
     my @params = (
-        printer_name        => $cgi->param('printer_name'),
-        paper_bin           => $cgi->param('paper_bin'),
-        offset_horz         => $cgi->param('offset_horz'),
-        offset_vert         => $cgi->param('offset_vert'),
-        creep_horz          => $cgi->param('creep_horz'),
-        creep_vert          => $cgi->param('creep_vert'),
-        units               => $cgi->param('units'),
+        printer_name        => $cgi->param('printer_name') || 'DEFAULT PRINTER',
+        paper_bin           => $cgi->param('paper_bin') || 'Tray 1',
+        offset_horz         => $cgi->param('offset_horz') || 0,
+        offset_vert         => $cgi->param('offset_vert') || 0,
+        creep_horz          => $cgi->param('creep_horz') || 0,
+        creep_vert          => $cgi->param('creep_vert') || 0,
+        units               => $cgi->param('units') || 'POINT',
     );
     if ($profile_id) {   # if a label_id was passed in, this is an update to an existing layout
         $profile = C4::Labels::Profile->retrieve(profile_id => $profile_id);
index a645fee..f0a6ab0 100755 (executable)
@@ -53,21 +53,21 @@ if ($op eq 'edit') {
 }
 elsif ($op eq 'save') {
     my @params = (      profile_id      => $cgi->param('profile_id') || '',
-                        template_code   => $cgi->param('template_code'),
-                        template_desc   => $cgi->param('template_desc'),
-                        page_width      => $cgi->param('page_width'),
-                        page_height     => $cgi->param('page_height'),
-                        label_width     => $cgi->param('label_width'),
-                        label_height    => $cgi->param('label_height'),
-                        top_text_margin => $cgi->param('top_text_margin'),
-                        left_text_margin=> $cgi->param('left_text_margin'),
-                        top_margin      => $cgi->param('top_margin'),
-                        left_margin     => $cgi->param('left_margin'),
-                        cols            => $cgi->param('cols'),
-                        rows            => $cgi->param('rows'),
-                        col_gap         => $cgi->param('col_gap'),
-                        row_gap         => $cgi->param('row_gap'),
-                        units           => $cgi->param('units'),
+                        template_code   => $cgi->param('template_code') || 'DEFAULT_TEMPLATE',
+                        template_desc   => $cgi->param('template_desc') || 'Default description',
+                        page_width      => $cgi->param('page_width') || 0,
+                        page_height     => $cgi->param('page_height') || 0,
+                        label_width     => $cgi->param('label_width') || 0,
+                        label_height    => $cgi->param('label_height') || 0,
+                        top_text_margin => $cgi->param('top_text_margin') || 0,
+                        left_text_margin=> $cgi->param('left_text_margin') || 0,
+                        top_margin      => $cgi->param('top_margin') || 0,
+                        left_margin     => $cgi->param('left_margin') || 0,
+                        cols            => $cgi->param('cols') || 0,
+                        rows            => $cgi->param('rows') || 0,
+                        col_gap         => $cgi->param('col_gap') || 0,
+                        row_gap         => $cgi->param('row_gap') || 0,
+                        units           => $cgi->param('units') || 'POINT',
                         );
     if ($template_id) {   # if a label_id was passed in, this is an update to an existing layout
         $label_template = C4::Labels::Template->retrieve(template_id => $template_id);
index dde29eb..755a051 100755 (executable)
@@ -99,7 +99,7 @@ if ($results){
        $count =scalar(@$results);
 }
 my @resultsdata;
-my $to=($count>$to?$to:$count);
+$to=($count>$to?$to:$count);
 my $index=$from;
 foreach my $borrower(@$results[$from..$to-1]){
   #find out stats
index 6ec6d8e..eacb2ff 100755 (executable)
@@ -247,7 +247,7 @@ if ($op eq 'save' || $op eq 'insert'){
     }
   }
   
-    if(C4::Context->preference('uppercasesurnames')) {
+    if($newdata{surname} && C4::Context->preference('uppercasesurnames')) {
         $newdata{'surname'} = uc($newdata{'surname'});
     }
 
index 20481f5..f811b24 100755 (executable)
@@ -38,21 +38,27 @@ use Getopt::Long;
 sub usage {
     print STDERR <<USAGE;
 Usage: $0 [-h|--help] [--sessions] [-v|--verbose] [--zebraqueue DAYS]
-   -h --help         prints this help message, and exits, ignoring all other options
-   --sessions        purge the sessions table.  If you use this while users are logged
-                     into Koha, they will have to reconnect.
-   -v --verbose      will cause the script to give you a bit more information about the run.
-   --zebraqueue DAYS purge completed entries from the zebraqueue from more than DAYS days ago.
+        [-m|--mail]
+   -h --help          prints this help message, and exits, ignoring all
+                      other options
+   --sessions         purge the sessions table.  If you use this while users 
+                      are logged into Koha, they will have to reconnect.
+   -v --verbose       will cause the script to give you a bit more information
+                      about the run.
+   --zebraqueue DAYS  purge completed entries from the zebraqueue from 
+                      more than DAYS days ago.
+   -m --mail          purge the mail queue. 
 USAGE
     exit $_[0];
 }
 
-my ($help, $sessions, $verbose, $zebraqueue_days);
+my ($help, $sessions, $verbose, $zebraqueue_days, $mail);
 
 GetOptions(
-    'h|help' => \$help,
-    'sessions' => \$sessions,
+    'h|help'    => \$help,
+    'sessions'  => \$sessions,
     'v|verbose' => \$verbose,
+    'm|mail'    => \$mail,
     'zebraqueue:i' => \$zebraqueue_days,
 ) || usage(1);
 
@@ -60,7 +66,7 @@ if ($help) {
     usage(0);
 }
 
-if (!($sessions || $zebraqueue_days)){
+if (!($sessions || $zebraqueue_days || $mail)){
     print "You did not specify any cleanup work for the script to do.\n\n";
     usage(1);
 }
@@ -103,4 +109,16 @@ if ($zebraqueue_days){
         print "$count records were deleted.\nDone with zebraqueue purge.\n";
     }
 }
+
+if ($mail) {
+    if ($verbose) {
+        $sth = $dbh->prepare("SELECT COUNT(*) FROM message_queue");
+        $sth->execute() or die $dbh->errstr;
+        my @count_arr = $sth->fetchrow_array;
+        print "Deleting $count_arr[0] entries from the mail queue.\n";
+    }
+    $sth = $dbh->prepare("TRUNCATE message_queue");
+    $sth->execute() or $dbh->errstr;
+    print "Done with purging the mail queue.\n" if ($verbose);
+}
 exit(0);
index 4de6cdd..761644a 100755 (executable)
@@ -103,6 +103,12 @@ Produces CSV data. if -n (no mail) flag is set, then this CSV data is
 sent to standard out or to a filename if provided. Otherwise, only
 overdues that could not be emailed are sent in CSV format to the admin.
 
+=item B<-html>
+
+Produces html data. if patron does not have a mail address or
+-n (no mail) flag is set, an html file is generated in the specified
+directory. This can be downloaded or futher processed by library staff.
+
 =item B<-itemscontent>
 
 comma separated list of fields that get substituted into templates in
@@ -662,10 +668,7 @@ sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:pa
                 $item_format = $1;
             }
             if ($params->{'letter'}->{'content'} =~ m/<fine>(.*)<\/fine>/) { # process any fine tags...
-                no strict; # currency_format behaves badly if we quote the bareword for some reason...
                 my $formatted_fine = currency_format("$1", "$fine", FMT_SYMBOL);
-                use strict;
-                $formatted_fine = Encode::encode("utf8", $formatted_fine);
                 $params->{'letter'}->{'content'} =~ s/<fine>.*<\/fine>/$formatted_fine/;
             }
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio',      $item );
index 37dcaf5..239d953 100755 (executable)
@@ -16,7 +16,9 @@ use C4::AuthoritiesMarc;
 #
 
 $|=1; # flushes output
-
+# If the cron job starts us in an unreadable dir, we will break without
+# this.
+chdir $ENV{HOME} if (!(-r '.'));
 my $directory;
 my $nosanitize;
 my $skip_export;
index af0cde1..b916cab 100755 (executable)
@@ -116,6 +116,8 @@ sub text_replace (**) {
         }
         }
     } elsif (defined $t) {
+        # Quick fix to bug 4472
+        $t = "<!DOCTYPE stylesheet ["  if $t =~ /DOCTYPE stylesheet/ ;
         print $output $t;
     }
     }
index b04e662..8cbd239 100755 (executable)
@@ -42,7 +42,7 @@ sub AddBibliosToShelf {
         @biblionumber = (split /\//,$biblionumber[0]);
     }
     for my $bib (@biblionumber){
-        AddToShelfFromBiblio($bib, $shelfnumber);
+        AddToShelf($bib, $shelfnumber);
     }
 }
 
index b6538fe..7324d59 100755 (executable)
@@ -93,9 +93,6 @@ if ($op eq 'del') {
     }
 }
 my $hasRouting = check_routing($subscriptionid);
-my ($totalissues,@serialslist) = GetSerials($subscriptionid);
-$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
-# the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...)
 
 my ($user, $sessionID, $flags);
 ($user, $cookie, $sessionID, $flags)
index 4810833..4e67ee8 100755 (executable)
@@ -55,10 +55,10 @@ BEGIN {
       '"YES"',   \&f, 'OK:1', 'YES'    # verify case insensitivity
 
    # Illegal strings
-#   ], [
-#      'undef',   \&f, C4::Boolean::INVALID_BOOLEAN_STRING_EXCEPTION, undef
-#   ], [
-#      '"foo"',   \&f, C4::Boolean::INVALID_BOOLEAN_STRING_EXCEPTION, 'foo'
+   ], [
+      'undef',   \&f, 'OK:', undef
+   ], [
+      '"foo"',   \&f, 'OK:', 'foo'
    ],
 );
 }
index f4ba20f..c06a406 100755 (executable)
--- a/t/Koha.t
+++ b/t/Koha.t
@@ -1,19 +1,15 @@
-BEGIN { $| = 1; print "1..2\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use C4::Koha;
-$loaded = 1;
-print "ok 1\n";
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+use Test::More tests => 2;
+
+use_ok('C4::Koha');
 
 #
 # test that &slashifyDate returns correct (non-US) date
 #
-$date = "01/01/2002";
-$newdate = &slashifyDate("2002-01-01");
-
-if ($date eq $newdate) {
-    print "ok 2\n";
-} else {
-    print "not ok 2\n";
-}
-
+my $date = "01/01/2002";
+my $newdate = &slashifyDate("2002-01-01");
 
+ok($date eq $newdate, 'slashifyDate');
diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t
deleted file mode 100755 (executable)
index dcfea53..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/perl
-#
-# This Koha test module is a stub!  
-# Add more tests here!!!
-
-use strict;
-use warnings;
-
-use Test::More tests => 6;
-
-BEGIN {
-       use FindBin;
-       use lib $FindBin::Bin;
-       use override_context_prefs;
-        use_ok('C4::Auth', qw(checkpw));
-        use_ok('C4::Context');
-}
-
-use vars qw($dbh $ldap);
-can_ok('C4::Context', 'config');
-can_ok('C4::Context', 'dbh');
-can_ok('C4::Auth', qw(checkpw));
-    ok($dbh  = C4::Context->dbh(),  "Getting dbh from C4::Context");
-$ldap = C4::Context->config('useldapserver') || 0;
-diag("Using LDAP? $ldap");
-
-while (1) {            # forever!
-       print "Do you want to test further accounts? (If not, just hit return.)\n";
-       my ($user, $pass);
-       print "Enter username: ";
-       chomp($user = <>);
-       ($user) or exit;
-       print "Enter password: ";
-       chomp($pass = <>);
-       my ($retval,$retcard) = checkpw($dbh,$user,$pass);
-       $retval  ||= '';
-       $retcard ||= '';
-       diag ("checkpw(\$dbh,$user,$pass) " . ($retval ? 'SUCCEEDS' : ' FAILS  ') . "\treturns ($retval,$retcard)");
-}
-
-END {
-       diag("C4::Auth - end of test");
-}
-__END__
diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t
deleted file mode 100755 (executable)
index 9615151..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/perl
-#
-
-use strict;
-use warnings;
-
-use Test::More;
-use vars qw(%cases $dbh $config $context $ldap);
-
-BEGIN {
-       %cases = (
-               # users from t/LDAP/example3.ldif
-               sss => 'password1',
-               jts => 'password1',
-               rch => 'password2',
-               jmf => 'password3',
-       );
-       plan tests => 8 + scalar(keys %cases);
-       use_ok('C4::Context');
-       use_ok('C4::Auth_with_ldap', qw(checkpw_ldap));
-}
-
-sub do_checkpw_ldap (;$$) { 
-       my ($user,$pass) = (shift,shift);
-       diag "($user,$pass)";
-       my $ret;
-       return ($ret = checkpw_ldap($dbh,$user,$pass), sprintf("(%s,%s) returns '%s'",$user,$pass,$ret));
-}
-
-ok($context= C4::Context->new(),       "Getting new C4::Context object");
-ok($dbh    = C4::Context->dbh(),       "Getting dbh from C4::Context");
-ok($dbh    = $context->dbh(),          "Getting dbh from \$context object");
-
-$ldap = $ENV{KOHA_USELDAPSERVER};
-if(defined($ldap)) {
-    diag "Overriding KOHA_CONF <useldapserver> with \$ENV{KOHA_USELDAPSERVER} = $ldap";
-} else {
-    diag 'Note: You can use $ENV{KOHA_USELDAPSERVER} to override KOHA_CONF <useldapserver> for this test';
-    $ldap = C4::Context->config('useldapserver');
-}
-ok(defined($ldap), "Checking if \$ENV{KOHA_USELDAPSERVER} or <useldapserver> is defined");
-
-SKIP: {
-    $ldap or skip("LDAP is disabled.", scalar(keys %cases) + 2);
-    diag("The basis of Authentication is that we don't auth everybody.");
-    diag("Let's make sure we reject on bad calls.");
-    my $ret;
-    ok(!($ret = checkpw_ldap($dbh)),       "should reject (  no  arguments) returns '$ret'");
-    ok(!($ret = checkpw_ldap($dbh,'','')), "should reject (empty arguments) returns '$ret'");
-    print "\n";
-    diag("Now let's check " . scalar(keys %cases) . " test cases: ");
-    foreach (sort keys %cases) {
-        ok do_checkpw_ldap($_, $cases{$_});
-    }
-}
-1;
index 7d5732f..6ec8b57 100755 (executable)
@@ -1,12 +1,11 @@
 use strict;
 use warnings;
-use Test::More tests=>18;
+use Test::More tests=>17;
 
 BEGIN {use_ok('C4::Budgets') }
 use C4::Budgets;
 use C4::Dates;
 
-print "ok 1\n";
 use YAML;
 
 #
@@ -23,21 +22,6 @@ ok($bpid=AddBudgetPeriod(
                                                , budget_description            => "MAPERI"}),
        "AddBudgetPeriod with iso dates OK");
 
-if (C4::Context->preference('dateformat') eq "metric"){
-       ok($bpid=AddBudgetPeriod(
-                                               { budget_period_startdate       => '01-01-2008'
-                                               , budget_period_enddate         => '31-12-2008'
-                                               , budget_description            => "MAPERI"}),
-       "AddBudgetPeriod returned $bpid");
-} 
-elsif (C4::Context->preference('dateformat') eq "us"){
-       ok($bpid=AddBudgetPeriod(
-                                               { budget_period_startdate       => '01-01-2008'
-                                               , budget_period_enddate         => '12-31-2008'
-                                               , budget_description            => "MAPERI"}),
-       "AddBudgetPeriod returned $bpid");
-}
-
 ok($budgetperiod=GetBudgetPeriod($bpid),
        "GetBudgetPeriod($bpid) returned ".Dump($budgetperiod));
 ok(!GetBudgetPeriod(0) ,"GetBudgetPeriod(0) returned undef : noactive BudgetPeriod");
@@ -95,7 +79,6 @@ ok($budget_id=AddBudget(
 #| budget_encumb          | decimal(28,6) | YES  |     | 0.000000          |       | 
 #| budget_expend          | decimal(28,6) | YES  |     | 0.000000          |       | 
 #| budget_notes           | mediumtext    | YES  |     | NULL              |       | 
-#| budget_description     | mediumtext    | YES  |     | NULL              |       | 
 #| timestamp              | timestamp     | NO   |     | CURRENT_TIMESTAMP |       | 
 #| budget_period_id       | int(11)       | YES  | MUL | NULL              |       | 
 #| sort1_authcat          | varchar(80)   | YES  |     | NULL              |       | 
@@ -111,9 +94,9 @@ ok(GetBudgets()>0,
        "GetBudgets OK");
 ok(GetBudgets({budget_period_id=>$bpid})>0,
        "GetBudgets With Filter OK");
-ok(GetBudgets({budget_period_id=>$bpid},{"budget_description"=>0})>0,
+ok(GetBudgets({budget_period_id=>$bpid},[{"budget_name"=>0}])>0,
        "GetBudgets With Order OK");
-ok(GetBudgets({budget_period_id=>GetBudgetPeriod(0)->{budget_period_id}},{"budget_description"=>0})>0,
+ok(GetBudgets({budget_period_id=>GetBudgetPeriod($bpid)->{budget_period_id}},[{"budget_name"=>0}])>0,
        "GetBudgets With Order 
        Getting Active budgetPeriod OK");
 ok($del_status=DelBudget($budget_id),
index 31b0684..eac3265 100755 (executable)
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 91;
+use Test::More;
 use vars qw($debug $koha $dbh $config $ret);
 
 BEGIN {
@@ -42,8 +42,6 @@ foreach (grep {defined $koha->{$_}} sort @keys) {
 }
 ok($config = $koha->{config}, 'Getting $koha->{config} ');
 
-# diag("Examining configuration.");
-diag("Note: The overall number of tests may vary by configuration.  Disregard the projected number.");
-1;
-__END__
+done_testing();
 
+1;
index 524b4f7..b61f4de 100644 (file)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 22;
+use Test::More tests => 23;
 use C4::Context;
 use Data::Dumper;
 
@@ -33,6 +33,7 @@ $sth->execute();
 my $branch_code = $sth->fetchrow_hashref()->{'branchcode'};
 diag sprintf('Database returned the following error: %s', $sth->errstr) if $sth->errstr;
 my $expected_batch = {
+        creator         => 'Labels',
         items           => [],
         branch_code     => $branch_code,
         batch_stat      => 0,   # False if any data has changed and the db has not been updated
index 1ba618e..462f056 100644 (file)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 28;
+use Test::More tests => 36;
 use C4::Context;
 use Data::Dumper;
 
@@ -29,6 +29,10 @@ BEGIN {
 }
 
 my $default_layout = {
+        creator         =>      'Labels',
+        layout_xml      =>      '',
+        units           =>      'POINT',
+        start_label     =>      1,
         barcode_type    =>      'CODE39',
         printing_type   =>      'BAR',
         layout_name     =>      'TEST',
@@ -53,6 +57,10 @@ foreach my $key (keys %{$default_layout}) {
 
 diag "Testing Layout->set_attr() method.";
 my $new_attr = {
+        creator         =>      'Labels',
+        layout_xml      =>      '',
+        units           =>      'POINT',
+        start_label     =>      1,
         barcode_type    =>      'CODE39',
         printing_type   =>      'BIBBAR',
         layout_name     =>      'TEST',
@@ -97,4 +105,4 @@ ok($updated_layout->get_text_wrap_cols(label_width => 180, left_text_margin => 1
 diag "Testing Layout->delete() method.";
 
 my $del_results = $updated_layout->delete();
-ok($del_results eq 0) || diag "Layout->delete() FAILED";
+ok($del_results ne -1) || diag "Layout->delete() FAILED";
index 368f358..e46c901 100644 (file)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 25;
+use Test::More tests => 27;
 use C4::Context;
 use Data::Dumper;
 
@@ -29,6 +29,7 @@ BEGIN {
 }
 
 my $expected_profile = {
+        creator         => 'Labels',
         printer_name    => 'Circulation Desk',
         template_id     => '',
         paper_bin       => 'bypass',
@@ -60,6 +61,7 @@ my $new_attr = {
     creep_horz      => 0.156,
     creep_vert      => 0.67,
     units           => 'INCH',
+    creator         => 'Labels',
 };
 
 foreach my $key (keys %{$new_attr}) {
index bd57a23..9c5d276 100644 (file)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 52;
+use Test::More tests => 54;
 use C4::Context;
 use Data::Dumper;
 
@@ -29,6 +29,7 @@ BEGIN {
 }
 
 my $expect_template = {
+        creator         =>      'Labels',
         profile_id      =>      0,
         template_code   =>      'DEFAULT TEMPLATE',
         template_desc   =>      'Default description',
@@ -61,6 +62,7 @@ foreach my $key (keys %{$expect_template}) {
 
 diag "Testing Template->set_attr() method.";
 my $new_attr = {
+    creator             => 'Labels',
     profile_id          => 0,
     template_code       => 'Avery 5160 | 1 x 2-5/8',
     template_desc       => '3 columns, 10 rows of labels',
diff --git a/t/db_dependent/Patroncards/t_Patroncards.t b/t/db_dependent/Patroncards/t_Patroncards.t
deleted file mode 100644 (file)
index b3b737a..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright 2009 Foundations Bible College.
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-## NOTE: This is really broken at this point and needs updating... -chris_n
-
-use strict;
-use warnings;
-
-#use Test::More;
-use Graphics::Magick;
-use XML::Simple;
-use autouse 'Data::Dumper' => qw(Dumper);
-
-use C4::Context;
-use autouse 'C4::Members' => qw(GetPatronImage);
-use C4::Creators::PDF 1.000000;
-use C4::Patroncards::Patroncard 1.000000;
-
-#BEGIN {
-#    use_ok('C4::Patroncards::Patroncard');
-#}
-
-my $borrower_number = 3;
-my $pdf = C4::Creators::PDF->new(InitVars => 0);
-
-#   All units are in PostScript points in this script
-$pdf->Mbox(0, 0, 612, 792);
-
-# Convert layout to XML and insert into db
-#my $query = "INSERT INTO creator_layouts (layout_id,layout_xml) VALUES (1,?) ON DUPLICATE KEY UPDATE layout_xml=?;";
-#my $sth = C4::Context->dbh->prepare($query);
-my $layout =
-{
-        barcode                 => {
-                                    type => 'CODE39',
-                                    llx => 26,
-                                    lly => 4.5,
-                                    data => '0002120108',
-                                    text => 1,  # controls text_under_barcode display: 1 => visible, 0 => not visible
-        },
-        text                    => [
-                                    'John Doe' => {
-                                                                font => 'TB',
-                                                                font_size => 13,
-                                                                llx => 63,      # llx & lly are relative to the llx & lly of the card NOT the page
-                                                                lly => 103.5,
-                                                                alignment => 'C',
-                                    },
-                                    'Anytown Public Library' => {
-                                                                font => 'TR',
-                                                                font_size => 8,
-                                                                llx => 63,
-                                                                lly => 85.5,
-                                                                alignment => 'C',
-                                    },
-                                    'Line 3 Text' => {
-                                                                font => 'TB',
-                                                                font_size => 10,
-                                                                llx => 63,
-                                                                lly => 76.5,
-                                                                alignment => 'C',
-                                    },
-        ],
-        images                  => {
-                                    patron_image   => {
-                                                            data_source => {'db' => 'patronimages',
-                                                                            'card_number' => '0002120108',
-                                                            },
-                                                            Sx          => 0,
-                                                            Sy          => 0,
-                                                            Ox          => 0,   # Ox,Oy should be set to 0 unless you want special effects  see http://www.adobe.com/devnet/pdf/pdf_reference.html ISO 32000-1
-                                                            Oy          => 0,
-                                                            Tx          => 4.5,  # Lower left corner of image relative to the lower left corner of the card
-                                                            Ty          => 63,
-                                                            Dx          => 72,  # point height of display image
-                                    },
-                                    image_1        => {
-                                                            data_source => {'db' => 'pcards_images',
-                                                                            'image_id' => 1,
-                                                            },
-                                                            Sx          => 0,
-                                                            Sy          => 0,
-                                                            Ox          => 0,   # Ox,Oy should be set to 0 unless you want special effects  see http://www.adobe.com/devnet/pdf/pdf_reference.html ISO 32000-1
-                                                            Oy          => 0,
-                                                            Tx          => 100,  # Lower left corner of image
-                                                            Ty          => 50,
-                                                            Dx          => 81,
-                                    },
-        },
-};
-
-#$sth->execute(XMLout($layout),XMLout($layout));
-
-# Retrieve XML from database
-my$query = "SELECT layout_xml FROM creator_layouts WHERE layout_id=20;";
-my $xml = C4::Context->dbh->selectrow_array($query);
-
-# Convert back to hash
-$layout = XMLin($xml);
-
-# Do image foo and place binary image data into layout hash
-my $image_data = {};
-my $alt_image_data = {};
-my $error = undef;
-foreach (keys %{$layout->{'images'}}) {
-    warn "Processing key: $_\n";
-    if (grep{m/db/} keys(%{$layout->{'images'}->{$_}->{'data_source'}})) {
-        warn $layout->{'images'}->{$_}->{'data_source'}->{'db'};
-        if ($layout->{'images'}->{$_}->{'data_source'}->{'db'} eq 'patronimages') {
-            warn "Processing patron image data.\n";
-            ($image_data, $error) = GetPatronImage($layout->{'images'}->{$_}->{'data_source'}->{'card_number'});
-            warn sprintf('No image exists for borrower number %s.', $borrower_number) if !$image_data;
-            next if !$image_data;
-        }
-        elsif ($layout->{'images'}->{$_}->{'data_source'}->{'db'} eq 'pcards_images') {
-            warn "Processing pcards image data for image_id " . $$layout{'images'}{$_}{'data_source'}{'image_id'} . ".\n";
-            my $dbh = C4::Context->dbh();
-            $dbh->{LongReadLen} = 1000000;      # allows us to read approx 1MB
-            $image_data = $dbh->selectrow_hashref("SELECT imagefile FROM pcards_images WHERE image_id = \'$$layout{'images'}{$_}{'data_source'}{'image_id'}\'");
-            warn sprintf('Image does not exists in db table %s.', $$layout{'images'}{$_}{'data_source'}{'db'}) if !$image_data;
-            next if !$image_data;
-        #    $string =~ s/(.)/sprintf("%x",ord($1))/eg;
-        }
-        else {
-            warn sprintf('No retrieval method for table %s.', $$layout{'images'}{$_}{'data_source'}{'db'}) if !$image_data;
-        }
-        warn sprintf('Database returned the following error: %s.', $error) if $error;
-    }
-    elsif (grep{m/foo/} keys(%{$layout->{'images'}->{$_}->{'data_source'}})) {
-        # some other image storage/retrieval method
-    }
-
-my $binary_data = $image_data->{'imagefile'};
-my $image = Graphics::Magick->new;
-$image->BlobToImage($binary_data);
-my $alt_image = Graphics::Magick->new;
-$alt_image->BlobToImage($binary_data);
-$alt_image->Set(magick => 'jpg', quality => 100);
-
-warn "Print Image Dimensions: " . $image->Get('width') . " X " . $image->Get('height') . "\n";
-
-my $alt_width = $image->Get('width');
-my $alt_height = $image->Get('height');
-my $ratio = $alt_width / $alt_height;
-my $display_height = $layout->{'images'}->{$_}->{'Dx'};
-my $display_width = $ratio * $display_height;
-$image->Resize(width => $display_width, height => $display_height);
-$image->Set(magick => 'jpg', quality => 100);
-
-warn "Display Image dimensions: " . $image->Get('width') . " X " . $image->Get('height') . "\n";
-
-#    Write params for alt image...
-    $layout->{'images'}->{$_}->{'alt'}->{'Sx'} = $alt_width;
-    $layout->{'images'}->{$_}->{'alt'}->{'Sy'} = $alt_height;
-    $layout->{'images'}->{$_}->{'alt'}->{'data'} = $alt_image->ImageToBlob();
-##    Write params for display image...
-    $layout->{'images'}->{$_}->{'Sx'} = $display_width;
-    $layout->{'images'}->{$_}->{'Sy'} = $display_height;
-    $layout->{'images'}->{$_}->{'data'} = $image->ImageToBlob();
-}
-die "BREAKPOINT...";
-# Create a new patroncard object
-my $patron_card = C4::Patroncards::Patroncard->new(
-        batch_id                => 1,
-        borrower_number         => $borrower_number,
-        llx                     => 36,#13.5        # lower left corner of the card
-        lly                     => 639,
-        height                  => 139.5,       # of the card
-        width                   => 229.5,
-        layout                  => $layout,
-        text_wrap_cols          => 30,
-);
-$patron_card->draw_guide_box($pdf);
-$patron_card->draw_barcode($pdf);
-my $err = $patron_card->draw_image($pdf);
-$patron_card->draw_text($pdf);
-$pdf->End;
-exit(1);
index 80c4478..cb26ed1 100755 (executable)
@@ -10,42 +10,33 @@ use YAML;
 use C4::Debug;
 use C4::SQLHelper qw(:all);
 
-use Test::More tests => 19;
+use Test::More tests => 22;
+
+use_ok('C4::SQLHelper');
 
-#1
-BEGIN {
-    use_ok('C4::SQLHelper');
-}
 use C4::Category;
 use C4::Branch;
 my @categories=C4::Category->all;
 my $insert;
 ok(($insert=InsertInTable("branches",{branchcode=>"ZZZZ",branchname=>"Brancheinconnue",city=>" ",zipcode=>" "},1))==0,"AddBranch (Insert In Table with primary key defined)");
-my $branches=C4::Branch->GetBranches;
+my $branches=C4::Branch::GetBranches;
 my @branchcodes=keys %$branches;
 my ($borrid, $borrtmp);
 ok($borrid=InsertInTable("borrowers",{firstname=>"Jean",surname=>"Valjean",city=>" ",zipcode=>" ",email=>"email",categorycode=>$categories[0]->{categorycode}, branchcode=>$branchcodes[0]}),"Insert In Table");
 $borrtmp=InsertInTable("borrowers",{firstname=>"Jean",surname=>"cocteau",city=>" ",zipcode=>" ",email=>"email",categorycode=>$categories[0]->{categorycode}, branchcode=>$branchcodes[0]});
 ok(my $status=UpdateInTable("borrowers",{borrowernumber=>$borrid,firstname=>"Jean",surname=>"Valjean",city=>"Dampierre",zipcode=>" ",email=>"email", branchcode=>$branchcodes[1]}),"Update In Table");
 my $borrowers=SearchInTable("borrowers");
-#4
 ok(@$borrowers>0, "Search In Table All values");
 $borrowers=SearchInTable("borrowers",{borrowernumber=>$borrid});
-#5
 ok(@$borrowers==1, "Search In Table by primary key on table");
 $borrowers=SearchInTable("borrowers",{firstname=>"Jean"});
-#6
 ok(@$borrowers>0, "Search In Table hashref");
 $borrowers=SearchInTable("borrowers",{firstname=>"Jean"},[{firstname=>1},{borrowernumber=>1}],undef, [qw(borrowernumber)]);
-#7
 ok(($$borrowers[0]{borrowernumber} + 0) > ($$borrowers[1]{borrowernumber} + 0), "Search In Table Order");
 $borrowers=SearchInTable("borrowers",{firstname=>"Jean"},[{surname=>0},{firstname=>1}], undef, [qw(firstname surname)]);
-#8
 ok(uc($$borrowers[0]{surname}) lt uc($$borrowers[1]{surname}), "Search In Table Order");
 $borrowers=SearchInTable("borrowers","Jean");
-#9
 ok(@$borrowers>0, "Search In Table string");
-#10
 #FIXME : When searching on All the fields of the table, seems to return Junk
 eval{$borrowers=SearchInTable("borrowers","Jean Valjean",undef,undef,undef,[qw(firstname surname borrowernumber cardnumber)],"start_with")};
 #eval{$borrowers=SearchInTable("borrowers","Jean Valjean",undef,undef,undef,undef,"start_with")};
@@ -54,31 +45,25 @@ eval{$borrowers=SearchInTable("borrowers","Jean Valjean",undef,undef,undef,[qw(f
 $debug && warn Dump(@$borrowers);
 ok(scalar(@$borrowers)==1 && !($@), "Search In Table does an implicit AND of all the words in strings");
 $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}]);
-#11
 ok(@$borrowers>0, "Search In Table arrayref");
 $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)]);
-#12
 ok(keys %{$$borrowers[0]} ==1, "Search In Table columns out limit");
 $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname surname title)]);
-#13
 ok(@$borrowers>0, "Search In Table columns out limit to borrowernumber AND filter firstname surname title");
 $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)]);
-#14
 ok(@$borrowers==0, "Search In Table columns filter firstname title limit Valjean not in other fields than surname ");
 $borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"start_with");
-#15
 ok(@$borrowers>0, "Search In Table columns filter surname  Val on a wide search found ");
 $borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"exact");
-#16
 ok(@$borrowers==0, "Search In Table columns filter surname  Val in exact search not found ");
 $borrowers=eval{SearchInTable("borrowers",["Val",{member=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)],"exact")};
-#17
 ok(@$borrowers==0 && !($@), "Search In Table fails gracefully when no correct field passed in hash");
-#18
 $borrowers=eval{SearchInTable("borrowers",["Jea"],undef,undef,undef,[qw(firstname surname borrowernumber)],"start_with")};
 ok(@$borrowers>0 && !($@), "Search on simple value in firstname");
 
 $status=DeleteInTable("borrowers",{borrowernumber=>$borrid});
-#19
 ok($status>0 && !($@), "DeleteInTable OK");
 $status=DeleteInTable("borrowers",{borrowernumber=>$borrtmp});
+ok($status>0 && !($@), "DeleteInTable OK");
+$status=DeleteInTable("branches", {branchcode => 'ZZZZ'});
+ok($status>0 && !($@), "DeleteInTable (branch) OK");
index 00d5b7c..31316f2 100644 (file)
@@ -5,24 +5,26 @@
 
 use strict;
 use warnings;
+use utf8;
+
 use YAML;
 
 use C4::Debug;
 use C4::Context;
 use C4::Search;
 
-use Test::More tests => 3;
+use Test::More tests => 4;
 
-BEGIN {
-    use_ok('C4::Search');
-}
-foreach my $string ("Leçon","mod\xc3\xa8les"){
-my @results=C4::Search::_remove_stopwords($string,"kw");
-$debug && warn "$string ",Dump(@results);
-ok($results[0] eq $string,"$string is not modified");
+use_ok('C4::Search');
+
+foreach my $string ("Leçon","modèles") {
+    my @results=C4::Search::_remove_stopwords($string,"kw");
+    $debug && warn "$string ",Dump(@results);
+    ok($results[0] eq $string,"$string is not modified");
 }
-foreach my $string ("Les chaussettes de l'archiduchesse"){
-my @results=C4::Search::_remove_stopwords($string,"kw");
-$debug && warn "$string ",Dump(@results);
-ok($results[0] ne $string,"$results[0] from $string");
+
+foreach my $string ("Les chaussettes de l'archiduchesse") {
+    my @results=C4::Search::_remove_stopwords($string,"kw");
+    $debug && warn "$string ",Dump(@results);
+    ok($results[0] ne $string,"$results[0] from $string");
 }
index f4110fa..a50f81e 100755 (executable)
@@ -5,13 +5,11 @@
 # Author : Antoine Farnault, antoine@koha-fr.org
 #
 
-use Test;
 use strict;
-#use warnings; FIXME - Bug 2505
+use warnings;
 use C4::Context;
 
-# Making 30 tests.
-BEGIN { plan tests => 112 }
+use Test::More tests => 92;
 
 # Getting some borrowers from database.
 my $dbh = C4::Context->dbh;
@@ -27,26 +25,13 @@ while(my $borrower = $sth->fetchrow){
     push @borrowers, $borrower;
 }
 
-# Getting some itemnumber from database
-my $query = qq/
-    SELECT itemnumber
-    FROM   items
-    LIMIT  10
-/;
-my $sth = $dbh->prepare($query);
-$sth->execute;
-my @items;
-while(my $item = $sth->fetchrow){
-    push @items, $item;
-}
-
 # Getting some biblionumbers from database
-my $query = qq/
+$query = qq/
     SELECT biblionumber
     FROM   biblio
     LIMIT  10
 /;
-my $sth = $dbh->prepare($query);
+$sth = $dbh->prepare($query);
 $sth->execute;
 my @biblionumbers;
 while(my $biblionumber = $sth->fetchrow){
@@ -61,9 +46,9 @@ my $delete_virtualshelfcontent =qq/
     DELETE  FROM  virtualshelfcontents WHERE 1
 /;
 
-my $sth = $dbh->prepare($delete_virtualshelf);
+$sth = $dbh->prepare($delete_virtualshelf);
 $sth->execute;
-my $sth = $dbh->prepare($delete_virtualshelfcontent);
+$sth = $dbh->prepare($delete_virtualshelfcontent);
 $sth->execute;
 # ---
 
@@ -73,12 +58,7 @@ $sth->execute;
 #
 #----------------------------------------------------------------------#
 
-use C4::VirtualShelves;
-my $version = C4::VirtualShelves->VERSION;
-print "\n----------Testing C4::VirtualShelves version ".$version."--------\n";
-
-ok($version);   # First test: the module is loaded & the version is readable.
-
+use_ok('C4::VirtualShelves');
 
 #-----------------------TEST AddShelf function------------------------#
 # usage : $shelfnumber = &AddShelf( $shelfname, $owner, $category);
@@ -88,38 +68,49 @@ my @shelves;
 for(my $i=0; $i<10;$i++){
      my $ShelfNumber = AddShelf("Shelf_".$i,$borrowers[$i] || '',int(rand(3))+1);
      die "test Not ok, remove some shelves before" if ($ShelfNumber == -1);
-     ok($ShelfNumber);   # Shelf creation successful;
-     push @shelves, $ShelfNumber if ok($ShelfNumber);
+     ok($ShelfNumber > -1, "created shelf");   # Shelf creation successful;
+     push @shelves, $ShelfNumber if $ShelfNumber > -1;
 }
 
-ok(10,scalar @shelves); # 10 shelves in @shelves;
+ok(10 == scalar @shelves, 'created 10 lists'); # 10 shelves in @shelves;
 
 # try to create some shelf which already exists.
 for(my $i=0;$i<10;$i++){
     my $badNumShelf = AddShelf("Shelf_".$i,$borrowers[$i] || '','');
-    ok(-1,$badNumShelf);   # AddShelf returns -1 if name already exist.
+    ok(-1 == $badNumShelf, 'do not create lists with duplicate names');   # AddShelf returns -1 if name already exist.
 }
 
-#-----------TEST AddToShelf & &AddToShelfFromBiblio & GetShelfContents &  DelFromShelf functions--------------#
-# usage : &AddToShelf($itemnumber, $shelfnumber);
-# usage : $itemlist = &GetShelfContents($shelfnumber);
-# usage : $itemlist = GetShelfContents($shelfnumber);
+#-----------TEST AddToShelf & GetShelfContents &  DelFromShelf functions--------------#
+# usage : &AddToShelf($biblionumber, $shelfnumber);
+# usage : $biblist = &GetShelfContents($shelfnumber);
+# usage : $biblist = GetShelfContents($shelfnumber);
 
+my %used = ();
 for(my $i=0; $i<10;$i++){
-    my $item = $items[int(rand(9))];
+    my $bib = $biblionumbers[int(rand(9))];
     my $shelfnumber = $shelves[int(rand(9))];
-    
-    my ($itemlistBefore,$countbefore) = GetShelfContents($shelfnumber);
-    AddToShelf($item,$shelfnumber);
-    my ($itemlistAfter,$countafter) = GetShelfContents($shelfnumber);
-    ok($countbefore,$countafter - 1);  # the item has been successfuly added.
+  
+    my $key = "$bib\t$shelfnumber";
+    my $should_fail = exists($used{$key}) ? 1 : 0;
+    my ($biblistBefore,$countbefore) = GetShelfContents($shelfnumber);
+    my $status = AddToShelf($bib,$shelfnumber);
+    my ($biblistAfter,$countafter) = GetShelfContents($shelfnumber);
+
+    if ($should_fail) {
+        ok(!defined($status), 'failed to add to list when we should');
+    } else {
+        ok(defined($status), 'added to list when we should');
+    }
+
+    if (defined $status) {
+        ok($countbefore == $countafter - 1, 'added bib to list');  # the bib has been successfuly added.
+    } else {
+        ok($countbefore == $countafter,     'did not add duplicate bib to list');  # the bib has been successfuly added.
+    }
+
+    $used{$key}++;
 
-    
-    # same thing with AddToShelfFromBiblio
-    my $biblionumber = $biblionumbers[int(rand(10))];
-    &AddToShelfFromBiblio($biblionumber, $shelfnumber);
-    my ($AfterAgain,$countagain) = GetShelfContents($shelfnumber);
-    ok($countafter, $countagain -1);
 }
 
 #-----------------------TEST ModShelf & GetShelf functions------------------------#
@@ -136,25 +127,17 @@ for(my $i=0; $i<10;$i++){
     ModShelf($numA,$shelf);
     my ($numB,$nameB,$ownerB,$categoryB) = GetShelf($numA);
     
-    ok($numA,$numB);
-    ok($shelf->{shelfname},$nameB);
-    ok($shelf->{owner},$ownerB);
-    ok($shelf->{category},$categoryB);
+    ok($numA == $numB, 'modified shelf');
+    ok($shelf->{shelfname} eq $nameB,     '... and name change took');
+    ok($shelf->{owner}     eq $ownerB,    '... and owner change took');
+    ok($shelf->{category}  eq $categoryB, '... and category change took');
 }
 
 #-----------------------TEST DelShelf & DelFromShelf functions------------------------#
 # usage : ($status) = &DelShelf($shelfnumber);
-# usage : &DelFromShelf( $itemnumber, $shelfnumber);
 
 for(my $i=0; $i<10;$i++){
     my $shelfnumber = $shelves[$i];
     my $status = DelShelf($shelfnumber);
-    if($status){
-        my ($items,$count) = GetShelfContents($shelfnumber);
-        ok($status,$count);
-        foreach (@$items){ # delete all the item in this shelf
-            DelFromShelf($_{'itemnumber'},$shelfnumber);
-        }
-        ok(DelShelf($shelfnumber));
-    }
+    ok(1 == $status, "deleted shelf $shelfnumber and its contents");
 }
diff --git a/t/db_dependent/needs_user_input/Auth.t b/t/db_dependent/needs_user_input/Auth.t
new file mode 100755 (executable)
index 0000000..dcfea53
--- /dev/null
@@ -0,0 +1,44 @@
+#!/usr/bin/perl
+#
+# This Koha test module is a stub!  
+# Add more tests here!!!
+
+use strict;
+use warnings;
+
+use Test::More tests => 6;
+
+BEGIN {
+       use FindBin;
+       use lib $FindBin::Bin;
+       use override_context_prefs;
+        use_ok('C4::Auth', qw(checkpw));
+        use_ok('C4::Context');
+}
+
+use vars qw($dbh $ldap);
+can_ok('C4::Context', 'config');
+can_ok('C4::Context', 'dbh');
+can_ok('C4::Auth', qw(checkpw));
+    ok($dbh  = C4::Context->dbh(),  "Getting dbh from C4::Context");
+$ldap = C4::Context->config('useldapserver') || 0;
+diag("Using LDAP? $ldap");
+
+while (1) {            # forever!
+       print "Do you want to test further accounts? (If not, just hit return.)\n";
+       my ($user, $pass);
+       print "Enter username: ";
+       chomp($user = <>);
+       ($user) or exit;
+       print "Enter password: ";
+       chomp($pass = <>);
+       my ($retval,$retcard) = checkpw($dbh,$user,$pass);
+       $retval  ||= '';
+       $retcard ||= '';
+       diag ("checkpw(\$dbh,$user,$pass) " . ($retval ? 'SUCCEEDS' : ' FAILS  ') . "\treturns ($retval,$retcard)");
+}
+
+END {
+       diag("C4::Auth - end of test");
+}
+__END__
diff --git a/t/db_dependent/needs_user_input/Auth_with_ldap.t b/t/db_dependent/needs_user_input/Auth_with_ldap.t
new file mode 100755 (executable)
index 0000000..9615151
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/perl
+#
+
+use strict;
+use warnings;
+
+use Test::More;
+use vars qw(%cases $dbh $config $context $ldap);
+
+BEGIN {
+       %cases = (
+               # users from t/LDAP/example3.ldif
+               sss => 'password1',
+               jts => 'password1',
+               rch => 'password2',
+               jmf => 'password3',
+       );
+       plan tests => 8 + scalar(keys %cases);
+       use_ok('C4::Context');
+       use_ok('C4::Auth_with_ldap', qw(checkpw_ldap));
+}
+
+sub do_checkpw_ldap (;$$) { 
+       my ($user,$pass) = (shift,shift);
+       diag "($user,$pass)";
+       my $ret;
+       return ($ret = checkpw_ldap($dbh,$user,$pass), sprintf("(%s,%s) returns '%s'",$user,$pass,$ret));
+}
+
+ok($context= C4::Context->new(),       "Getting new C4::Context object");
+ok($dbh    = C4::Context->dbh(),       "Getting dbh from C4::Context");
+ok($dbh    = $context->dbh(),          "Getting dbh from \$context object");
+
+$ldap = $ENV{KOHA_USELDAPSERVER};
+if(defined($ldap)) {
+    diag "Overriding KOHA_CONF <useldapserver> with \$ENV{KOHA_USELDAPSERVER} = $ldap";
+} else {
+    diag 'Note: You can use $ENV{KOHA_USELDAPSERVER} to override KOHA_CONF <useldapserver> for this test';
+    $ldap = C4::Context->config('useldapserver');
+}
+ok(defined($ldap), "Checking if \$ENV{KOHA_USELDAPSERVER} or <useldapserver> is defined");
+
+SKIP: {
+    $ldap or skip("LDAP is disabled.", scalar(keys %cases) + 2);
+    diag("The basis of Authentication is that we don't auth everybody.");
+    diag("Let's make sure we reject on bad calls.");
+    my $ret;
+    ok(!($ret = checkpw_ldap($dbh)),       "should reject (  no  arguments) returns '$ret'");
+    ok(!($ret = checkpw_ldap($dbh,'','')), "should reject (empty arguments) returns '$ret'");
+    print "\n";
+    diag("Now let's check " . scalar(keys %cases) . " test cases: ");
+    foreach (sort keys %cases) {
+        ok do_checkpw_ldap($_, $cases{$_});
+    }
+}
+1;
index 7b846b0..8ea282d 100755 (executable)
@@ -197,6 +197,9 @@ if ($filter = $input->param('approved_by')) {       # borrowernumber from link
 }
 $debug and print STDERR "filters: " . Dumper(\%filters);
 my $tagloop = get_approval_rows(\%filters);
+for ( @{$tagloop} ) {
+    $_->{date_approved} = format_date( $_->{date_approved} );
+}
 my $qstring = $input->query_string;
 $qstring =~ s/([&;])*\blimit=\d+//;            # remove pagination var
 $qstring =~ s/^;+//;                                   # remove leading delims
index 7af17c8..a0d9fdd 100755 (executable)
@@ -77,7 +77,7 @@ sub AddBibliosToShelf {
         @biblionumber = (split /\//,$biblionumber[0]);
     }
     for my $bib (@biblionumber){
-        AddToShelfFromBiblio($bib, $shelfnumber);
+        AddToShelf($bib, $shelfnumber);
     }
 }