From M.de.Rooy at rijksmuseum.nl Mon May 2 10:02:45 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 2 May 2011 08:02:45 +0000 Subject: [Koha-patches] [PATCH] 6290: Fix warning on XSLT.pm Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3124C24F@S-MAIL-1B.rijksmuseum.intra> --- C4/XSLT.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 28a70fc..4dafff3 100755 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -222,7 +222,7 @@ sub buildKohaItemsNamespace { } else { $status = "available"; } - my $homebranch = xml_escape($branches->{$item->{homebranch}}->{'branchname'}); + my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):''; my $itemcallnumber = xml_escape($item->{itemcallnumber}); $xml.= "$homebranch". "$status". -- 1.6.0.6 From oleonard at myacpl.org Mon May 2 20:20:35 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 2 May 2011 14:20:35 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6284, Reports Filters Need Prettying Message-ID: <1304360435-5243-1-git-send-email-oleonard@myacpl.org> 1. Moved the form to the left under the menu 2. Added a calendar next to date (and a date format tip) 3. Styled the form like other filter forms for consistency's sake 4. Formatted on-screen message to match standard style --- .../en/modules/reports/guided_reports_start.tt | 81 +++++++++++++------- reports/guided_reports.pl | 1 + 2 files changed, 55 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index b4dff27..24c5a13 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -123,29 +123,6 @@ canned reports and writing custom SQL reports.

[% IF ( saved1 ) %] [% IF ( savedreports ) %]

Saved Reports

-

Choose the report to run from the list

- -
-
- - - - - - - - - - - - - - - - -

Filter


Date:
Author:
Keyword:
-
-
 page(s) : @@ -189,7 +166,7 @@ canned reports and writing custom SQL reports.

[% savedreport.notes %] [% savedreport.borrowersurname %][% IF ( savedreport.borrowerfirstname ) %], [% savedreport.borrowerfirstname %][% END %] ([% savedreport.borrowernumber %]) [% savedreport.date_created %] -[% IF ( savedreport.date_run ) %][% savedreport.date_run %][% END %] +[% IF ( savedreport.date_run ) %][% savedreport.date_run %][% END %] Show @@ -206,11 +183,30 @@ canned reports and writing custom SQL reports.

[% END %] -[% ELSE %]

There are no saved reports. +[% ELSE %]
+ [% IF (filter_set) %] +

No saved reports match your criteria.

+ [% IF ( CAN_user_reports_create_reports ) %] + + + + + +
+ + + + +
+ + [% END %] + [% ELSE %] +

There are no saved reports.

[% IF ( CAN_user_reports_create_reports ) %] - Build new? + Build a new report? [% END %] -

+ [% END %] + [% END %] [% END %] @@ -670,6 +666,37 @@ Sub report: + +
+

Filter

+
    +
  1. +
    [% INCLUDE 'date-format.inc' %]
    + +
  2. +
  3. +
  4. +
+
+ + +[% END %] + + [% INCLUDE 'guided-reports-view.inc' %] diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 5abdf17..600ac29 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -68,6 +68,7 @@ if ( $input->param("filter_set") ) { $filter = {}; $filter->{$_} = $input->param("filter_$_") foreach qw/date author keyword/; $session->param('report_filter', $filter) if $session; + $template->param( 'filter_set' => 1 ); } elsif ($session) { $filter = $session->param('report_filter'); -- 1.7.3 From chrisc at catalyst.net.nz Tue May 3 02:14:46 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Tue, 3 May 2011 12:14:46 +1200 Subject: [Koha-patches] [PATCH] Bug 6292 : Overdue notices not being generated when borrower had an overdue older than the max value of the notice triggers Message-ID: <1304381686-371-1-git-send-email-chrisc@catalyst.net.nz> Squashed commit of the following: commit 5f81773013c133b2ccc56e73d6ca69195304665c Author: Chris Cormack Date: Tue May 3 12:03:11 2011 +1200 Bug 6292 continuing fix commit 0e1895deea4647d6675781c4676623447713f1fa Author: Chris Cormack Date: Tue May 3 11:48:11 2011 +1200 First attempt to fix overdues --- misc/cronjobs/overdue_notices.pl | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index bc97ecb..42ff03b 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -425,7 +425,7 @@ END_SQL # my $borrower_sql = <<'END_SQL'; -SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, country, email, MIN(date_due) as longest_issue +SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email, date_due FROM issues,borrowers,categories WHERE issues.borrowernumber=borrowers.borrowernumber AND borrowers.categorycode=categories.categorycode @@ -439,13 +439,12 @@ END_SQL $borrower_sql .= ' AND borrowers.categorycode=? '; push @borrower_parameters, $overdue_rules->{categorycode}; } - $borrower_sql .= ' AND categories.overduenoticerequired=1 - GROUP BY issues.borrowernumber '; + $borrower_sql .= ' AND categories.overduenoticerequired=1 '; if($triggered) { - $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) = ?'; + $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; push @borrower_parameters, $mindays; } else { - $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) BETWEEN ? and ? ' ; + $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; push @borrower_parameters, $mindays, $maxdays; } @@ -454,9 +453,9 @@ END_SQL $sth->execute(@borrower_parameters); $verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows"; - while ( my ($itemcount, $borrowernumber, $firstname, $lastname, + while ( my ( $borrowernumber, $firstname, $lastname, $address1, $address2, $city, $postcode, $country, $email, - $longest_issue ) = $sth->fetchrow ) + $date_due ) = $sth->fetchrow ) { $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i."; -- 1.7.4.1 From chrisc at catalyst.net.nz Tue May 3 02:24:26 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Tue, 3 May 2011 12:24:26 +1200 Subject: [Koha-patches] [PATCH] Bug 6292 : Overdue notices not being generated when borrower had an overdue older than the max value of the notice triggers In-Reply-To: <1304381686-371-1-git-send-email-chrisc@catalyst.net.nz> References: <1304381686-371-1-git-send-email-chrisc@catalyst.net.nz> Message-ID: <20110503002426.GI9732@rorohiko.wgtn.cat-it.co.nz> Please ignore this, I squashed the wrong commits, new patch soon Sorry Chris * Chris Cormack (chrisc at catalyst.net.nz) wrote: > Squashed commit of the following: > > commit 5f81773013c133b2ccc56e73d6ca69195304665c > Author: Chris Cormack > Date: Tue May 3 12:03:11 2011 +1200 > > Bug 6292 continuing fix > > commit 0e1895deea4647d6675781c4676623447713f1fa > Author: Chris Cormack > Date: Tue May 3 11:48:11 2011 +1200 > > First attempt to fix overdues > --- > misc/cronjobs/overdue_notices.pl | 13 ++++++------- > 1 files changed, 6 insertions(+), 7 deletions(-) > > diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl > index bc97ecb..42ff03b 100755 > --- a/misc/cronjobs/overdue_notices.pl > +++ b/misc/cronjobs/overdue_notices.pl > @@ -425,7 +425,7 @@ END_SQL > # > > my $borrower_sql = <<'END_SQL'; > -SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, country, email, MIN(date_due) as longest_issue > +SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email, date_due > FROM issues,borrowers,categories > WHERE issues.borrowernumber=borrowers.borrowernumber > AND borrowers.categorycode=categories.categorycode > @@ -439,13 +439,12 @@ END_SQL > $borrower_sql .= ' AND borrowers.categorycode=? '; > push @borrower_parameters, $overdue_rules->{categorycode}; > } > - $borrower_sql .= ' AND categories.overduenoticerequired=1 > - GROUP BY issues.borrowernumber '; > + $borrower_sql .= ' AND categories.overduenoticerequired=1 '; > if($triggered) { > - $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) = ?'; > + $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; > push @borrower_parameters, $mindays; > } else { > - $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) BETWEEN ? and ? ' ; > + $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; > push @borrower_parameters, $mindays, $maxdays; > } > > @@ -454,9 +453,9 @@ END_SQL > $sth->execute(@borrower_parameters); > $verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows"; > > - while ( my ($itemcount, $borrowernumber, $firstname, $lastname, > + while ( my ( $borrowernumber, $firstname, $lastname, > $address1, $address2, $city, $postcode, $country, $email, > - $longest_issue ) = $sth->fetchrow ) > + $date_due ) = $sth->fetchrow ) > { > $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i."; > > -- > 1.7.4.1 > -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From chrisc at catalyst.net.nz Tue May 3 02:29:14 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Tue, 3 May 2011 12:29:14 +1200 Subject: [Koha-patches] [PATCH] Bug 6292 : Overdue notices not being generated when borrower had an overdue older than the max value of the notice triggers Message-ID: <1304382554-1009-1-git-send-email-chrisc@catalyst.net.nz> --- misc/cronjobs/overdue_notices.pl | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index bc97ecb..595cfac 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -425,7 +425,7 @@ END_SQL # my $borrower_sql = <<'END_SQL'; -SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, country, email, MIN(date_due) as longest_issue +SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email, date_due FROM issues,borrowers,categories WHERE issues.borrowernumber=borrowers.borrowernumber AND borrowers.categorycode=categories.categorycode @@ -439,13 +439,12 @@ END_SQL $borrower_sql .= ' AND borrowers.categorycode=? '; push @borrower_parameters, $overdue_rules->{categorycode}; } - $borrower_sql .= ' AND categories.overduenoticerequired=1 - GROUP BY issues.borrowernumber '; + $borrower_sql .= ' AND categories.overduenoticerequired=1 '; if($triggered) { - $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) = ?'; + $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; push @borrower_parameters, $mindays; } else { - $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) BETWEEN ? and ? ' ; + $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; push @borrower_parameters, $mindays, $maxdays; } @@ -454,11 +453,11 @@ END_SQL $sth->execute(@borrower_parameters); $verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows"; - while ( my ($itemcount, $borrowernumber, $firstname, $lastname, + while ( my ( $borrowernumber, $firstname, $lastname, $address1, $address2, $city, $postcode, $country, $email, - $longest_issue ) = $sth->fetchrow ) + $date_due ) = $sth->fetchrow ) { - $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i."; + $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i."; my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} ); -- 1.7.4.1 From magnus at enger.priv.no Tue May 3 08:33:39 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Tue, 3 May 2011 08:33:39 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Add entries so Z39.50 public server works Message-ID: <1304404419-4311-1-git-send-email-magnus@enger.priv.no> From: Tomas Cohen Arazi I added a comment on the file so the user uncomments the appropriate koha-conf.xml sections. To+ Signed-off-by: Magnus Enger --- etc/koha-conf.xml | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 81 insertions(+), 2 deletions(-) diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index 819cc55..686a15b 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -11,8 +11,13 @@ tcp:localhost:9998/bibliosocket tcp:localhost:9999/authoritysocket --> - - + + + + + -- 1.7.4.1 From conan at lugmen.org.ar Tue May 3 15:48:43 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 10:48:43 -0300 Subject: [Koha-patches] Spam [PATCH 1/6] Bug 5166: Libraries and zebraqueue daemon scripts Message-ID: <1304430523-9200-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi Something went wrong with the previous patch. For some reason the system preferences updates introduce problems for patching so I split this in two different patches. Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack Signed-off-by: conan (aka Fernando L. Canizo) --- C4/Catalog/Zebra.pm | 474 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 474 insertions(+), 0 deletions(-) create mode 100644 C4/Catalog/Zebra.pm diff --git a/C4/Catalog/Zebra.pm b/C4/Catalog/Zebra.pm new file mode 100644 index 0000000..9c7dc4e --- /dev/null +++ b/C4/Catalog/Zebra.pm @@ -0,0 +1,474 @@ +package C4::Catalog::Zebra; +# +# 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., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +# Derived from rebuild_zebra.pl (2005-08-11) Paul Poulain and others +# Rewriten 02/03/2011 by Tomas Cohen Arazi (tomascohen at gmail.com) +# Universidad Nacional de Cordoba / Argentina + +# Library for managing updates in zebra, usually from zebraqueue + +use strict; +use warnings; +use C4::Context; +use Getopt::Long; +use File::Temp qw/ tempdir /; +use File::Path; +use Time::HiRes qw(time); +use C4::Biblio; +use C4::AuthoritiesMarc; + +use vars qw($VERSION @ISA @EXPORT); + +BEGIN { + # set the version for version checking + $VERSION = 0.01; + + require Exporter; + @ISA = qw(Exporter); + @EXPORT = qw( + &UpdateAuths + &UpdateBiblios + &UpdateAuthsAndBiblios + &IndexZebraqueueRecords + ); +} + + +=head1 NAME + +C4::Catalog::Zebra + +Comment: + This should be used when merging the rest of the rebuild_zebra.pl indexing logic + my $nosanitize = (C4::Context->preference('ZebraNoSanitize')) ? 1 : 0; + + +=head2 UpdateAuths + + ( $num_records_updated ) = &UpdateAuths (); + +returns the number of updated+deleted authority records + +=cut + +sub UpdateAuths +{ + # Update authorities + return IndexZebraqueueRecords('authority'); +} + +=head2 UpdateBiblios + + ( $num_records_updated ) = &UpdateBiblios (); + +returns the number of updated+deleted biblio records + +=cut + +sub UpdateBiblios +{ + # Update authorities + return IndexZebraqueueRecords('biblio'); +} + +=head2 UpdateAuthsAndBiblios + + ( $num_records_updated ) = &UpdateAuthsAndBiblios (); + +returns the number of updated+deleted authority and biblio records + +=cut + +sub UpdateAuthsAndBiblios +{ + my $ret; + # Update authorities + $ret = UpdateAuths(); + + # Update biblios + $ret += UpdateBiblios(); + + return $ret; +} + +=head2 IndexZebraqueueRecords + + ( $num_records_updated ) = &IndexZebraqueueRecords ($record_type); + +returns the number of updated+deleted $record_type records + +Comment : +$record_type can be either 'biblio' or 'authority' + +=cut + +sub IndexZebraqueueRecords +{ + my ($record_type) = @_; + my $as_xml = (C4::Context->preference('ZebraUseXml')) ? 1 : 0; + my $noxml = ($as_xml) ? 0 : 1; + my $record_format = ($as_xml) ? 'marcxml' : 'iso2709' ; + + my ($num_records_updated,$num_records_deleted); + + $num_records_deleted = (IndexZebraqueueByAction('deleted',$record_type,$record_format,$as_xml,$noxml)||0); + $num_records_updated = (IndexZebraqueueByAction('updated',$record_type,$record_format,$as_xml,$noxml)||0); + + return $num_records_deleted + $num_records_updated; +} + +=head2 IndexZebraqueueByAction + + ( $num_records_updated ) = &IndexZebraqueueByAction ($action,$record_type, + $record_format,$as_xml,$noxml); + +returns the number of updated+deleted $record_type records + +Comment : +$record_type can be 'biblio' or 'authority' +$record_format can be 'marcxml' or 'iso2709' +$action can be 'updated' or 'deleted' +$as_xml and $noxml are maintained for legacy reasons, one is enough. They +indicate whether to use marcxml for indexing in zebra or iso2709. They should +all be deduced from C4::Context->preference('ZebraUseXml'). + +=cut + +sub IndexZebraqueueByAction +{ + my ($action,$record_type,$record_format,$as_xml,$noxml) = @_; + my ($num_records_exported,$ret,$zaction); + + if ($action eq 'updated' or $action eq 'deleted') { + # get records by action + my $entries = select_zebraqueue_records($record_type, $action); + # Create tmp dir + my $directory = File::Temp->newdir(); + + # get records from zebraqueue, export to file for zebraidx + if ($action eq 'updated') { + $zaction = 'update'; + $num_records_exported = export_marc_records_from_list($record_type, + $entries, "$directory", $as_xml, $noxml); + } else { + # $action eq 'deleted' + $zaction = 'delete'; + $num_records_exported = generate_deleted_marc_records($record_type, + $entries, "$directory", $as_xml); + } + + if ($num_records_exported) { + # log export + my $time = localtime(time); + print "$time $num_records_exported $record_type record(s) exported for $zaction\n"; + # TODO error handling / and better logging + $ret = DoIndexing($record_type,$zaction,"$directory",$record_format); + if ($ret) { + print "$time $num_records_exported $record_type record(s) $action\n"; + mark_zebraqueue_batch_done($entries); + print "$time $num_records_exported $record_type record(s) marked done in zebraqueue\n"; + } + # /TODO + } + } else { + # Wrong action + $ret = -1; + } + + return $ret; +} + + +sub select_zebraqueue_records { + my ($record_type, $update_type) = @_; + + my $dbh = C4::Context->dbh; + my $server = ($record_type eq 'biblio') ? 'biblioserver' : 'authorityserver'; + my $op = ($update_type eq 'deleted') ? 'recordDelete' : 'specialUpdate'; + + my $sth = $dbh->prepare(<<'SQL'); + SELECT id, biblio_auth_number + FROM zebraqueue + WHERE server = ? + AND operation = ? + AND done = 0 + ORDER BY id DESC; +SQL + + $sth->execute($server, $op); + my $entries = $sth->fetchall_arrayref({}); +} + +sub mark_zebraqueue_batch_done { + my ($entries) = @_; + + my $dbh = C4::Context->dbh; + + $dbh->{AutoCommit} = 0; + my $sth = $dbh->prepare("UPDATE zebraqueue SET done = 1 WHERE id = ?"); + $dbh->commit(); + foreach my $id (map { $_->{id} } @$entries) { + $sth->execute($id); + } + $dbh->{AutoCommit} = 1; +} + +sub export_marc_records_from_list { + my ($record_type, $entries, $directory, $as_xml, $noxml) = @_; + my $verbose_logging = (C4::Context->preference('ZebraqueueVerboseLogging')) ? 1 : 0; + + my $num_exported = 0; + open (OUT, ">:utf8 ", "$directory/exported_records") or die $!; + my $i = 0; + my %found = (); + foreach my $record_number ( map { $_->{biblio_auth_number} } + grep { !$found{ $_->{biblio_auth_number} }++ } + @$entries ) { + print "." if ( $verbose_logging ); + print "\r$i" unless ($i++ %100 or !$verbose_logging); + my ($marc) = get_corrected_marc_record($record_type, $record_number, $noxml); + if (defined $marc) { + # FIXME - when more than one record is exported and $as_xml is true, + # the output file is not valid XML - it's just multiple elements + # strung together with no single root element. zebraidx doesn't seem + # to care, though, at least if you're using the GRS-1 filter. It does + # care if you're using the DOM filter, which requires valid XML file(s). + print OUT ($as_xml) ? $marc->as_xml_record() : $marc->as_usmarc(); + $num_exported++; + } + } + print "\nRecords exported: $num_exported\n" if ( $verbose_logging ); + close OUT; + return $num_exported; +} + +sub generate_deleted_marc_records { + my ($record_type, $entries, $directory, $as_xml) = @_; + my $verbose_logging = (C4::Context->preference('ZebraqueueVerboseLogging')) ? 1 : 0; + + my $num_exported = 0; + open (OUT, ">:utf8 ", "$directory/exported_records") or die $!; + my $i = 0; + foreach my $record_number (map { $_->{biblio_auth_number} } @$entries ) { + print "\r$i" unless ($i++ %100 or !$verbose_logging); + print "." if ( $verbose_logging ); + + my $marc = MARC::Record->new(); + if ($record_type eq 'biblio') { + fix_biblio_ids($marc, $record_number, $record_number); + } else { + fix_authority_id($marc, $record_number); + } + if (C4::Context->preference("marcflavour") eq "UNIMARC") { + fix_unimarc_100($marc); + } + + print OUT ($as_xml) ? $marc->as_xml_record() : $marc->as_usmarc(); + $num_exported++; + } + print "\nRecords exported: $num_exported\n" if ( $verbose_logging ); + close OUT; + return $num_exported; +} + +sub get_corrected_marc_record { + my ($record_type, $record_number, $noxml) = @_; + + my $marc = get_raw_marc_record($record_type, $record_number, $noxml); + + if (defined $marc) { + fix_leader($marc); + if ($record_type eq 'biblio') { + my $succeeded = fix_biblio_ids($marc, $record_number); + return unless $succeeded; + } else { + fix_authority_id($marc, $record_number); + } + if (C4::Context->preference("marcflavour") eq "UNIMARC") { + fix_unimarc_100($marc); + } + } + + return $marc; +} + +sub get_raw_marc_record { + my ($record_type, $record_number, $noxml) = @_; + my $dbh = C4::Context->dbh; + + my $marc; + if ($record_type eq 'biblio') { + if ($noxml) { + my $fetch_sth = $dbh->prepare_cached("SELECT marc FROM biblioitems WHERE biblionumber = ?"); + $fetch_sth->execute($record_number); + if (my ($blob) = $fetch_sth->fetchrow_array) { + $marc = MARC::Record->new_from_usmarc($blob); + $fetch_sth->finish(); + } else { + return; # failure to find a bib is not a problem - + # a delete could have been done before + # trying to process a record update + } + } else { + eval { $marc = GetMarcBiblio($record_number); }; + if ($@) { + # here we do warn since catching an exception + # means that the bib was found but failed + # to be parsed + warn "error retrieving biblio $record_number"; + return; + } + } + } else { + eval { $marc = GetAuthority($record_number); }; + if ($@) { + warn "error retrieving authority $record_number"; + return; + } + } + return $marc; +} + +sub fix_leader { + # FIXME - this routine is suspect + # It blanks the Leader/00-05 and Leader/12-16 to + # force them to be recalculated correct when + # the $marc->as_usmarc() or $marc->as_xml() is called. + # But why is this necessary? It would be a serious bug + # in MARC::Record (definitely) and MARC::File::XML (arguably) + # if they are emitting incorrect leader values. + my $marc = shift; + + my $leader = $marc->leader; + substr($leader, 0, 5) = ' '; + substr($leader, 10, 7) = '22 '; + $marc->leader(substr($leader, 0, 24)); +} + +sub fix_biblio_ids { + # FIXME - it is essential to ensure that the biblionumber is present, + # otherwise, Zebra will choke on the record. However, this + # logic belongs in the relevant C4::Biblio APIs. + my $marc = shift; + my $biblionumber = shift; + my $biblioitemnumber; + my $dbh = C4::Context->dbh; + + if (@_) { + $biblioitemnumber = shift; + } else { + my $sth = $dbh->prepare( + "SELECT biblioitemnumber FROM biblioitems WHERE biblionumber=?"); + $sth->execute($biblionumber); + ($biblioitemnumber) = $sth->fetchrow_array; + $sth->finish; + unless ($biblioitemnumber) { + warn "failed to get biblioitemnumber for biblio $biblionumber"; + return 0; + } + } + + # FIXME - this is cheating on two levels + # 1. C4::Biblio::_koha_marc_update_bib_ids is meant to be an internal function + # 2. Making sure that the biblionumber and biblioitemnumber are correct and + # present in the MARC::Record object ought to be part of GetMarcBiblio. + # + # On the other hand, this better for now than what rebuild_zebra.pl used to + # do, which was duplicate the code for inserting the biblionumber + # and biblioitemnumber + C4::Biblio::_koha_marc_update_bib_ids($marc, '', $biblionumber, $biblioitemnumber); + + return 1; +} + +sub fix_authority_id { + # FIXME - as with fix_biblio_ids, the authid must be present + # for Zebra's sake. However, this really belongs + # in C4::AuthoritiesMarc. + my ($marc, $authid) = @_; + unless ($marc->field('001') and $marc->field('001')->data() eq $authid){ + $marc->delete_field($marc->field('001')); + $marc->insert_fields_ordered(MARC::Field->new('001',$authid)); + } +} + +sub fix_unimarc_100 { + # FIXME - again, if this is necessary, it belongs in C4::AuthoritiesMarc. + my $marc = shift; + + my $string; + if ( length($marc->subfield( 100, "a" )) == 35 ) { + $string = $marc->subfield( 100, "a" ); + my $f100 = $marc->field(100); + $marc->delete_field($f100); + } + else { + $string = POSIX::strftime( "%Y%m%d", localtime ); + $string =~ s/\-//g; + $string = sprintf( "%-*s", 35, $string ); + } + substr( $string, 22, 6, "frey50" ); + unless ( length($marc->subfield( 100, "a" )) == 35 ) { + $marc->delete_field($marc->field(100)); + $marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => $string )); + } +} + +=head2 DoIndexing + + ( $error_code ) = &DoIndexing($record_type,$op,$record_dir,$record_format); + +returns the corresponding zebraidx error code + +Comment : +$record_type can be 'biblio' or 'authority' +$zaction can be 'delete' or 'update' +$record_dir is the directory where the exported records are +$record_format can be 'marcxml' or 'iso2709' + +=cut + +sub DoIndexing { + my ($record_type, $zaction, $record_dir, $record_format) = @_; + my $zebra_server = ($record_type eq 'biblio') ? 'biblioserver' : 'authorityserver'; + my $zebra_db_name = ($record_type eq 'biblio') ? 'biblios' : 'authorities'; + my $zebra_config = C4::Context->zebraconfig($zebra_server)->{'config'}; + my $zebra_db_dir = C4::Context->zebraconfig($zebra_server)->{'directory'}; + my $noshadow = (C4::Context->preference('ZebraNoshadow')) ? '-n' : ''; + my $zebraidx_log_opt = " -v none,fatal "; + + # TODO better error handling!! + system("zebraidx -c $zebra_config $zebraidx_log_opt $noshadow -g $record_format -d $zebra_db_name $zaction $record_dir"); + system("zebraidx -c $zebra_config $zebraidx_log_opt -g $record_format -d $zebra_db_name commit") unless $noshadow; + # /TODO + + return 1; +} + + +END { } + +1; +__END__ + +=head1 AUTHOR + +Koha Development Team + +Tomas Cohen Arazi tomascohen at gmail.com + +=cut -- 1.7.2.5 From conan at lugmen.org.ar Tue May 3 15:49:20 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 10:49:20 -0300 Subject: [Koha-patches] Spam [PATCH 2/6] Bug 5166: Sysprefs Message-ID: <1304430560-9237-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack Signed-off-by: conan (aka Fernando L. Canizo) --- installer/data/mysql/de-DE/mandatory/sysprefs.sql | 5 +++ installer/data/mysql/en/mandatory/sysprefs.sql | 5 +++ .../1-Obligatoire/unimarc_standard_systemprefs.sql | 6 +++- installer/data/mysql/it-IT/necessari/sysprefs.sql | 6 +++ installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 5 +++ ...m_preferences_full_optimal_for_install_only.sql | 6 +++- ...m_preferences_full_optimal_for_install_only.sql | 5 +++ .../en/modules/admin/preferences/searching.pref | 34 ++++++++++++++++++++ 8 files changed, 70 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index 731cfa8..3920a47 100755 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -306,3 +306,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index c414ce4..9461af5 100755 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -306,3 +306,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 10d89f2..a134c41 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -308,4 +308,8 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseControlNumber',0,'If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','','YesNo'); - +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index b167c5f..5d008ed 100755 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -293,3 +293,9 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseControlNumber',0,'If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); + diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index fda16ea..739af78 100755 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -305,3 +305,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); \ No newline at end of file diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index c247b36..4300493 100755 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -360,4 +360,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); - +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); \ No newline at end of file diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index 51e0b07..5e36438 100755 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -385,3 +385,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index b2b175c5..bb6414a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -166,3 +166,37 @@ Searching: - pref: FacetLabelTruncationLength class: integer - characters, in OPAC/staff interface. + - + - pref: ZebraUseXml + type: boolean + choices: + yes: "Don't use" + no: Use + - Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record). + - + - pref: ZebraNoshadow + type: boolean + choices: + yes: "Don't use" + no: Use + - Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks. + - + - By default, tell zebraqueue daemon to search for updates every + - pref: ZebraAuthUpdateRatio + class: integer + default: 10 + - seconds in the authorities database. + - + - By default, tell zebraqueue daemon to search for updates every + - pref: ZebraBiblioUpdateRatio + class: integer + default: 6 + - *ZebraAuthUpdateRatio seconds in the biblios database + - + - pref: ZebraqueueVerboseLogging + type: boolean + choices: + yes: "Don't use" + no: Use + - Tell ZebraQueue daemon to be more verbose on logging. + -- 1.7.2.5 From conan at lugmen.org.ar Tue May 3 15:49:40 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 10:49:40 -0300 Subject: [Koha-patches] Spam [PATCH 3/6] Bug 5166: zebraqueue daemon scripts Message-ID: <1304430580-9274-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack Signed-off-by: conan (aka Fernando L. Canizo) --- misc/bin/koha-zebraqueue-ctl.sh | 6 +- misc/bin/zebraqueue_daemon.pl | 516 ++++++--------------------------------- 2 files changed, 77 insertions(+), 445 deletions(-) diff --git a/misc/bin/koha-zebraqueue-ctl.sh b/misc/bin/koha-zebraqueue-ctl.sh index d3444f0..4f3b26b 100755 --- a/misc/bin/koha-zebraqueue-ctl.sh +++ b/misc/bin/koha-zebraqueue-ctl.sh @@ -23,15 +23,15 @@ fi case "$1" in start) echo "Starting Zebraqueue Daemon" - daemon --name=$NAME --errlog=$ERRLOG --stdout=$STDOUT --output=$OUTPUT --verbose=1 --respawn --delay=30 $OTHERUSER -- perl -I $PERL5LIB $ZEBRAQUEUE -f $KOHA_CONF + daemon --name=$NAME --errlog=$ERRLOG --stdout=$STDOUT --output=$OUTPUT --verbose=1 --respawn --delay=30 $OTHERUSER -- perl -I $PERL5LIB $ZEBRAQUEUE ;; stop) echo "Stopping Zebraqueue Daemon" - daemon --name=$NAME --errlog=$ERRLOG --stdout=$STDOUT --output=$OUTPUT --verbose=1 --respawn --delay=30 $OTHERUSER --stop -- perl -I $PERL5LIB $ZEBRAQUEUE -f $KOHA_CONF + daemon --name=$NAME --errlog=$ERRLOG --stdout=$STDOUT --output=$OUTPUT --verbose=1 --respawn --delay=30 $OTHERUSER --stop -- perl -I $PERL5LIB $ZEBRAQUEUE ;; restart) echo "Restarting the Zebraqueue Daemon" - daemon --name=$NAME --errlog=$ERRLOG --stdout=$STDOUT --output=$OUTPUT --verbose=1 --respawn --delay=30 $OTHERUSER --restart -- perl -I $PERL5LIB $ZEBRAQUEUE -f $KOHA_CONF + daemon --name=$NAME --errlog=$ERRLOG --stdout=$STDOUT --output=$OUTPUT --verbose=1 --respawn --delay=30 $OTHERUSER --restart -- perl -I $PERL5LIB $ZEBRAQUEUE ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart}" diff --git a/misc/bin/zebraqueue_daemon.pl b/misc/bin/zebraqueue_daemon.pl index 6181a94..a4375d0 100755 --- a/misc/bin/zebraqueue_daemon.pl +++ b/misc/bin/zebraqueue_daemon.pl @@ -1,475 +1,107 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w -# daemon to watch the zebraqueue and update zebra as needed +# 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., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +# Writen 02/03/2011 by Tomas Cohen Arazi (tomascohen at gmail.com) +# Universidad Nacional de Cordoba / Argentina + +# Daemon to watch the zebraqueue table and update zebra indexes as needed use strict; -#use warnings; FIXME - Bug 2505 BEGIN { # find Koha's Perl modules # test carefully before changing this use FindBin; eval { require "$FindBin::Bin/kohalib.pl" }; } - -use POE qw(Wheel::SocketFactory Wheel::ReadWrite Filter::Stream Driver::SysRW); -use Unix::Syslog qw(:macros); - +use POE; +use Time::HiRes qw(time); use C4::Context; -use C4::Biblio; -use C4::Search; -use C4::AuthoritiesMarc; -use XML::Simple; -use POSIX; -use utf8; - - -# wait periods governing connection attempts -my $min_connection_wait = 1; # start off at 1 second -my $max_connection_wait = 1024; # max about 17 minutes - -# keep separate wait period for bib and authority Zebra databases -my %zoom_connection_waits = (); - -my $db_connection_wait = $min_connection_wait; - -# ZOOM and Z39.50 errors that are potentially -# resolvable by connecting again and retrying -# the operation -my %retriable_zoom_errors = ( - 10000 => 'ZOOM_ERROR_CONNECT', - 10001 => 'ZOOM_ERROR_MEMORY', - 10002 => 'ZOOM_ERROR_ENCODE', - 10003 => 'ZOOM_ERROR_DECODE', - 10004 => 'ZOOM_ERROR_CONNECTION_LOST', - 10005 => 'ZOOM_ERROR_INIT', - 10006 => 'ZOOM_ERROR_INTERNAL', - 10007 => 'ZOOM_ERROR_TIMEOUT', -); - -# structure to store updates that have -# failed and are to be retrieved. The -# structure is a hashref of hashrefs, -# e.g., -# -# $postoned_updates->{$server}->{$record_number} = 1; -# -# If an operation is attempted and fails because -# of a retriable error (see above), the daemon -# will try several times to recover as follows: -# -# 1. close and reopen the connection to the -# Zebra server, unless the error was a timeout, -# in which case -# 2. retry the operation -# -# If, after trying this five times, the operation still -# fails, the daemon will mark the record number as -# postponed, and try to process other entries in -# zebraqueue. When an update is postponed, the -# error will be reported to syslog. -# -# If more than 100 postponed updates are -# accumulated, the daemon will assume that -# something is seriously wrong, complain loudly, -# and abort. If running under the daemon(1) command, -# this means that the daemon will respawn. -# -my $num_postponed_updates = 0; -my $postponed_updates = {}; - -my $max_operation_attempts = 5; -my $max_postponed_updates = 100; - -# Zebra connection timeout -my $zconn_timeout = 30; -my $zconn_timeout_multiplier = 1.5; -my $max_zconn_timeout = 120; - -my $ident = "Koha Zebraqueue "; - -my $debug = 0; -Unix::Syslog::openlog $ident, LOG_PID, LOG_LOCAL0; - -Unix::Syslog::syslog LOG_INFO, "Starting Zebraqueue log at " . scalar localtime(time) . "\n"; - -sub handler_start { - - # Starts session. Only ever called once only really used to set an alias - # for the POE kernel - my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ]; - - my $time = localtime(time); - Unix::Syslog::syslog LOG_INFO, "$time POE Session ", $session->ID, " has started.\n"; - - # check status -# $kernel->yield('status_check'); - $kernel->yield('sleep'); -} - -sub handler_sleep { - - # can be used to slow down loop execution if needed - my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ]; - use Time::HiRes qw (sleep); - Time::HiRes::sleep(0.5); - #sleep 1; - $kernel->yield('status_check'); -} - -sub handler_check { - # check if we need to do anything, at the moment just checks the zebraqueue, it could check other things too - my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ]; - my $dbh = get_db_connection(); - my $sth = $dbh->prepare("SELECT count(*) AS opcount FROM zebraqueue WHERE done = 0"); - $sth->execute; - my $data = $sth->fetchrow_hashref(); - if ($data->{'opcount'} > 0) { - Unix::Syslog::syslog LOG_INFO, "$data->{'opcount'} operations waiting to be run\n"; - $sth->finish(); - $dbh->commit(); # needed so that we get current state of zebraqueue next time - # we enter handler_check - $kernel->yield('do_ops'); - } - else { - $sth->finish(); - $dbh->commit(); # needed so that we get current state of zebraqueue next time - # we enter handler_check - $kernel->yield('sleep'); - } -} - -sub zebraop { - # execute operations waiting in the zebraqueue - my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ]; - my $dbh = get_db_connection(); - my $readsth = $dbh->prepare("SELECT id, biblio_auth_number, operation, server FROM zebraqueue WHERE done = 0 ORDER BY id DESC"); - $readsth->execute(); - Unix::Syslog::syslog LOG_INFO, "Executing zebra operations\n"; - - my $completed_updates = {}; - ZEBRAQUEUE: while (my $data = $readsth->fetchrow_hashref()) { - warn "Inside while loop" if $debug; - - my $id = $data->{'id'}; - my $op = $data->{'operation'}; - $op = 'recordDelete' if $op =~ /delete/i; # delete ops historically have been coded - # either delete_record or recordDelete - my $record_number = $data->{'biblio_auth_number'}; - my $server = $data->{'server'}; - - next ZEBRAQUEUE if exists $postponed_updates->{$server}->{$record_number}; - next ZEBRAQUEUE if exists $completed_updates->{$server}->{$record_number}->{$op}; - - my $ok = 0; - my $record; - if ($op eq 'recordDelete') { - $ok = process_delete($dbh, $server, $record_number); - } - else { - $ok = process_update($dbh, $server, $record_number, $id); - } - if ($ok == 1) { - mark_done($dbh, $record_number, $op, $server); - $completed_updates->{$server}->{$record_number}->{$op} = 1; - if ($op eq 'recordDelete') { - $completed_updates->{$server}->{$record_number}->{'specialUpdate'} = 1; - } - } - } - $readsth->finish(); - $dbh->commit(); - $kernel->yield('sleep'); -} - -sub process_delete { - my $dbh = shift; - my $server = shift; - my $record_number = shift; - - my $record; - my $ok = 0; - eval { - warn "Searching for record to delete" if $debug; - # 1st read the record in zebra, we have to get it from zebra as its no longer in the db - my $Zconn = get_zebra_connection($server); - my $results = $Zconn->search_pqf( '@attr 1=Local-number '.$record_number); - $results->option(elementSetName => 'marcxml'); - $record = $results->record(0)->raw(); - }; - if ($@) { - # this doesn't exist, so no need to wail on zebra to delete it - if ($@->code() eq 13) { - $ok = 1; - } else { - # caught a ZOOM::Exception - my $message = _format_zoom_error_message($@); - postpone_update($server, $record_number, $message); - } - } else { - # then, delete the record - warn "Deleting record" if $debug; - $ok = zebrado($record, 'recordDelete', $server, $record_number); - } - return $ok; -} - -sub process_update { - my $dbh = shift; - my $server = shift; - my $record_number = shift; - my $id = shift; - - my $record; - my $ok = 0; - - warn "Updating record" if $debug; - # get the XML - my $marcxml; - if ($server eq "biblioserver") { - my $marc = GetMarcBiblio($record_number); - $marcxml = $marc->as_xml_record() if $marc; - } - elsif ($server eq "authorityserver") { - $marcxml = C4::AuthoritiesMarc::GetAuthorityXML($record_number); - } - # check it's XML, just in case - eval { - my $hashed = XMLin($marcxml); - }; ### is it a proper xml? broken xml may crash ZEBRA- slow but safe - ## it's Broken XML-- Should not reach here-- but if it does -lets protect ZEBRA - if ($@) { - Unix::Syslog::syslog LOG_ERR, "$server record $record_number is malformed: $@"; - mark_done_by_id($dbh, $id, $server); - $ok = 0; - } else { - # ok, we have everything, do the operation in zebra ! - $ok = zebrado($marcxml, 'specialUpdate', $server, $record_number); - } - return $ok; -} +use C4::Catalog::Zebra; -sub mark_done_by_id { - my $dbh = shift; - my $id = shift; - my $server = shift; - my $delsth = $dbh->prepare("UPDATE zebraqueue SET done = 1 WHERE id = ? AND server = ? AND done = 0"); - $delsth->execute($id, $server); -} - -sub mark_done { - my $dbh = shift; - my $record_number = shift; - my $op = shift; - my $server = shift; - - my $delsth; - if ($op eq 'recordDelete') { - # if it's a deletion, we can delete every request on this biblio : in case the user - # did a modif (or item deletion) just before biblio deletion, there are some specialUpdate - # that are pending and can't succeed, as we don't have the XML anymore - # so, delete everything for this biblionumber - $delsth = $dbh->prepare_cached("UPDATE zebraqueue SET done = 1 - WHERE biblio_auth_number = ? - AND server = ? - AND done = 0"); - $delsth->execute($record_number, $server); - } else { - # if it's not a deletion, delete every pending specialUpdate for this biblionumber - # in case the user add biblio, then X items, before this script runs - # this avoid indexing X+1 times where just 1 is enough. - $delsth = $dbh->prepare("UPDATE zebraqueue SET done = 1 - WHERE biblio_auth_number = ? - AND operation = 'specialUpdate' - AND server = ? - AND done = 0"); - $delsth->execute($record_number, $server); - } -} -sub zebrado { - ###Accepts a $server variable thus we can use it to update biblios, authorities or other zebra dbs - my ($record, $op, $server, $record_number) = @_; +my $authUpdateRatio; +my $biblioUpdateRatio; +my $tickCounter; - unless ($record) { - my $message = "error updating index for $server $record $record_number: no source record"; - postpone_update($server, $record_number, $message); - return 0; - } - my $attempts = 0; - my $ok = 0; - ATTEMPT: while ($attempts < $max_operation_attempts) { - $attempts++; - warn "Attempt $attempts for $op for $server $record_number" if $debug; - my $Zconn = get_zebra_connection($server); +sub handler_start +{ + my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ]; + my $time = localtime(time); - my $Zpackage = $Zconn->package(); - $Zpackage->option(action => $op); - $Zpackage->option(record => $record); + print "$time Zebraqueue daemon started\n"; - eval { $Zpackage->send("update") }; - if ($@ && $@->isa("ZOOM::Exception")) { - my $message = _format_zoom_error_message($@); - my $error = $@->code(); - if (exists $retriable_zoom_errors{$error}) { - warn "reattempting operation $op for $server $record_number" if $debug; - warn "last Zebra error was $message" if $debug; - $Zpackage->destroy(); - - if ($error == 10007 and $zconn_timeout < $max_zconn_timeout) { - # bump up connection timeout - $zconn_timeout = POSIX::ceil($zconn_timeout * $zconn_timeout_multiplier); - $zconn_timeout = $max_zconn_timeout if $zconn_timeout > $max_zconn_timeout; - Unix::Syslog::syslog LOG_INFO, "increased Zebra connection timeout to $zconn_timeout\n"; - warn "increased Zebra connection timeout to $zconn_timeout" if $debug; - } - next ATTEMPT; - } else { - postpone_update($server, $record_number, $message); - } - } - # FIXME - would be more efficient to send a ES commit - # after a batch of records, rather than commiting after - # each one - Zebra handles updates relatively slowly. - eval { $Zpackage->send('commit'); }; - if ($@) { - # operation succeeded, but commit - # did not - we have a problem - my $message = _format_zoom_error_message($@); - postpone_update($server, $record_number, $message); - } else { - $ok = 1; - last ATTEMPT; - } - } - - unless ($ok) { - my $message = "Made $attempts attempts to index $server record $record_number without success"; - postpone_update($server, $record_number, $message); - } - - return $ok; -} + # Initialize counter + $tickCounter = 0; -sub postpone_update { - my ($server, $record_number, $message) = @_; - warn $message if $debug; - $message .= "\n" unless $message =~ /\n$/; - Unix::Syslog::syslog LOG_ERR, $message; - $postponed_updates->{$server}->{$record_number} = 1; + # Get timer settings + $authUpdateRatio = (C4::Context->preference("ZebraAuthUpdateRatio")||10); + $biblioUpdateRatio = (C4::Context->preference("ZebraBiblioUpdateRatio")||6); - $num_postponed_updates++; - if ($num_postponed_updates > $max_postponed_updates) { - warn "exiting, over $max_postponed_updates postponed indexing updates"; - Unix::Syslog::syslog LOG_ERR, "exiting, over $max_postponed_updates postponed indexing updates"; - Unix::Syslog::closelog; - exit; - } -} + # Log + my $authPrefsString = (C4::Context->preference("ZebraAuthUpdateRatio") ? 'syspref' : 'default'); + print "$time Authorities update ratio (secs): $authUpdateRatio ($authPrefsString)\n"; + my $biblioUpdateSecs = $biblioUpdateRatio * $authUpdateRatio; + my $biblioPrefsString = (C4::Context->preference("ZebraBiblioUpdateRatio") ? 'syspref' : 'default'); + print "$time Biblios update ratio (secs): $biblioUpdateSecs ($biblioPrefsString)\n"; -sub handler_stop { - my $heap = $_[HEAP]; - my $time = localtime(time); - Unix::Syslog::syslog LOG_INFO, "$time Session ", $_[SESSION]->ID, " has stopped.\n"; - delete $heap->{session}; + $kernel->delay(tick => $authUpdateRatio); } -# get a DB connection -sub get_db_connection { - my $dbh; - - $db_connection_wait = $min_connection_wait unless defined $db_connection_wait; - while (1) { - eval { - # note that C4::Context caches the - # DB handle; C4::Context->dbh() will - # check that handle first before returning - # it. If the connection is bad, it - # then tries (once) to create a new one. - $dbh = C4::Context->dbh(); - }; - unless ($@) { - # C4::Context->dbh dies if it cannot - # establish a connection - $db_connection_wait = $min_connection_wait; - $dbh->{AutoCommit} = 0; # do this to reduce number of - # commits to zebraqueue - return $dbh; - } - - # connection failed - my $error = "failed to connect to DB: $DBI::errstr"; - warn $error if $debug; - Unix::Syslog::syslog LOG_ERR, $error; - sleep $db_connection_wait; - $db_connection_wait *= 2 unless $db_connection_wait >= $max_connection_wait; - } +sub handler_stop +{ + my $heap = $_[HEAP]; + my $time = localtime(time); + # Log + print "$time Zebraqueue daemon stopped - POE Session ended\n"; + delete $heap->{session}; } -# get a Zebra connection -sub get_zebra_connection { - my $server = shift; - - # start connection retry wait queue if necessary - $zoom_connection_waits{$server} = $min_connection_wait unless exists $zoom_connection_waits{$server}; - # try to connect to Zebra forever until we succeed - while (1) { - # what follows assumes that C4::Context->Zconn - # makes only one attempt to create a new connection; - my $Zconn = C4::Context->Zconn($server, 0, 1, '', 'xml'); - $Zconn->option('timeout' => $zconn_timeout); +sub handler_tick +{ + my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ]; + my $ret = 0; + $tickCounter = $tickCounter + 1; - # it is important to note that if the existing connection - # stored by C4::Context has an error (any type of error) - # from the last transaction, C4::Context->Zconn closes - # it and establishes a new one. Therefore, the - # following check will succeed if we have a new, good - # connection or we're using a previously established - # connection that has experienced no errors. - if ($Zconn->errcode() == 0) { - $zoom_connection_waits{$server} = $min_connection_wait; - return $Zconn; - } - # connection failed - my $error = _format_zoom_error_message($Zconn); - warn $error if $debug; - Unix::Syslog::syslog LOG_ERR, $error; - sleep $zoom_connection_waits{$server}; - $zoom_connection_waits{$server} *= 2 unless $zoom_connection_waits{$server} >= $max_connection_wait; - } -} - -# given a ZOOM::Exception or -# ZOOM::Connection object, generate -# a human-reaable error message -sub _format_zoom_error_message { - my $err = shift; + # Calculate if we have to update biblios too + # Check: biblioUpdateRatio ?= tickCounter + if ($biblioUpdateRatio == $tickCounter) { + # Update biblios and auths + $ret = C4::Catalog::Zebra::UpdateAuthsAndBiblios(); + # Reset counter + $tickCounter = 0; + } else { + # Update only auths + $ret = C4::Catalog::Zebra::UpdateAuths(); + } - my $message = ""; - if (ref($err) eq 'ZOOM::Connection') { - $message = $err->errmsg() . " (" . $err->diagset . " " . $err->errcode() . ") " . $err->addinfo(); - } elsif (ref($err) eq 'ZOOM::Exception') { - $message = $err->message() . " (" . $err->diagset . " " . $err->code() . ") " . $err->addinfo(); - } - return $message; + $kernel->delay(tick => $authUpdateRatio); } POE::Session->create( - inline_states => { - _start => \&handler_start, - sleep => \&handler_sleep, - status_check => \&handler_check, - do_ops => \&zebraop, - _stop => \&handler_stop, - }, + inline_states => { + _start => \&handler_start, + tick => \&handler_tick, + _stop => \&handler_stop, + }, ); -# start the kernel -$poe_kernel->run(); - -Unix::Syslog::closelog; - -exit; +POE::Kernel->run(); +exit 0; -- 1.7.2.5 From conan at lugmen.org.ar Tue May 3 15:50:02 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 10:50:02 -0300 Subject: [Koha-patches] Spam [PATCH 4/6] Bug 5166: updatedatabase.pl fix Message-ID: <1304430602-9311-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack Signed-off-by: conan (aka Fernando L. Canizo) --- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 03e75f3..9140d46 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4202,6 +4202,17 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer')"); + print "Upgrade to $DBversion done (Add sysprefs to control zebraqueue_daemon scripts: ZebraUseXml, ZebraNoshadow, ZebraqueueVerboseLogging, ZebraBiblioUpdateRatio, ZebraAuthUpdateRatio)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.7.2.5 From conan at lugmen.org.ar Tue May 3 15:50:15 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 10:50:15 -0300 Subject: [Koha-patches] Spam [PATCH 5/6] Sysprefs make 'experimental' nature explicit - again Message-ID: <1304430615-9348-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi Created against new/enh/bug_5166 so it actually applies To+ Signed-off-by: Chris Cormack Signed-off-by: conan (aka Fernando L. Canizo) --- installer/data/mysql/de-DE/mandatory/sysprefs.sql | 10 +++++----- installer/data/mysql/en/mandatory/sysprefs.sql | 10 +++++----- .../1-Obligatoire/unimarc_standard_systemprefs.sql | 10 +++++----- installer/data/mysql/it-IT/necessari/sysprefs.sql | 10 +++++----- installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 10 +++++----- ...m_preferences_full_optimal_for_install_only.sql | 10 +++++----- ...m_preferences_full_optimal_for_install_only.sql | 10 +++++----- installer/data/mysql/updatedatabase.pl | 10 +++++----- .../en/modules/admin/preferences/searching.pref | 10 +++++----- 9 files changed, 45 insertions(+), 45 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index 3920a47..d53cf2d 100755 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -306,8 +306,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 9461af5..0649f5f 100755 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -306,8 +306,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index a134c41..bfe627d 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -308,8 +308,8 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseControlNumber',0,'If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index 5d008ed..96bcf2b 100755 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -293,9 +293,9 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseControlNumber',0,'If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index 739af78..6d5d485 100755 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -305,8 +305,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); \ No newline at end of file +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index 4300493..d3624b9 100755 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -360,8 +360,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); \ No newline at end of file +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index 5e36438..bdd4107 100755 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -385,8 +385,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9140d46..f8ec66c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4204,11 +4204,11 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "XXX"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo')"); - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo')"); - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','Tell ZebraQueue daemon to be more verbose on logging.',NULL,'YesNo')"); - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraBiblioUpdateRatio','6','Tell the ZebraQueue daemon how often to search for updates in the biblios database. This number is multiplied by ZebraAuthUpdateRatios value.',NULL,'Integer')"); - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ZebraAuthUpdateRatio','10','Tell the ZebraQueue daemon in seconds how often to search for updates in the authorities database.',NULL,'Integer')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraUseXml','1','[Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record).',NULL,'YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraNoshadow','0','[Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks.',NULL,'YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraqueueVerboseLogging','0','[Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging.',NULL,'YesNo')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraBiblioUpdateRatio','6','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraBiblioUpdateRatio*ZebraAuthUpdateRatio seconds in the biblios database.',NULL,'Integer')"); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ZebraAuthUpdateRatio','10','[Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every ZebraAuthUpdateRatio seconds in the authorities database.',NULL,'Integer')"); print "Upgrade to $DBversion done (Add sysprefs to control zebraqueue_daemon scripts: ZebraUseXml, ZebraNoshadow, ZebraqueueVerboseLogging, ZebraBiblioUpdateRatio, ZebraAuthUpdateRatio)\n"; SetVersion ($DBversion); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index bb6414a..dd9c281 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -172,22 +172,22 @@ Searching: choices: yes: "Don't use" no: Use - - Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record). + - [Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record). - - pref: ZebraNoshadow type: boolean choices: yes: "Don't use" no: Use - - Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks. + - [Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks. - - - By default, tell zebraqueue daemon to search for updates every + - [Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every - pref: ZebraAuthUpdateRatio class: integer default: 10 - seconds in the authorities database. - - - By default, tell zebraqueue daemon to search for updates every + - [Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every - pref: ZebraBiblioUpdateRatio class: integer default: 6 @@ -198,5 +198,5 @@ Searching: choices: yes: "Don't use" no: Use - - Tell ZebraQueue daemon to be more verbose on logging. + - [Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging. -- 1.7.2.5 From conan at lugmen.org.ar Tue May 3 15:50:31 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 10:50:31 -0300 Subject: [Koha-patches] Spam [PATCH 6/6] Bug 5166 - Fix searching.pref / also rephrase [SIGNED-OFF] Message-ID: <1304430631-9385-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi Looks like *, ] and [ are not welcome in .pref files. Fixed that, and made Zebra related new prefs appear in the right section, with a proper layout. To+ Signed-off-by: conan (aka Fernando L. Canizo) --- .../en/modules/admin/preferences/searching.pref | 70 ++++++++++---------- 1 files changed, 36 insertions(+), 34 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index dd9c281..3beb760 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -69,6 +69,42 @@ Searching: yes: Include no: "Don't include" - subdivisions for searches generated by clicking on subject tracings. + - + - (Experimental zebraqueue daemon ONLY) + - pref: ZebraUseXml + type: boolean + choices: + yes: "Don't use" + no: Use + - MARCXML instead of ISO2907 for indexing in Zebra. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record). + - + - (Experimental zebraqueue daemon ONLY) + - pref: ZebraNoshadow + type: boolean + choices: + yes: "Don't use" + no: Use + - shadow records when updating Zebra indexes. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks. + - + - (Experimental zebraqueue daemon ONLY) Set to + - pref: ZebraAuthUpdateRatio + class: integer + default: 10 + - seconds the interval for searching authority record updates. + - + - (Experimental zebraqueue daemon ONLY) Set to + - pref: ZebraBiblioUpdateRatio + class: integer + default: 6 + - x ZebraAuthUpdateRatio seconds the interval for searching record updates. + - + - (Experimental zebraqueue daemon ONLY) + - pref: ZebraqueueVerboseLogging + type: boolean + choices: + yes: "Don't use" + no: Use + - verbose logging in zebraqueue daemon. Search Form: - - Show checkboxes to search by @@ -166,37 +202,3 @@ Searching: - pref: FacetLabelTruncationLength class: integer - characters, in OPAC/staff interface. - - - - pref: ZebraUseXml - type: boolean - choices: - yes: "Don't use" - no: Use - - [Experimental zebraqueue daemon ONLY] Tell Zebra to use MARCXML instead of ISO2907 for indexing. Very important for libraries with records bigger than the allowed by ISO2907 (e.g. with lots of items in a single record). - - - - pref: ZebraNoshadow - type: boolean - choices: - yes: "Don't use" - no: Use - - [Experimental zebraqueue daemon ONLY] Tell Zebra to use shadow records when updating. Prevents locking on records while updating the database. Refer to zebra documentation for more info on the drawbacks. - - - - [Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every - - pref: ZebraAuthUpdateRatio - class: integer - default: 10 - - seconds in the authorities database. - - - - [Experimental zebraqueue daemon ONLY] By default, tell zebraqueue daemon to search for updates every - - pref: ZebraBiblioUpdateRatio - class: integer - default: 6 - - *ZebraAuthUpdateRatio seconds in the biblios database - - - - pref: ZebraqueueVerboseLogging - type: boolean - choices: - yes: "Don't use" - no: Use - - [Experimental zebraqueue daemon ONLY] Tell zebraqueue daemon to be more verbose on logging. - -- 1.7.2.5 From tomascohen at gmail.com Tue May 3 16:23:41 2011 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Tue, 3 May 2011 11:23:41 -0300 Subject: [Koha-patches] [PATCH 2/2] Bug 5166 - Fix as of Bug 5724 Message-ID: <1304432621-6501-1-git-send-email-tomascohen@gmail.com> As noted in Bug 5724, deletions should be processed AFTER updates, so an late update doesn't reinsert the deleted record. To+ --- C4/Catalog/Zebra.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Catalog/Zebra.pm b/C4/Catalog/Zebra.pm index 9c7dc4e..a96d2f4 100644 --- a/C4/Catalog/Zebra.pm +++ b/C4/Catalog/Zebra.pm @@ -125,8 +125,8 @@ sub IndexZebraqueueRecords my ($num_records_updated,$num_records_deleted); - $num_records_deleted = (IndexZebraqueueByAction('deleted',$record_type,$record_format,$as_xml,$noxml)||0); $num_records_updated = (IndexZebraqueueByAction('updated',$record_type,$record_format,$as_xml,$noxml)||0); + $num_records_deleted = (IndexZebraqueueByAction('deleted',$record_type,$record_format,$as_xml,$noxml)||0); return $num_records_deleted + $num_records_updated; } -- 1.7.4.1 From conan at lugmen.org.ar Tue May 3 16:33:55 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Tue, 3 May 2011 11:33:55 -0300 Subject: [Koha-patches] Spam [PATCH 7/7] Bug 5166 - Fix as of Bug 5724 [SIGNED-OFF] Message-ID: <1304433235-9761-1-git-send-email-conan@lugmen.org.ar> From: Tomas Cohen Arazi As noted in Bug 5724, deletions should be processed AFTER updates, so an late update doesn't reinsert the deleted record. To+ Signed-off-by: conan (aka Fernando L. Canizo) --- C4/Catalog/Zebra.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Catalog/Zebra.pm b/C4/Catalog/Zebra.pm index 9c7dc4e..a96d2f4 100644 --- a/C4/Catalog/Zebra.pm +++ b/C4/Catalog/Zebra.pm @@ -125,8 +125,8 @@ sub IndexZebraqueueRecords my ($num_records_updated,$num_records_deleted); - $num_records_deleted = (IndexZebraqueueByAction('deleted',$record_type,$record_format,$as_xml,$noxml)||0); $num_records_updated = (IndexZebraqueueByAction('updated',$record_type,$record_format,$as_xml,$noxml)||0); + $num_records_deleted = (IndexZebraqueueByAction('deleted',$record_type,$record_format,$as_xml,$noxml)||0); return $num_records_deleted + $num_records_updated; } -- 1.7.2.5 From oleonard at myacpl.org Tue May 3 21:13:12 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 3 May 2011 15:13:12 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6295 - misaligned columns in opac suggestions list Message-ID: <1304449992-7264-1-git-send-email-oleonard@myacpl.org> Template variable scope error. --- .../opac-tmpl/prog/en/modules/opac-suggestions.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt index 2b69612..3f3aa34 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt @@ -180,7 +180,7 @@ $.tablesorter.addParser({ [% suggestions_loo.note %] - [% IF ( suggestions_loo.OPACViewOthersSuggestions ) %] + [% IF ( OPACViewOthersSuggestions ) %] [% IF ( suggestions_loo.branchcodesuggestedby ) %][% suggestions_loo.branchcodesuggestedby %][% ELSE %] [% END %] [% END %] -- 1.7.3 From oleonard at myacpl.org Thu May 5 15:33:23 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 5 May 2011 09:33:23 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6309, subscription table sorter in the opac Message-ID: <1304602403-11876-1-git-send-email-oleonard@myacpl.org> --- .../prog/en/modules/opac-full-serial-issues.tt | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt index a74a4b5..cde8a89 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt @@ -1,5 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Subscription information for [% bibliotitle %] [% INCLUDE 'doc-head-close.inc' %] + -- 1.5.6.5 From ruth at bywatersolutions.com Wed May 11 07:55:33 2011 From: ruth at bywatersolutions.com (ruth at bywatersolutions.com) Date: Wed, 11 May 2011 01:55:33 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6325 Bib detail - z39.50 button functionality should be under "Edit" menu Message-ID: <1305093333-32137-1-git-send-email-ruth@bywatersolutions.com> From: Liz Rea Moves the button functionality under the "Edit" drop down, as "Replace Record via Z39.50" To test: Click Edit -> Replace Record via Z39.50 and attempt to replace the record. Signed-off-by: D Ruth Bavousett --- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 3c32160..9766494 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -98,6 +98,7 @@ function confirm_items_deletion() { [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]" },[% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]" },[% END %] [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] + [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace Record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete Record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] },[% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }[% END %] ]; @@ -182,15 +183,7 @@ function confirm_items_deletion() { }); [% END %] [% END %][% END %] - [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] - new YAHOO.widget.Button({ - id: "z3950search", - type: "button", - label: _("Z39.50 Search"), - container: this, - onclick: {fn:function(){PopupZ3950()}} - }); - [% END %] + }); //]]> -- 1.7.2.3 From ian.walls at bywatersolutions.com Wed May 11 21:46:29 2011 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Wed, 11 May 2011 15:46:29 -0400 Subject: [Koha-patches] [PATCH] Bug 6330 - Change hold language from 'until' to 'since' Message-ID: <1305143189-26521-1-git-send-email-ian.walls@bywatersolutions.com> From: Nicole C. Engard Signed-off-by: Nicole C. Engard Signed-off-by: Ian Walls --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index b5761bc..58c6fa5 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -398,7 +398,7 @@ $.tablesorter.addParser({ [% IF ( RESERVE.wait ) %] [% IF ( RESERVE.atdestination ) %] [% IF ( RESERVE.found ) %] - Item waiting at [% RESERVE.wbrname %][% IF ( RESERVE.formattedwaitingdate ) %] until [% RESERVE.formattedwaitingdate %][% END %] + Item waiting at [% RESERVE.wbrname %][% IF ( RESERVE.formattedwaitingdate ) %] since [% RESERVE.formattedwaitingdate %][% END %] [% ELSE %] Item waiting to be pulled from [% RESERVE.wbrname %] -- 1.5.6.5 From srdjan at catalyst.net.nz Thu May 12 05:04:32 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 12 May 2011 15:04:32 +1200 Subject: [Koha-patches] [PATCH] bug_6190: added nb-NO to sysprefs test In-Reply-To: References: Message-ID: <1305169472-12997-1-git-send-email-srdjan@catalyst.net.nz> --- .../data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql | 18 ++++++++++++++++-- xt/syspref.t | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql index b1c6fb5..975a3e4 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql @@ -41,6 +41,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','surname|cardnumber','Choose the mandatory fields for a patron\'s account',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('borrowerRelationship','far|mor','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'); @@ -48,6 +49,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casServerUrl', 'https://localhost:8443/cas', 'URL of the cas server', '', 'Free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CataloguingLog',1,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('checkdigit','none','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','none|katipo','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('COinSinOPACResults', 1, 'If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('delimiter',';','Define the default separator character for exporting reports',';|tabulation|,|/|\\|#|\|','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnhancedMessagingPreferences',0,'If ON, allows patrons to select to receive additional messages about items due or nearly due.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('expandedSearchOption',0,'If ON, set advanced search to be expanded by default',NULL,'YesNo'); @@ -55,6 +57,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','normal|marc|isbd|labeled_marc','Choice'); @@ -118,6 +121,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnBeforeExpiry',0,'If ON, checkout will be prevented if returndate is after patron card expiry',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ReturnLog',1,'If ON, enables the circulation (returns) log',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('reviewson',1,'If ON, enables patron reviews of bibliographic records in the OPAC','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ShowReviewer',1,'If ON, name of reviewer will be shown above comments in OPAC','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Define whether to display \"Specify Due Date\" form in Circulation','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionHistory','simplified','Define the display preference for serials issue history in OPAC','simplified|full','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SubscriptionLog',1,'If ON, enables subscriptions log',NULL,'YesNo'); @@ -126,6 +130,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('timeout',12000000,'Inactivity timeout for cookies authentication (in seconds)',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TransfersMaxDaysWarning',3,'Define the days before a transfer is suspected of having a problem',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('useDaysMode','Calendar','Choose the method for calculating due date: select Calendar to use the holidays module, and Days to ignore the holidays module','Calendar|Days|Datedue','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseControlNumber',0,'If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('virtualshelves',1,'If ON, enables Lists management','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('z3950AuthorAuthFields','701,702,700','Define the MARC biblio fields for Personal Name Authorities to fill biblio.author',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('z3950NormalizeAuthor',0,'If ON, Personal Name Authorities will replace authors in biblio.author','','YesNo'); @@ -159,6 +164,9 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES -- need AddressType to distinguish between US and other, telephone numbers, maori stuff, sex, nationality, etc. -- LDAP ? required fields? INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WebBasedSelfCheck',0,'If ON, enables the web-based self-check system',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SelfCheckTimeout',120,'Define the number of seconds before the Web-based Self Checkout times out a patron','','Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AllowSelfCheckReturns',0,'If enabled, patrons may return items through the Web-based Self Checkout','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SelfCheckHelpMessage','','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','70|10','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchResults',20,'Specify the maximum number of results to display on a page of results',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACnumSearchResults',20,'Specify the maximum number of results to display on a page of results',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('defaultSortField',NULL,'Specify the default field used for sorting','relevance|popularity|call_number|pubdate|acqdate|title|author','Choice'); @@ -172,8 +180,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); @@ -285,6 +291,7 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'DisplayClearScreenButton', '0', '', 'If set to ON, a clear screen button will appear on the circulation page.', 'YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patron''s cardnumber will be shown instead of their name on the holds and catalog screens', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACSearchForTitleIn','
  • Andre bibliotek (WorldCat)
  • \n
  • Andre databaser (Google Scholar)
  • \n
  • Nettbutikker (Bookfinder.com)
  • ','Skriv inn HTML som vil vises i \'Flere s??k\'-menyen i detaljvisningen i OPACen. Bruk {TITLE}, {AUTHOR} eller {ISBN} som variabler i URLer. La feltet v??re tomt for ?? skru av \'Flere s??k\'-menyen.','70|10','Textarea'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACMySummaryHTML','','Enter the HTML that will appear in a column on the \'my profile\' tab when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','70|10','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo'); @@ -320,3 +327,10 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('StaffAuthorisedValueImages','1','',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACDisplay856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','OFF|Details|Results|Both','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); diff --git a/xt/syspref.t b/xt/syspref.t index 1b7c438..7b1fb76 100755 --- a/xt/syspref.t +++ b/xt/syspref.t @@ -33,6 +33,7 @@ my @trans_syspref_files = qw( uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql pl-PL/mandatory/sysprefs.sql + nb-NO/1-Obligatorisk/sysprefs.sql ); ok( -- 1.6.5 From chrisc at catalyst.net.nz Thu May 12 08:40:56 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 12 May 2011 18:40:56 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Alternate fix for Bug 5876, New permission for overdues report Message-ID: <1305182456-24798-1-git-send-email-chrisc@catalyst.net.nz> From: Owen Leonard Original fix included a change for offline circ that depended on a fix for another bug. This patch adds only the permission for the overdues report and is formatted for TT. Signed-off-by: Chris Cormack --- .../prog/en/modules/circ/circulation-home.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt index 6c2f69a..2383599 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -38,9 +38,9 @@
  • Holds awaiting pickup
  • Hold ratios
  • Transfers to receive
  • -
  • Overdues + [% IF ( CAN_user_reports_execute_reports ) %]
  • Overdues - Warning: This report is very resource intensive on - systems with large numbers of overdue items.
  • + systems with large numbers of overdue items.[% END %]
  • Overdues with fines - Limited to your library. See report help for other details.
  • -- 1.7.4.1 From chrisc at catalyst.net.nz Thu May 12 08:46:00 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 12 May 2011 18:46:00 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] 4959: Language inconsistencies on basket groups; skip confirmation when closing basket. Message-ID: <1305182760-25073-1-git-send-email-chrisc@catalyst.net.nz> From: Marcel de Rooy Follow up patch for installing pref BasketConfirmations. Signed-off-by: Chris Cormack --- installer/data/mysql/de-DE/mandatory/sysprefs.sql | 3 ++- installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../1-Obligatoire/unimarc_standard_systemprefs.sql | 3 ++- installer/data/mysql/it-IT/necessari/sysprefs.sql | 1 + .../data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql | 1 + installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 3 ++- ...m_preferences_full_optimal_for_install_only.sql | 3 ++- ...m_preferences_full_optimal_for_install_only.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ 9 files changed, 19 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index c7c885d..771a676 100755 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -311,4 +311,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index f98b053..9eb4be5 100755 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -312,3 +312,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 185c74b..271c80f 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -312,4 +312,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index fca0cfb..3a06cc9 100755 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -299,3 +299,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql index b1c6fb5..357dd9a 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql @@ -320,3 +320,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index c39e231..ea4e2e7 100755 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -310,4 +310,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index a7c6a10..42f537f 100755 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -365,4 +365,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index f370766..26f2c26 100755 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -391,3 +391,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..581e273 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4332,6 +4332,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice');"); + print "Upgrade to $DBversion done (Adds pref BasketConfirmations)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.7.4.1 From christophe.croullebois at biblibre.com Thu May 12 15:02:07 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Thu, 12 May 2011 15:02:07 +0200 Subject: [Koha-patches] (no subject) Message-ID: <1305205327-21547-1-git-send-email-christophe.croullebois@biblibre.com> In the UNIMARslim2OAID.xsl the link to biblio was hardcoded, with this patch it takes the value of OPACBaseURL. --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 2 +- opac/oai.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 27c78ed..015a16a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -168,7 +168,7 @@ - http://opac.mylibrary.org/bib/ + /bib/ diff --git a/opac/oai.pl b/opac/oai.pl index 51ce9af..d0878a0 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -202,8 +202,9 @@ sub new { my $parser = XML::LibXML->new(); my $record_dom = $parser->parse_string($marcxml); my $format = $args{metadataPrefix}; + my $syspref = C4::Context->preference("OPACBaseURL"); if ( $format ne 'marcxml' ) { - $record_dom = $repository->stylesheet($format)->transform($record_dom); + $record_dom = $repository->stylesheet($format)->transform($record_dom, syspref=> $syspref); } $self->metadata( HTTP::OAI::Metadata->new( dom => $record_dom ) ); -- 1.7.0.4 From nengard at bywatersolutions.com Wed May 11 06:32:26 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 11 May 2011 00:32:26 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6323 -- Error handling cleanup for moveitem.tt Message-ID: <1305088346-8996-1-git-send-email-nengard@bywatersolutions.com> From: Liz Rea Added button to retry attaching item, added default bib view handling, cosmetic changes to the error display (buttons now in error div). Signed-off-by: Nicole C. Engard --- .../prog/en/modules/cataloguing/moveitem.tt | 105 +++++++++++++++----- 1 files changed, 81 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt index 4956f18..2c1afd7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt @@ -5,33 +5,90 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
    [% IF ( error ) %]
    - [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.[% END %] - [% IF ( errornoitem ) %]ERROR: Unable to get the item.[% END %] - [% IF ( errornoitemnumber ) %]ERROR: Unable to get the item number from this barcode.[% END %] -
    -
    - - -
    -[% ELSE %] - [% IF ( success ) %] -
    The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %][% bibliotitle |html %].[% IF ( BiblioDefaultViewmarc ) %] -
    -[% ELSIF ( BiblioDefaultViewlabeled_marc ) %] - -[% ELSIF ( BiblioDefaultViewisbd ) %] - -[% ELSE %] - -[% END %] - - -
    + [% IF ( errornonewitem ) %]ERROR: Unable to create the new item.

    + + [% IF ( BiblioDefaultViewmarc ) %] +

    + [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] + + [% ELSIF ( BiblioDefaultViewisbd ) %] + + [% ELSE %] + + [% END %] + + +
    +
    + + +
    +
    + [% END %] + + [% IF ( errornoitem ) %]ERROR: Unable to get the item.

    + + [% IF ( BiblioDefaultViewmarc ) %] +

    + [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] + + [% ELSIF ( BiblioDefaultViewisbd ) %] + + [% ELSE %] + + [% END %] + + +
    +
    + + +
    + + [% END %] + + [% IF ( errornoitemnumber ) %]ERROR: Unable to get the item number from this barcode.

    + + [% IF ( BiblioDefaultViewmarc ) %] +

    + [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] + + [% ELSIF ( BiblioDefaultViewisbd ) %] + + [% ELSE %] + + [% END %] + + +
    +
    + + +
    + + [% END %] + + [% ELSE %] + [% IF ( success ) %] +
    The item has successfully been attached to [% INCLUDE 'biblio-default-view.inc' %][% bibliotitle |html %]. + [% IF ( BiblioDefaultViewmarc ) %] +
    + [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] + + [% ELSIF ( BiblioDefaultViewisbd ) %] + + [% ELSE %] + + [% END %] + + +
    +
    [% ELSE %] [% IF ( missingparameter ) %] @@ -39,7 +96,7 @@ [% IF ( missingbiblionumber ) %]
    -
    Enter biblionumber:
    +
    Enter biblionumber:
    -- 1.7.2.3 From oleonard at myacpl.org Thu May 12 16:58:31 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 12 May 2011 10:58:31 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6291, Cart printing truncated in Firefox Message-ID: <1305212311-21658-1-git-send-email-oleonard@myacpl.org> Implementing 100% width and height on ,
    , and as suggested by this post: http://www.piglets.org/serendipity/archives/45-Fixing-truncated-printing-with-Firefox.html --- koha-tmpl/opac-tmpl/prog/en/css/print.css | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/print.css b/koha-tmpl/opac-tmpl/prog/en/css/print.css index 85df351..53db2bc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/print.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/print.css @@ -17,7 +17,7 @@ body { background-color : #FFF; color : #333333; font-family : arial, geneva, sans-serif; - font-size : 14px; + font-size : 12px; margin : 0px 0px 0px 0px; } @@ -98,7 +98,8 @@ table { border-left : 0px solid #CCCCCC; margin : 3px 0px 5px 0px; padding : 0px; - width : 99%; + width : 100%; + height : 100%; } td { @@ -107,6 +108,8 @@ td { border-right : 1px solid #CCCCCC; padding : 5px 5px 5px 5px; vertical-align : top; + width : 100%; + height : 100%; } td:last-child { @@ -123,6 +126,8 @@ th { border-right : 1px solid #CCCCCC; font-weight : bold; padding : 5px 5px 5px 5px; + width: 100%; + height : 100%; } th:last-child { -- 1.7.3 From christophe.croullebois at biblibre.com Thu May 12 17:13:40 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Thu, 12 May 2011 17:13:40 +0200 Subject: [Koha-patches] bug 6334 [PATCH 1/1] In the UNIMARslim2OAID.xsl the link to biblio was hardcoded, with this patch it takes the value of OPACBaseURL. Message-ID: <1305213220-25108-1-git-send-email-christophe.croullebois@biblibre.com> --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 2 +- opac/oai.pl | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 0e5a80d..9c8d8a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -165,7 +165,7 @@ - http://opac.mylibrary.org/bib/ + /bib/ diff --git a/opac/oai.pl b/opac/oai.pl index 038b6d1..83d31dc 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -200,16 +200,19 @@ sub new { my $self = $class->SUPER::new(%args); $timestamp =~ s/ /T/, $timestamp .= 'Z'; - $self->header( new HTTP::OAI::Header( - identifier => $args{identifier}, - datestamp => $timestamp, - ) ); - - my $parser = XML::LibXML->new(); - my $record_dom = $parser->parse_string( $marcxml ); - my $format = $args{metadataPrefix}; + $self->header( + new HTTP::OAI::Header( + identifier => $args{identifier}, + datestamp => $timestamp, + ) + ); + + my $parser = XML::LibXML->new(); + my $record_dom = $parser->parse_string($marcxml); + my $format = $args{metadataPrefix}; + my $syspref = C4::Context->preference("OPACBaseURL"); if ( $format ne 'marcxml' ) { - $record_dom = $repository->stylesheet($format)->transform( $record_dom ); + $record_dom = $repository->stylesheet($format)->transform($record_dom, syspref=> $syspref); } $self->metadata( HTTP::OAI::Metadata->new( dom => $record_dom ) ); -- 1.7.0.4 From f.demians at tamil.fr Thu May 12 20:07:16 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Thu, 12 May 2011 20:07:16 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6328 fine in days does not work Message-ID: <1305223636-27377-1-git-send-email-f.demians@tamil.fr> From: Paul Poulain Some code coming from BibLibre has been lost in the process of inclusion in 3.4. The result is that fine in days does not work at all (you can setup rules, but it does nothing) Step to reproduce: - Koha > Admin > circ rules > set 1 day fine every day of overdue for default rule - Issue a book return date last week - check-in the book => no debarment is set The following patch will fix all of those problems by : * updating borrowers.debarred to a date field (instead of tinyint). It contains the limit of the debarment * changing API of DebarMember and UpdateBorrowerDebarred to pass a date * display debarrdate where applicable. Note that a debarrdate of 31/12/9999 is considered as unlimited and not displayed * added a debarrcomment, usefull to explain why a patron is debarred (this is independant from debarrdate changes and can be used when placing an unlimited debarment too) [2011-05-12] F. Demians. It works as described. And I can confirm this functionality is impatiently awaited by French libraries since one year. Thanks BibLibre for the good work and for contributing this code. Signed-off-by: Fr?d?ric Demians --- C4/Circulation.pm | 60 ++++++++++++++++++++ C4/Members.pm | 11 ++- C4/Overdues.pm | 23 ++++---- circ/circulation.pl | 11 ++++ circ/returns.pl | 7 ++- installer/data/mysql/updatedatabase.pl | 11 ++++ .../prog/en/modules/circ/circulation.tt | 10 +++ .../intranet-tmpl/prog/en/modules/circ/returns.tt | 3 + .../prog/en/modules/members/memberentrygen.tt | 36 +++++++++++- .../prog/en/modules/members/moremember.tt | 5 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 +- kohaversion.pl | 2 +- members/memberentry.pl | 19 +++++- members/moremember.pl | 12 ++++- members/setstatus.pl | 4 +- opac/opac-user.pl | 1 + 16 files changed, 188 insertions(+), 29 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a2db4c..5aff6ab 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -43,6 +43,7 @@ use Date::Calc qw( Date_to_Days Day_of_Week Add_Delta_Days + check_date ); use POSIX qw(strftime); use C4::Branch; # GetBranches @@ -1626,6 +1627,10 @@ sub AddReturn { if ($borrowernumber) { my $fix = _FixOverduesOnReturn($borrowernumber, $item->{itemnumber}, $exemptfine, $dropbox); defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, $item->{itemnumber}...) failed!"; # zero is OK, check defined + + # fix fine days + my $debardate = _FixFineDaysOnReturn( $borrower, $item, $issue->{date_due} ); + $messages->{'Debarred'} = $debardate if ($debardate); } # find reserves..... @@ -1749,6 +1754,61 @@ sub MarkIssueReturned { $sth_del->execute($borrowernumber, $itemnumber); } +=head2 _FixFineDaysOnReturn + + &_FixFineDaysOnReturn($borrower, $item, $datedue); + +C<$borrower> borrower hashref + +C<$item> item hashref + +C<$datedue> date due + +Internal function, called only by AddReturn that calculate and update the user fine days, and debars him + +=cut + +sub _FixFineDaysOnReturn { + my ( $borrower, $item, $datedue ) = @_; + + if ($datedue) { + $datedue = C4::Dates->new( $datedue, "iso" ); + } else { + return; + } + + my $branchcode = _GetCircControlBranch( $item, $borrower ); + my $calendar = C4::Calendar->new( branchcode => $branchcode ); + my $today = C4::Dates->new(); + + my $deltadays = $calendar->daysBetween( $datedue, C4::Dates->new() ); + + my $circcontrol = C4::Context::preference('CircControl'); + my $issuingrule = GetIssuingRule( $borrower->{categorycode}, $item->{itype}, $branchcode ); + my $finedays = $issuingrule->{finedays}; + + # exit if no finedays defined + return unless $finedays; + my $grace = $issuingrule->{firstremind}; + + if ( $deltadays - $grace > 0 ) { + my @newdate = Add_Delta_Days( Today(), $deltadays * $finedays ); + my $isonewdate = join( '-', @newdate ); + my ( $deby, $debm, $debd ) = split( /-/, $borrower->{debarred} ); + if ( check_date( $deby, $debm, $debd ) ) { + my @olddate = split( /-/, $borrower->{debarred} ); + + if ( Delta_Days( @olddate, @newdate ) > 0 ) { + C4::Members::DebarMember( $borrower->{borrowernumber}, $isonewdate ); + return $isonewdate; + } + } else { + C4::Members::DebarMember( $borrower->{borrowernumber}, $isonewdate ); + return $isonewdate; + } + } +} + =head2 _FixOverduesOnReturn &_FixOverduesOnReturn($brn,$itm, $exemptfine, $dropboxmode); diff --git a/C4/Members.pm b/C4/Members.pm index a151e03..8400e6b 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -2090,7 +2090,7 @@ sub GetBorrowersNamesAndLatestIssue { =head2 DebarMember - my $success = DebarMember( $borrowernumber ); +my $success = DebarMember( $borrowernumber, $todate ); marks a Member as debarred, and therefore unable to checkout any more items. @@ -2102,13 +2102,16 @@ true on success, false on failure sub DebarMember { my $borrowernumber = shift; + my $todate = shift; return unless defined $borrowernumber; return unless $borrowernumber =~ /^\d+$/; - return ModMember( borrowernumber => $borrowernumber, - debarred => 1 ); - + return ModMember( + borrowernumber => $borrowernumber, + debarred => $todate + ); + } =head2 ModPrivacy diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 28b135c..cdc2d50 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -1048,16 +1048,17 @@ sub CheckBorrowerDebarred { SELECT debarred FROM borrowers WHERE borrowernumber=? + AND debarred > NOW() |; my $sth = $dbh->prepare($query); $sth->execute($borrowernumber); - my ($debarredstatus) = $sth->fetchrow; - return ( $debarredstatus eq '1' ? 1 : 0 ); + my $debarredstatus = $sth->fetchrow; + return $debarredstatus; } =head2 UpdateBorrowerDebarred - ($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber); +($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber, $todate); update status of borrowers in borrowers table (field debarred) @@ -1066,16 +1067,16 @@ C<$borrowernumber> borrower number =cut sub UpdateBorrowerDebarred{ - my($borrowernumber) = @_; - my $dbh = C4::Context->dbh; - my $query=qq|UPDATE borrowers - SET debarred='1' + my ( $borrowernumber, $todate ) = @_; + my $dbh = C4::Context->dbh; + my $query = qq|UPDATE borrowers + SET debarred=? WHERE borrowernumber=? |; - my $sth=$dbh->prepare($query); - $sth->execute($borrowernumber); - $sth->finish; - return 1; + my $sth = $dbh->prepare($query); + $sth->execute( $todate, $borrowernumber ); + $sth->finish; + return 1; } =head2 CheckExistantNotifyid diff --git a/circ/circulation.pl b/circ/circulation.pl index 8c359b1..ff5b5a1 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -30,6 +30,7 @@ use C4::Dates qw/format_date/; use C4::Branch; # GetBranches use C4::Koha; # GetPrinter use C4::Circulation; +use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Members; use C4::Biblio; use C4::Reserves; @@ -259,6 +260,16 @@ if ($borrowernumber) { issuecount => $issue, finetotal => $fines ); + + my $debar = CheckBorrowerDebarred($borrowernumber); + if ($debar) { + $template->param( 'userdebarred' => 1 ); + $template->param( 'debarredcomment' => $borrower->{debarredcomment} ); + if ( $debar ne "9999-12-31" ) { + $template->param( 'userdebarreddate' => C4::Dates::format_date($debar) ); + } + } + } # diff --git a/circ/returns.pl b/circ/returns.pl index d7fad0c..17635ac 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -454,7 +454,12 @@ foreach my $code ( keys %$messages ) { } elsif ( $code eq 'Wrongbranch' ) { } - + elsif ( $code eq 'Debarred' ) { + $err{debarred} = format_date( $messages->{'Debarred'} ); + $err{debarcardnumber} = $borrower->{cardnumber}; + $err{debarborrowernumber} = $borrower->{borrowernumber}; + $err{debarname} = "$borrower->{firstname} $borrower->{surname}"; + } else { die "Unknown error code $code"; # note we need all the (empty) elsif's above, or we die. # This forces the issue of staying in sync w/ Circulation.pm diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..ab8ac9a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4332,6 +4332,17 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.05.00.002"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + my $borrowers = $dbh->selectcol_arrayref( "SELECT borrowernumber from borrowers where debarred <>0;", { Columns => [1] } ); + $dbh->do("ALTER TABLE borrowers MODIFY debarred DATE DEFAULT NULL;"); + $dbh->do( "UPDATE borrowers set debarred='9999-12-31' where borrowernumber IN (" . join( ",", @$borrowers ) . ");" ) if ($borrowers and scalar(@$borrowers)>0); + $dbh->do("ALTER TABLE borrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;"); + print "Upgrade done (Change borrowers.debarred into Date )\n"; + + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index afa6ec5..b3dbfab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -567,6 +567,16 @@ No patron matched [% message %]
  • Lost: Patron's card is lost
  • [% END %] + [% IF ( userdebarred ) %] +
  • + Restricted: Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %] +
    + + + +
    +
  • [% END %] + [% IF ( dbarred ) %]
  • Restricted: Patron's account is restricted Lift restriction
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 620f770..6e1f3a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -304,6 +304,9 @@ function Dopop(link) { [% IF ( errmsgloo.withdrawn ) %]

    Item is withdrawn.

    [% END %] + [% IF ( errmsgloo.debarred ) %] +

    [% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %]) is now debarred until [% errmsgloo.debarred %]

    + [% END %] [% END %] [% IF ( soundon ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 497b9ac..91f5c1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -947,7 +947,6 @@ [% FOREACH flagloo IN flagloop %]
  • @@ -963,10 +962,43 @@ [% END %] -
  • + [% END %] +
  • + + [% IF ( debarred ) %] + + + + + [% ELSE %] + + + + + [% END %] + +
    + + + Show Calendar + +
    + + +
  • + + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index f8073bb..aabd67e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -158,11 +158,10 @@ function validate1(date) { [% IF ( flagged ) %]
      - [% IF ( debarred ) %] -
    • Patron is restricted + [% IF ( userdebarred ) %] +
    • Patron is restricted[% IF ( userdebarreddate ) %] until [% userdebarreddate%] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %][% END %]
      -
    • diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 58c6fa5..71a09a2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -102,7 +102,7 @@ $.tablesorter.addParser({
        [% IF ( BORROWER_INF.debarred ) %] -
      • Please note: Your account has been frozen. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
      • +
      • Please note: Your account has been frozen until [% BORROWER_INF.debarred %] - [% BORROWER_INF.debarredcomment %]. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
      • [% END %] [% IF ( BORROWER_INF.gonenoaddress ) %]
      • Please note: According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]contact information[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)[% END %].
      • diff --git a/kohaversion.pl b/kohaversion.pl index c3b86a9..470ca3d 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.05.00.001'; + our $VERSION = '3.05.00.002'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install diff --git a/members/memberentry.pl b/members/memberentry.pl index a8e764c..f17ef6c 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -128,6 +128,17 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) $newdata{$key} =~ s/\"/"/g unless $key eq 'borrowernotes' or $key eq 'opacnote'; } } + + ## Manipulate debarred + if ( $newdata{debarred} ) { + $newdata{debarred} = $newdata{datedebarred} ? $newdata{datedebarred} : "9999-12-31"; + } elsif ( exists( $newdata{debarred} ) && !( $newdata{debarred} ) ) { + undef( $newdata{debarred} ); + undef( $newdata{debarredcomment} ); + } elsif ( exists( $newdata{debarredcomment} ) && $newdata{debarredcomment} eq "" ) { + undef( $newdata{debarredcomment} ); + } + my $dateobject = C4::Dates->new(); my $syspref = $dateobject->regexp(); # same syspref format for all 3 dates my $iso = $dateobject->regexp('iso'); # @@ -507,8 +518,7 @@ while (@relationships) { } my %flags = ( 'gonenoaddress' => ['gonenoaddress' ], - 'lost' => ['lost'], - 'debarred' => ['debarred']); + 'lost' => ['lost']); my @flagdata; @@ -627,7 +637,10 @@ if (C4::Context->preference('uppercasesurnames')) { $data{'surname'} =uc($data{'surname'} ); $data{'contactname'}=uc($data{'contactname'}); } -foreach (qw(dateenrolled dateexpiry dateofbirth)) { + +$data{debarred} = C4::Overdues::CheckBorrowerDebarred($borrowernumber); +$data{datedebarred} = $data{debarred} if ( $data{debarred} ne "9999-12-31" ); +foreach (qw(dateenrolled dateexpiry dateofbirth datedebarred)) { $data{$_} = format_date($data{$_}); # back to syspref for display $template->param( $_ => $data{$_}); } diff --git a/members/moremember.pl b/members/moremember.pl index b766f2f..b2135a4 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -49,6 +49,7 @@ use C4::Letters; use C4::Biblio; use C4::Reserves; use C4::Branch; # GetBranchName +use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Form::MessagingPreferences; use C4::NewsChannels; #get slip news use List::MoreUtils qw/uniq/; @@ -148,10 +149,19 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { } $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); -for (qw(debarred gonenoaddress lost borrowernotes)) { +for (qw(gonenoaddress lost borrowernotes)) { $data->{$_} and $template->param(flagged => 1) and last; } +my $debar = CheckBorrowerDebarred($borrowernumber); +if ($debar) { + $template->param( 'userdebarred' => 1, 'flagged' => 1 ); + if ( $debar ne "9999-12-31" ) { + $template->param( 'userdebarreddate' => C4::Dates::format_date($debar) ); + $template->param( 'debarredcomment' => $data->{debarredcomment} ); + } +} + $data->{'ethnicity'} = fixEthnicity( $data->{'ethnicity'} ); $data->{ "sex_".$data->{'sex'}."_p" } = 1; diff --git a/members/setstatus.pl b/members/setstatus.pl index addeeb3..a45a331 100755 --- a/members/setstatus.pl +++ b/members/setstatus.pl @@ -51,8 +51,8 @@ if ( $reregistration eq 'y' ) { # re-reregistration function to automatic calcul of date expiry $dateexpiry = ExtendMemberSubscriptionTo( $borrowernumber ); } else { - my $sth=$dbh->prepare("Update borrowers set debarred = ? where borrowernumber = ?"); - $sth->execute($status,$borrowernumber); + my $sth = $dbh->prepare("UPDATE borrowers SET debarred = ?, debarredcomment = '' WHERE borrowernumber = ?"); + $sth->execute( $status, $borrowernumber ); $sth->finish; } diff --git a/opac/opac-user.pl b/opac/opac-user.pl index a2f7d9b..9cfa9e0 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -93,6 +93,7 @@ if ( $borr->{'amountoutstanding'} < 0 ) { } $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; +$borr->{'debarred'} = C4::Dates->new($borr->{'debarred'},'iso')->output; my @bordat; $bordat[0] = $borr; -- 1.7.4 From chrisc at catalyst.net.nz Fri May 13 00:25:27 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 10:25:27 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 4951 - Print page doesn't close after print This patch adds the print/close functionality present on all other slips to the full page account summary. Message-ID: <1305239127-18372-1-git-send-email-chrisc@catalyst.net.nz> From: Liz Rea Signed-off-by: Chris Cormack --- .../prog/en/modules/members/moremember-print.tt | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 0452614..f84052b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -3,6 +3,14 @@ + + + -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 00:38:02 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 10:38:02 +1200 Subject: [Koha-patches] [Signed Offf] [PATCH] Bug 5098: Add csv headers in overdues Message-ID: <1305239882-19012-1-git-send-email-chrisc@catalyst.net.nz> From: Julian Maurice Signed-off-by: Chris Cormack --- misc/cronjobs/overdue_notices.pl | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index bc97ecb..698b878 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -584,10 +584,14 @@ END_SQL local $, = "\f"; # pagebreak print @output_chunks; } + # Generate the content of the csv with headers + my $content = join(";", qw(title name surname address1 address2 zipcode city email itemcount itemsinfo due_date issue_date)) . "\n"; + $content .= join( "\n", @output_chunks ); + my $attachment = { filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt', type => 'text/plain', - content => join( "\n", @output_chunks ) + content => $content, }; my $letter = { -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 01:05:50 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 11:05:50 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 5639 (MT #3605) Fix escaping in ILSDI Message-ID: <1305241550-20376-1-git-send-email-chrisc@catalyst.net.nz> From: Jean-Andr? Santoni Signed-off-by: Chris Cormack --- C4/ILSDI/Services.pm | 15 ++------ koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt | 44 +++++++++++++------------- opac/ilsdi.pl | 1 - 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index ba0c429..90f741a 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -193,15 +193,12 @@ sub GetRecords { # Get the biblioitem from the biblionumber my $biblioitem = ( GetBiblioItemByBiblioNumber( $biblionumber, undef ) )[0]; if ( not $biblioitem->{'biblionumber'} ) { - $biblioitem = "RecordNotFound"; + $biblioitem->{code} = "RecordNotFound"; } # We don't want MARC to be displayed delete $biblioitem->{'marc'}; - # nor the XML declaration of MARCXML - $biblioitem->{'marcxml'} =~ s/<\?xml version="1.0" encoding="UTF-8"\?>//go; - # Get most of the needed data my $biblioitemnumber = $biblioitem->{'biblioitemnumber'}; my @reserves = GetReservesFromBiblionumber( $biblionumber, undef, undef ); @@ -224,8 +221,6 @@ sub GetRecords { $biblioitem->{'reserves'}->{'reserve'} = $reserves[1]; $biblioitem->{'issues'}->{'issue'} = $issues; - map { $biblioitem->{$_} = encode_entities( $biblioitem->{$_}, '&' ) } grep( !/marcxml/, keys %$biblioitem ); - push @records, $biblioitem; } @@ -256,18 +251,16 @@ sub GetAuthorityRecords { return { code => 'UnsupportedSchema' }; } - my $records; + my @records; # Let's loop over the authority IDs foreach my $authid ( split( / /, $cgi->param('id') ) ) { # Get the record as XML string, or error code - my $record = GetAuthorityXML($authid) || "RecordNotFound"; - $record =~ s/<\?xml(.*)\?>//go; - $records .= $record; + push @records, GetAuthorityXML($authid) || { code => 'RecordNotFound' }; } - return $records; + return { record => \@records }; } =head2 LookupPatron diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt b/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt index 765febc..acd1258 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt @@ -120,6 +120,7 @@ <biblioitemnumber>1</biblioitemnumber> <isbn>9782862749198</isbn> <marcxml> + <?xml version="1.0" encoding="UTF-8" ?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/ standards/marcxml/schema/MARC21slim.xsd" @@ -208,6 +209,7 @@ <biblioitemnumber>2</biblioitemnumber> <isbn>9782265078031</isbn> <marcxml> + <?xml version="1.0" encoding="UTF-8" ?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/ standards/marcxml/schema/MARC21slim.xsd" @@ -316,41 +318,39 @@ ilsdi.pl?service=GetAuthorityRecords&id=1+2+99999

        Example Response

        -
        <?xml version="1.0" encoding="ISO-8859-1" ?>
        +
        <xml version="1.0" encoding="UTF-8">;
         <GetAuthorityRecords>
        +  <record>
        +    <?xml version="1.0" encoding="UTF-8"?>
           <record
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/ standards/marcxml/schema/MARC21slim.xsd"
             xmlns="http://www.loc.gov/MARC21/slim">
        -    <leader>00126nx  j2200073   4500 </leader>
        +      <leader>00182     2200085   4500</leader>
             <controlfield tag="001">1</controlfield>
        -    <datafield tag="250" ind1=" " ind2=" ">
        -      <subfield code="a">TECHNIQUE</subfield>
        +      <datafield tag="200" ind1=" " ind2=" ">
        +        <subfield code="a">Hugo</subfield>
        +        <subfield code="b">Victor</subfield>
             </datafield>
        -    <datafield tag="100" ind1=" " ind2=" ">
        -      <subfield code="a">20071210afrey50      ba0</subfield>
        -    </datafield>
        -    <datafield tag="152" ind1=" " ind2=" ">
        -      <subfield code="b">NC</subfield>
        -    </datafield>
        -  </record>
        -  <record
        -    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        -    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/ standards/marcxml/schema/MARC21slim.xsd"
        -    xmlns="http://www.loc.gov/MARC21/slim">
        -    <leader>00130nx  j2200073   4500 </leader>
        -    <controlfield tag="001">2</controlfield>
        -    <datafield tag="250" ind1=" " ind2=" ">
        -      <subfield code="a">CHEMIN DE FER</subfield>
        +      <datafield tag="801" ind1=" " ind2=" ">
        +        <subfield code="a">France</subfield>
        +        <subfield code="b">Nimes</subfield>
        +        <subfield code="c">2010/04/13</subfield>
             </datafield>
             <datafield tag="100" ind1=" " ind2=" ">
        -      <subfield code="a">20071210afrey50      ba0</subfield>
        +        <subfield code="a">20100413     50                    </subfield>
             </datafield>
             <datafield tag="152" ind1=" " ind2=" ">
        -      <subfield code="b">NC</subfield>
        +        <subfield code="b">NP</subfield>
             </datafield>
           </record>
        -  <record>RecordNotFound</record>
        +  </record>
        +  <record>
        +    <code>RecordNotFound</code>
        +  </record>
        +  <record>
        +    <code>RecordNotFound</code>
        +  </record>
         </GetAuthorityRecords>
        [% ELSIF ( LookupPatron ) %] diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl index 56058f0..48fd7ba 100755 --- a/opac/ilsdi.pl +++ b/opac/ilsdi.pl @@ -233,7 +233,6 @@ print CGI::header('-type'=>'text/xml', '-charset'=>'utf-8'); print XMLout( $out, noattr => 1, - noescape => 1, nosort => 1, xmldecl => '', RootName => $service, -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 01:27:20 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 11:27:20 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 5881 : CSV export : deal with control fields to avoid an error (C4/Record.pm) Message-ID: <1305242840-21328-1-git-send-email-chrisc@catalyst.net.nz> From: Paul Poulain Signed-off-by: Chris Cormack --- C4/Record.pm | 49 ++++++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 19 deletions(-) diff --git a/C4/Record.pm b/C4/Record.pm index c5727f3..b0640ca 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -462,26 +462,37 @@ sub marcrecord2csv { } } push (@fieldstab, join($subfieldseparator, @tmpfields)); - # Or a field - } else { - my @fields = ($record->field($marcfield)); - my $authvalues = GetKohaAuthorisedValuesFromField($marcfield, undef, $frameworkcode, undef); - - my @valuesarray; - foreach (@fields) { - my $value; - - # Getting authorised value - $value = defined $authvalues->{$_->as_string} ? $authvalues->{$_->as_string} : $_->as_string; - - # Field processing - eval $fieldprocessing if ($fieldprocessing); + # Or a field - push @valuesarray, $value; - } - push (@fieldstab, join($fieldseparator, @valuesarray)); - } - }; + } else { + my @fields = ( $record->field($marcfield) ); + my $authvalues = GetKohaAuthorisedValuesFromField( $marcfield, undef, $frameworkcode, undef ); + + my @valuesarray; + foreach (@fields) { + my $value; + + # If it is a control field + if ($_->is_control_field) { + $value = defined $authvalues->{$_->as_string} ? $authvalues->{$_->as_string} : $_->as_string; + } else { + # If it is a field, we gather all subfields, joined by the subfield separator + my @subvaluesarray; + my @subfields = $_->subfields; + foreach my $subfield (@subfields) { + push (@subvaluesarray, defined $authvalues->{$subfield->[1]} ? $authvalues->{$subfield->[1]} : $subfield->[1]); + } + $value = join ($subfieldseparator, @subvaluesarray); + } + + # Field processing + eval $fieldprocessing if ($fieldprocessing); + + push @valuesarray, $value; + } + push( @fieldstab, join( $fieldseparator, @valuesarray ) ); + } + } $csv->combine(@fieldstab); $output .= $csv->string() . "\n"; -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 01:29:44 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 11:29:44 +1200 Subject: [Koha-patches] [Signed off] [PATCH] Bug 5889: Follow-up for message name translation Message-ID: <1305242984-21550-1-git-send-email-chrisc@catalyst.net.nz> From: Katrin Fischer Some sample files had Item_DUE instead of Item_Due. In these cases the Item Due notices was shown as 'Unknown' in the message preferences table. Signed-off-by: Chris Cormack --- .../optional/sample_notices_message_attributes.sql | 4 ++-- .../sample_notices_message_attributes.sql | 2 +- .../sample_notices_message_attributes.sql | 10 +++++----- .../optional/sample_notices_message_attributes.sql | 2 +- .../optional/sample_notices_message_attributes.sql | 2 +- .../optional/sample_notices_message_attributes.sql | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql b/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql index b505486..8499d3d 100644 --- a/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/de-DE/optional/sample_notices_message_attributes.sql @@ -1,8 +1,8 @@ insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values -(1, 'Item_DUE', 0), +(1, 'Item_Due', 0), (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), -(6, 'Item_Checkout', 0); \ No newline at end of file +(6, 'Item_Checkout', 0); diff --git a/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql b/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql index 8e919e9..a7a6032 100644 --- a/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql +++ b/installer/data/mysql/fr-FR/2-Optionel/sample_notices_message_attributes.sql @@ -1,7 +1,7 @@ insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values -(1, 'Item_DUE', 0), +(1, 'Item_Due', 0), (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), diff --git a/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql b/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql index 231af9c..a96b2e1 100644 --- a/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql +++ b/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql @@ -3,10 +3,10 @@ SET FOREIGN_KEY_CHECKS=0; insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values -(1, 'Item DUE', 0), -(2, 'Advance Notice', 1), -(4, 'Hold Filled', 0), -(5, 'Item Check-in', 0), -(6, 'Item Checkout', 0); +(1, 'Item_Due', 0), +(2, 'Advance_Notice', 1), +(4, 'Hold_Filled', 0), +(5, 'Item_Check_in', 0), +(6, 'Item_Checkout', 0); SET FOREIGN_KEY_CHECKS=1; diff --git a/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql b/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql index 8e919e9..a7a6032 100644 --- a/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/pl-PL/optional/sample_notices_message_attributes.sql @@ -1,7 +1,7 @@ insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values -(1, 'Item_DUE', 0), +(1, 'Item_Due', 0), (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), diff --git a/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql b/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql index c9d9bd1..94c7897 100644 --- a/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/ru-RU/optional/sample_notices_message_attributes.sql @@ -3,7 +3,7 @@ truncate message_attributes; insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values -(1, 'Item_DUE', 0), +(1, 'Item_Due', 0), (2, 'Advance_Notice', 1), (4, 'Hold_Filled', 0), (5, 'Item_Check_in', 0), diff --git a/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql b/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql index 75e2793..53eeeac 100644 --- a/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql +++ b/installer/data/mysql/uk-UA/optional/sample_notices_message_attributes.sql @@ -3,7 +3,7 @@ truncate message_attributes; insert into `message_attributes` (`message_attribute_id`, `message_name`, `takes_days`) values -(1, 'Item_DUE' , 0), +(1, 'Item_Due' , 0), (2, 'Advance_Notice' , 1), (4, 'Hold_Filled' , 0), (5, 'Item_Check_in' , 0), -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 02:43:58 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 12:43:58 +1200 Subject: [Koha-patches] [PATCH] Bug 5995 : MT2892: Fix security issue in CAS intranet login Message-ID: <1305247438-23613-1-git-send-email-chrisc@catalyst.net.nz> From: Matthias Meusburger Users could log in intranet using their cardnumber, with superlibrarian rights. Signed-off-by: Chris Cormack --- C4/Auth.pm | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index a31161e..b416449 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -736,7 +736,9 @@ sub checkauth { $userid = $retuserid; $info{'invalidCasLogin'} = 1 unless ($return); } else { - ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query ); + my $retuserid; + ( $return, $retuserid ) = checkpw( $dbh, $userid, $password, $query ); + $userid = $retuserid if ($retuserid ne ''); } if ($return) { _session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); @@ -762,20 +764,21 @@ sub checkauth { "; my $sth = $dbh->prepare("$select where userid=?"); $sth->execute($userid); - unless ($sth->rows) { - $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n"; - $sth = $dbh->prepare("$select where cardnumber=?"); - $sth->execute($cardnumber); - unless ($sth->rows) { - $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n"; - $sth->execute($userid); - unless ($sth->rows) { - $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n"; - } - } - } + unless ($sth->rows) { + $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n"; + $sth = $dbh->prepare("$select where cardnumber=?"); + $sth->execute($cardnumber); + + unless ($sth->rows) { + $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n"; + $sth->execute($userid); + unless ($sth->rows) { + $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n"; + } + } + } if ($sth->rows) { - ($borrowernumber, $firstname, $surname, $userflags, + ($borrowernumber, $firstname, $surname, $userflags, $branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow; $debug and print STDERR "AUTH_3 results: " . "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n"; @@ -1413,7 +1416,7 @@ sub checkpw { C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber, $firstname, $surname, $branchcode, $flags ); - return 1, $cardnumber; + return 1, $userid; } } $sth = @@ -1577,7 +1580,7 @@ sub haspermission { my ($userid, $flagsrequired) = @_; my $sth = C4::Context->dbh->prepare("SELECT flags FROM borrowers WHERE userid=?"); $sth->execute($userid); - my $flags = getuserflags( $sth->fetchrow(), $userid ); + my $flags = getuserflags($sth->fetchrow(), $userid); if ( $userid eq C4::Context->config('user') ) { # Super User Account from /etc/koha.conf $flags->{'superlibrarian'} = 1; @@ -1586,7 +1589,9 @@ sub haspermission { # Demo user that can do "anything" (demo=1 in /etc/koha.conf) $flags->{'superlibrarian'} = 1; } + return $flags if $flags->{superlibrarian}; + foreach my $module ( keys %$flagsrequired ) { my $subperm = $flagsrequired->{$module}; if ($subperm eq '*') { -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 04:03:09 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 14:03:09 +1200 Subject: [Koha-patches] [PATCH] Bug 5860 - Attempted follow up patch to fix itemstocknumberindex Message-ID: <1305252189-26441-1-git-send-email-chrisc@catalyst.net.nz> --- installer/data/mysql/updatedatabase.pl | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..07bffb5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4217,7 +4217,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = '3.03.00.042'; if (C4::Context->preference("Version") < TransformToNum($DBversion) && $original_version < TransformToNum("3.02.06.001")) { - $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); + my $sth = $dbh->prepare("SELECT index_name FROM information_schema.statistics WHERE index_name ='itemsstocknumberidx'"); + $sth->execute(); + if (my $rows = $sth->fetchrows_hashref()){ + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); + } + else { + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;"); + } $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; SetVersion ($DBversion); -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 04:10:48 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 14:10:48 +1200 Subject: [Koha-patches] [Signed off] [PATCH] Add unit tests to ensure bug 5683 doesn't reappear Message-ID: <1305252649-26914-1-git-send-email-chrisc@catalyst.net.nz> From: Jared Camins-Esakov Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- t/db_dependent/Biblio.t | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 6012f5f..dd827f0 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -5,7 +5,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 9; use MARC::Record; use C4::Biblio; @@ -34,6 +34,40 @@ my $itemdata = &GetBiblioItemData($biblioitemnumber); is($itemdata->{title},$title,'First test of GetBiblioItemData to get same result of previous two GetBiblioData tests.'); is($itemdata->{isbn},$isbn,'Second test checking it returns the correct isbn.'); +my $success = 0; +$field = MARC::Field->new( + 655, ' ', ' ', + 'a' => 'Auction catalogs', + '9' => '1' + ); +eval { + $marc_record->append_fields($field); + $success = ModBiblio($marc_record,$biblionumber,''); +} or do { + diag($@); + $success = 0; +}; +ok($success, "ModBiblio handles authority-linked 655"); + +eval { + $field->delete_subfields('a'); + $marc_record->append_fields($field); + $success = ModBiblio($marc_record,$biblionumber,''); +} or do { + diag($@); + $success = 0; +}; +ok($success, "ModBiblio handles 655 with authority link but no heading"); + +eval { + $field->delete_subfields('9'); + $marc_record->append_fields($field); + $success = ModBiblio($marc_record,$biblionumber,''); +} or do { + diag($@); + $success = 0; +}; +ok($success, "ModBiblio handles 655 with no subfields"); # clean up after ourselves DelBiblio($biblionumber); -- 1.7.4.1 From chrisc at catalyst.net.nz Fri May 13 04:10:49 2011 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 13 May 2011 14:10:49 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 5683 follow-up: calls to ModBiblio can still fail In-Reply-To: <1305252649-26914-1-git-send-email-chrisc@catalyst.net.nz> References: <1305252649-26914-1-git-send-email-chrisc@catalyst.net.nz> Message-ID: <1305252649-26914-2-git-send-email-chrisc@catalyst.net.nz> From: Jared Camins-Esakov Because C4::Charset directly manipulates the MARC::Record object, bad data has to be cleaned in ModBiblio before the call into C4::Charset. The corrupted records can also break the Zebra index. After this fix has been applied, it would probably be a good idea to run the misc/maintenance/touch_all_biblios.pl script to ensure that this problem has been cleared up. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- C4/Biblio.pm | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index c9590c2..016b53d 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -299,6 +299,16 @@ sub ModBiblio { logaction( "CATALOGUING", "MODIFY", $biblionumber, "BEFORE=>" . $newrecord->as_formatted ); } + # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to + # throw an exception which probably won't be handled. + foreach my $field ($record->fields()) { + if (! $field->is_control_field()) { + if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('9'))) { + $record->delete_field($field); + } + } + } + SetUTF8Flag($record); my $dbh = C4::Context->dbh; @@ -306,14 +316,6 @@ sub ModBiblio { _strip_item_fields($record, $frameworkcode); - foreach my $field ($record->fields()) { - if (! $field->is_control_field()) { - if (scalar($field->subfields()) == 0) { - $record->delete_fields($field); - } - } - } - # update biblionumber and biblioitemnumber in MARC # FIXME - this is assuming a 1 to 1 relationship between # biblios and biblioitems -- 1.7.4.1 From chris at bigballofwax.co.nz Fri May 13 09:21:56 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Fri, 13 May 2011 19:21:56 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 6320 - Provide language filter selection in adv an id inside a div Message-ID: <1305271316-9328-1-git-send-email-chris@bigballofwax.co.nz> From: Tomas Cohen Arazi Basically, put the language filter selection fieldset inside a
        with its own id so it can be hidden through OPACUserCSS variable. Signed-off-by: Chris Cormack --- .../opac-tmpl/prog/en/modules/opac-advsearch.tt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt index 1c9381d..e882bb8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt @@ -145,6 +145,7 @@
    +
    Language

    @@ -160,6 +161,7 @@

    +
    [% IF ( expanded_options ) %] [% IF ( usmarc ) %] -- 1.7.2.2 From chris at bigballofwax.co.nz Fri May 13 09:41:30 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Fri, 13 May 2011 19:41:30 +1200 Subject: [Koha-patches] [PATCH] Bug 6315: Fix depreciated constructions in C4::Serials Message-ID: <1305272490-9460-1-git-send-email-chris@bigballofwax.co.nz> From: Colin Campbell Perl 5.14 will issue warnings in cases where it is assumed that () will magically appear around qw() as the interpreter will stop fooling itself that they are there Added the missing () in the couple of cases they were required Signed-off-by: Chris Cormack --- C4/Serials.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 20ae7a3..8aa6ebc 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -581,7 +581,7 @@ sub GetSubscriptions { my @sqlstrings; my @strings_to_search; @strings_to_search = map { "%$_%" } split( / /, $string ); - foreach my $index qw(biblio.title subscription.callnumber subscription.location subscription.notes subscription.internalnotes) { + foreach my $index (qw(biblio.title subscription.callnumber subscription.location subscription.notes subscription.internalnotes)) { push @bind_params, @strings_to_search; my $tmpstring = "AND $index LIKE ? " x scalar(@strings_to_search); $debug && warn "$tmpstring"; @@ -594,7 +594,7 @@ sub GetSubscriptions { my @sqlstrings; my @strings_to_search; @strings_to_search = map { "%$_%" } split( / /, $issn ); - foreach my $index qw(biblioitems.issn subscription.callnumber) { + foreach my $index ( qw(biblioitems.issn subscription.callnumber)) { push @bind_params, @strings_to_search; my $tmpstring = "OR $index LIKE ? " x scalar(@strings_to_search); $debug && warn "$tmpstring"; -- 1.7.2.2 From f.demians at tamil.fr Fri May 13 09:59:13 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 09:59:13 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6319 - Provide language filter selection in adv an id inside a div Message-ID: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> From: Tomas Cohen Arazi Basically, put the language filter selection fieldset inside a
    with its own id so it can be hidden through OPACUserCSS variable. [2011-05-13] F. Demians. It works. Signed-off-by: Fr?d?ric Demians --- .../opac-tmpl/prog/en/modules/opac-advsearch.tt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt index 1c9381d..e882bb8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt @@ -145,6 +145,7 @@
    +
    Language

    @@ -160,6 +161,7 @@

    +
    [% IF ( expanded_options ) %] [% IF ( usmarc ) %] -- 1.7.4 From f.demians at tamil.fr Fri May 13 09:59:14 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 09:59:14 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6315: Fix depreciated constructions in C4::Serials In-Reply-To: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> References: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305273556-26350-2-git-send-email-f.demians@tamil.fr> From: Colin Campbell Perl 5.14 will issue warnings in cases where it is assumed that () will magically appear around qw() as the interpreter will stop fooling itself that they are there Added the missing () in the couple of cases they were required Signed-off-by: Fr?d?ric Demians --- C4/Serials.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 20ae7a3..8aa6ebc 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -581,7 +581,7 @@ sub GetSubscriptions { my @sqlstrings; my @strings_to_search; @strings_to_search = map { "%$_%" } split( / /, $string ); - foreach my $index qw(biblio.title subscription.callnumber subscription.location subscription.notes subscription.internalnotes) { + foreach my $index (qw(biblio.title subscription.callnumber subscription.location subscription.notes subscription.internalnotes)) { push @bind_params, @strings_to_search; my $tmpstring = "AND $index LIKE ? " x scalar(@strings_to_search); $debug && warn "$tmpstring"; @@ -594,7 +594,7 @@ sub GetSubscriptions { my @sqlstrings; my @strings_to_search; @strings_to_search = map { "%$_%" } split( / /, $issn ); - foreach my $index qw(biblioitems.issn subscription.callnumber) { + foreach my $index ( qw(biblioitems.issn subscription.callnumber)) { push @bind_params, @strings_to_search; my $tmpstring = "OR $index LIKE ? " x scalar(@strings_to_search); $debug && warn "$tmpstring"; -- 1.7.4 From f.demians at tamil.fr Fri May 13 09:59:15 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 09:59:15 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6311 check_inst_id was being passed non-existent value In-Reply-To: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> References: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305273556-26350-3-git-send-email-f.demians@tamil.fr> From: Colin Campbell Due to a typo in the hash key check_inst_id in the handle_end_patron_session was always logging an error as the actual field contents were not being checked unlike in other messages Signed-off-by: Fr?d?ric Demians --- C4/SIP/Sip/MsgType.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 508a06b..d76503d 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -1027,7 +1027,7 @@ sub handle_end_patron_session { ($trans_date) = @{$self->{fixed_fields}}; - $ils->check_inst_id($fields->{FID_INST_ID}, "handle_end_patron_session"); + $ils->check_inst_id($fields->{(FID_INST_ID)}, 'handle_end_patron_session'); ($status, $screen_msg, $print_line) = $ils->end_patron_session($fields->{(FID_PATRON_ID)}); -- 1.7.4 From f.demians at tamil.fr Fri May 13 09:59:16 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 09:59:16 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] 6290: Fix warning on XSLT.pm In-Reply-To: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> References: <1305273556-26350-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305273556-26350-4-git-send-email-f.demians@tamil.fr> From: Marcel de Rooy --- C4/XSLT.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 28a70fc..4dafff3 100755 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -222,7 +222,7 @@ sub buildKohaItemsNamespace { } else { $status = "available"; } - my $homebranch = xml_escape($branches->{$item->{homebranch}}->{'branchname'}); + my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):''; my $itemcallnumber = xml_escape($item->{itemcallnumber}); $xml.= "$homebranch". "$status". -- 1.7.4 From chris at bigballofwax.co.nz Fri May 13 09:52:08 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Fri, 13 May 2011 19:52:08 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] 6290: Fix warning on XSLT.pm Message-ID: <1305273128-9600-1-git-send-email-chris@bigballofwax.co.nz> From: Marcel de Rooy Signed-off-by: Chris Cormack --- C4/XSLT.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 28a70fc..4dafff3 100755 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -222,7 +222,7 @@ sub buildKohaItemsNamespace { } else { $status = "available"; } - my $homebranch = xml_escape($branches->{$item->{homebranch}}->{'branchname'}); + my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):''; my $itemcallnumber = xml_escape($item->{itemcallnumber}); $xml.= "$homebranch". "$status". -- 1.7.2.2 From f.demians at tamil.fr Fri May 13 10:05:34 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 10:05:34 +0200 Subject: [Koha-patches] [PATCH] Bug 6328 Followup, update DB structure Message-ID: <1305273934-28257-1-git-send-email-f.demians@tamil.fr> Thanks Katrin! --- installer/data/mysql/kohastructure.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..bbf2bc7 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -232,7 +232,7 @@ CREATE TABLE `borrowers` ( `dateexpiry` date default NULL, `gonenoaddress` tinyint(1) default NULL, `lost` tinyint(1) default NULL, - `debarred` tinyint(1) default NULL, + `debarred` date default NULL, `contactname` mediumtext, `contactfirstname` text, `contacttitle` text, -- 1.7.4 From fridolyn.somers at progilone.fr Fri May 13 10:04:41 2011 From: fridolyn.somers at progilone.fr (Fridolyn SOMERS) Date: Fri, 13 May 2011 10:04:41 +0200 Subject: [Koha-patches] [PATCH] BUG4319 Message-ID: <1305273881-3151-1-git-send-email-fridolyn.somers@progilone.fr> --- C4/Search.pm | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index ab7cb59..4ce3abc 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1671,7 +1671,7 @@ sub searchResults { ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber}); } - # item is withdrawn, lost or damaged + # item is withdrawn, lost, damaged, not for loan, reserved or in transit if ( $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} @@ -1684,8 +1684,13 @@ sub searchResults { $itemlost_count++ if $item->{itemlost}; $itemdamaged_count++ if $item->{damaged}; $item_in_transit_count++ if $transfertwhen ne ''; - $item_onhold_count++ if $reservestatus eq 'Waiting'; + $item_onhold_count++ if $reservestatus eq 'Waiting'; + $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; + + # only withdrawn, lost and damaged avoid placing hold on item + $can_place_holds = 1 unless ($item->{withdrawn} || $item->{itemlost} || $item->{damaged}); + $other_count++; my $key = $prefix . $item->{status}; -- 1.7.1 From tajoli at cilea.it Fri May 13 10:07:23 2011 From: tajoli at cilea.it (Zeno Tajoli) Date: Fri, 13 May 2011 10:07:23 +0200 Subject: [Koha-patches] [PATCH] [Bug 5462] Update of the italian sql files The bug is about strings that are used as variables by Template::Toolkit The strings need to be like valid perl variable names. To fix the bug we need to fix also .sql files. Others .sql files are OK. Italian .sql file needs this fix Message-ID: <1305274043-16851-1-git-send-email-tajoli@cilea.it> --- .../sample_notices_message_attributes.sql | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql b/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql index 231af9c..63d07fd 100644 --- a/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql +++ b/installer/data/mysql/it-IT/necessari/sample_notices_message_attributes.sql @@ -3,10 +3,9 @@ SET FOREIGN_KEY_CHECKS=0; insert into `message_attributes` (`message_attribute_id`, message_name, `takes_days`) values -(1, 'Item DUE', 0), -(2, 'Advance Notice', 1), -(4, 'Hold Filled', 0), -(5, 'Item Check-in', 0), -(6, 'Item Checkout', 0); - +(1, 'Item_Due', 0), +(2, 'Advance_Notice', 1), +(4, 'Hold_Filled', 0), +(5, 'Item_Check_in', 0), +(6, 'Item_Checkout', 0); SET FOREIGN_KEY_CHECKS=1; -- 1.7.2.3 From f.demians at tamil.fr Fri May 13 11:01:14 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 11:01:14 +0200 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Bug 6328 fine in days does not work Message-ID: <1305277275-7472-1-git-send-email-f.demians@tamil.fr> From: Paul Poulain Some code coming from BibLibre has been lost in the process of inclusion in 3.4. The result is that fine in days does not work at all (you can setup rules, but it does nothing) Step to reproduce: - Koha > Admin > circ rules > set 1 day fine every day of overdue for default rule - Issue a book return date last week - check-in the book => no debarment is set The following patch will fix all of those problems by : * updating borrowers.debarred to a date field (instead of tinyint). It contains the limit of the debarment * changing API of DebarMember and UpdateBorrowerDebarred to pass a date * display debarrdate where applicable. Note that a debarrdate of 31/12/9999 is considered as unlimited and not displayed * added a debarrcomment, usefull to explain why a patron is debarred (this is independant from debarrdate changes and can be used when placing an unlimited debarment too) [2011-05-12] F. Demians. It works as described. And I can confirm this functionality is impatiently awaited by French libraries since one year. Thanks BibLibre for the good work and for contributing this code. Signed-off-by: Fr?d?ric Demians --- C4/Circulation.pm | 60 ++++++++++++++++++++ C4/Members.pm | 11 ++- C4/Overdues.pm | 23 ++++---- circ/circulation.pl | 11 ++++ circ/returns.pl | 7 ++- installer/data/mysql/updatedatabase.pl | 11 ++++ .../prog/en/modules/circ/circulation.tt | 10 +++ .../intranet-tmpl/prog/en/modules/circ/returns.tt | 3 + .../prog/en/modules/members/memberentrygen.tt | 36 +++++++++++- .../prog/en/modules/members/moremember.tt | 5 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 +- kohaversion.pl | 2 +- members/memberentry.pl | 19 +++++- members/moremember.pl | 12 ++++- members/setstatus.pl | 4 +- opac/opac-user.pl | 1 + 16 files changed, 188 insertions(+), 29 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a2db4c..5aff6ab 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -43,6 +43,7 @@ use Date::Calc qw( Date_to_Days Day_of_Week Add_Delta_Days + check_date ); use POSIX qw(strftime); use C4::Branch; # GetBranches @@ -1626,6 +1627,10 @@ sub AddReturn { if ($borrowernumber) { my $fix = _FixOverduesOnReturn($borrowernumber, $item->{itemnumber}, $exemptfine, $dropbox); defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, $item->{itemnumber}...) failed!"; # zero is OK, check defined + + # fix fine days + my $debardate = _FixFineDaysOnReturn( $borrower, $item, $issue->{date_due} ); + $messages->{'Debarred'} = $debardate if ($debardate); } # find reserves..... @@ -1749,6 +1754,61 @@ sub MarkIssueReturned { $sth_del->execute($borrowernumber, $itemnumber); } +=head2 _FixFineDaysOnReturn + + &_FixFineDaysOnReturn($borrower, $item, $datedue); + +C<$borrower> borrower hashref + +C<$item> item hashref + +C<$datedue> date due + +Internal function, called only by AddReturn that calculate and update the user fine days, and debars him + +=cut + +sub _FixFineDaysOnReturn { + my ( $borrower, $item, $datedue ) = @_; + + if ($datedue) { + $datedue = C4::Dates->new( $datedue, "iso" ); + } else { + return; + } + + my $branchcode = _GetCircControlBranch( $item, $borrower ); + my $calendar = C4::Calendar->new( branchcode => $branchcode ); + my $today = C4::Dates->new(); + + my $deltadays = $calendar->daysBetween( $datedue, C4::Dates->new() ); + + my $circcontrol = C4::Context::preference('CircControl'); + my $issuingrule = GetIssuingRule( $borrower->{categorycode}, $item->{itype}, $branchcode ); + my $finedays = $issuingrule->{finedays}; + + # exit if no finedays defined + return unless $finedays; + my $grace = $issuingrule->{firstremind}; + + if ( $deltadays - $grace > 0 ) { + my @newdate = Add_Delta_Days( Today(), $deltadays * $finedays ); + my $isonewdate = join( '-', @newdate ); + my ( $deby, $debm, $debd ) = split( /-/, $borrower->{debarred} ); + if ( check_date( $deby, $debm, $debd ) ) { + my @olddate = split( /-/, $borrower->{debarred} ); + + if ( Delta_Days( @olddate, @newdate ) > 0 ) { + C4::Members::DebarMember( $borrower->{borrowernumber}, $isonewdate ); + return $isonewdate; + } + } else { + C4::Members::DebarMember( $borrower->{borrowernumber}, $isonewdate ); + return $isonewdate; + } + } +} + =head2 _FixOverduesOnReturn &_FixOverduesOnReturn($brn,$itm, $exemptfine, $dropboxmode); diff --git a/C4/Members.pm b/C4/Members.pm index a151e03..8400e6b 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -2090,7 +2090,7 @@ sub GetBorrowersNamesAndLatestIssue { =head2 DebarMember - my $success = DebarMember( $borrowernumber ); +my $success = DebarMember( $borrowernumber, $todate ); marks a Member as debarred, and therefore unable to checkout any more items. @@ -2102,13 +2102,16 @@ true on success, false on failure sub DebarMember { my $borrowernumber = shift; + my $todate = shift; return unless defined $borrowernumber; return unless $borrowernumber =~ /^\d+$/; - return ModMember( borrowernumber => $borrowernumber, - debarred => 1 ); - + return ModMember( + borrowernumber => $borrowernumber, + debarred => $todate + ); + } =head2 ModPrivacy diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 28b135c..cdc2d50 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -1048,16 +1048,17 @@ sub CheckBorrowerDebarred { SELECT debarred FROM borrowers WHERE borrowernumber=? + AND debarred > NOW() |; my $sth = $dbh->prepare($query); $sth->execute($borrowernumber); - my ($debarredstatus) = $sth->fetchrow; - return ( $debarredstatus eq '1' ? 1 : 0 ); + my $debarredstatus = $sth->fetchrow; + return $debarredstatus; } =head2 UpdateBorrowerDebarred - ($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber); +($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber, $todate); update status of borrowers in borrowers table (field debarred) @@ -1066,16 +1067,16 @@ C<$borrowernumber> borrower number =cut sub UpdateBorrowerDebarred{ - my($borrowernumber) = @_; - my $dbh = C4::Context->dbh; - my $query=qq|UPDATE borrowers - SET debarred='1' + my ( $borrowernumber, $todate ) = @_; + my $dbh = C4::Context->dbh; + my $query = qq|UPDATE borrowers + SET debarred=? WHERE borrowernumber=? |; - my $sth=$dbh->prepare($query); - $sth->execute($borrowernumber); - $sth->finish; - return 1; + my $sth = $dbh->prepare($query); + $sth->execute( $todate, $borrowernumber ); + $sth->finish; + return 1; } =head2 CheckExistantNotifyid diff --git a/circ/circulation.pl b/circ/circulation.pl index 8c359b1..ff5b5a1 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -30,6 +30,7 @@ use C4::Dates qw/format_date/; use C4::Branch; # GetBranches use C4::Koha; # GetPrinter use C4::Circulation; +use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Members; use C4::Biblio; use C4::Reserves; @@ -259,6 +260,16 @@ if ($borrowernumber) { issuecount => $issue, finetotal => $fines ); + + my $debar = CheckBorrowerDebarred($borrowernumber); + if ($debar) { + $template->param( 'userdebarred' => 1 ); + $template->param( 'debarredcomment' => $borrower->{debarredcomment} ); + if ( $debar ne "9999-12-31" ) { + $template->param( 'userdebarreddate' => C4::Dates::format_date($debar) ); + } + } + } # diff --git a/circ/returns.pl b/circ/returns.pl index d7fad0c..17635ac 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -454,7 +454,12 @@ foreach my $code ( keys %$messages ) { } elsif ( $code eq 'Wrongbranch' ) { } - + elsif ( $code eq 'Debarred' ) { + $err{debarred} = format_date( $messages->{'Debarred'} ); + $err{debarcardnumber} = $borrower->{cardnumber}; + $err{debarborrowernumber} = $borrower->{borrowernumber}; + $err{debarname} = "$borrower->{firstname} $borrower->{surname}"; + } else { die "Unknown error code $code"; # note we need all the (empty) elsif's above, or we die. # This forces the issue of staying in sync w/ Circulation.pm diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..ab8ac9a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4332,6 +4332,17 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.05.00.002"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + my $borrowers = $dbh->selectcol_arrayref( "SELECT borrowernumber from borrowers where debarred <>0;", { Columns => [1] } ); + $dbh->do("ALTER TABLE borrowers MODIFY debarred DATE DEFAULT NULL;"); + $dbh->do( "UPDATE borrowers set debarred='9999-12-31' where borrowernumber IN (" . join( ",", @$borrowers ) . ");" ) if ($borrowers and scalar(@$borrowers)>0); + $dbh->do("ALTER TABLE borrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;"); + print "Upgrade done (Change borrowers.debarred into Date )\n"; + + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index afa6ec5..b3dbfab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -567,6 +567,16 @@ No patron matched [% message %]
  • Lost: Patron's card is lost
  • [% END %] + [% IF ( userdebarred ) %] +
  • + Restricted: Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %] +
    + + + +
    +
  • [% END %] + [% IF ( dbarred ) %]
  • Restricted: Patron's account is restricted Lift restriction
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 620f770..6e1f3a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -304,6 +304,9 @@ function Dopop(link) { [% IF ( errmsgloo.withdrawn ) %]

    Item is withdrawn.

    [% END %] + [% IF ( errmsgloo.debarred ) %] +

    [% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %]) is now debarred until [% errmsgloo.debarred %]

    + [% END %] [% END %] [% IF ( soundon ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 497b9ac..91f5c1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -947,7 +947,6 @@ [% FOREACH flagloo IN flagloop %]
  • @@ -963,10 +962,43 @@ [% END %] -
  • + [% END %] +
  • + + [% IF ( debarred ) %] + + + + + [% ELSE %] + + + + + [% END %] + +
    + + + Show Calendar + +
    + + +
  • + + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index f8073bb..aabd67e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -158,11 +158,10 @@ function validate1(date) { [% IF ( flagged ) %]
      - [% IF ( debarred ) %] -
    • Patron is restricted + [% IF ( userdebarred ) %] +
    • Patron is restricted[% IF ( userdebarreddate ) %] until [% userdebarreddate%] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %][% END %]
      -
    • diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 58c6fa5..71a09a2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -102,7 +102,7 @@ $.tablesorter.addParser({
        [% IF ( BORROWER_INF.debarred ) %] -
      • Please note: Your account has been frozen. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
      • +
      • Please note: Your account has been frozen until [% BORROWER_INF.debarred %] - [% BORROWER_INF.debarredcomment %]. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
      • [% END %] [% IF ( BORROWER_INF.gonenoaddress ) %]
      • Please note: According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]contact information[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)[% END %].
      • diff --git a/kohaversion.pl b/kohaversion.pl index c3b86a9..470ca3d 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.05.00.001'; + our $VERSION = '3.05.00.002'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install diff --git a/members/memberentry.pl b/members/memberentry.pl index a8e764c..f17ef6c 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -128,6 +128,17 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) $newdata{$key} =~ s/\"/"/g unless $key eq 'borrowernotes' or $key eq 'opacnote'; } } + + ## Manipulate debarred + if ( $newdata{debarred} ) { + $newdata{debarred} = $newdata{datedebarred} ? $newdata{datedebarred} : "9999-12-31"; + } elsif ( exists( $newdata{debarred} ) && !( $newdata{debarred} ) ) { + undef( $newdata{debarred} ); + undef( $newdata{debarredcomment} ); + } elsif ( exists( $newdata{debarredcomment} ) && $newdata{debarredcomment} eq "" ) { + undef( $newdata{debarredcomment} ); + } + my $dateobject = C4::Dates->new(); my $syspref = $dateobject->regexp(); # same syspref format for all 3 dates my $iso = $dateobject->regexp('iso'); # @@ -507,8 +518,7 @@ while (@relationships) { } my %flags = ( 'gonenoaddress' => ['gonenoaddress' ], - 'lost' => ['lost'], - 'debarred' => ['debarred']); + 'lost' => ['lost']); my @flagdata; @@ -627,7 +637,10 @@ if (C4::Context->preference('uppercasesurnames')) { $data{'surname'} =uc($data{'surname'} ); $data{'contactname'}=uc($data{'contactname'}); } -foreach (qw(dateenrolled dateexpiry dateofbirth)) { + +$data{debarred} = C4::Overdues::CheckBorrowerDebarred($borrowernumber); +$data{datedebarred} = $data{debarred} if ( $data{debarred} ne "9999-12-31" ); +foreach (qw(dateenrolled dateexpiry dateofbirth datedebarred)) { $data{$_} = format_date($data{$_}); # back to syspref for display $template->param( $_ => $data{$_}); } diff --git a/members/moremember.pl b/members/moremember.pl index b766f2f..b2135a4 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -49,6 +49,7 @@ use C4::Letters; use C4::Biblio; use C4::Reserves; use C4::Branch; # GetBranchName +use C4::Overdues qw/CheckBorrowerDebarred/; use C4::Form::MessagingPreferences; use C4::NewsChannels; #get slip news use List::MoreUtils qw/uniq/; @@ -148,10 +149,19 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { } $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); -for (qw(debarred gonenoaddress lost borrowernotes)) { +for (qw(gonenoaddress lost borrowernotes)) { $data->{$_} and $template->param(flagged => 1) and last; } +my $debar = CheckBorrowerDebarred($borrowernumber); +if ($debar) { + $template->param( 'userdebarred' => 1, 'flagged' => 1 ); + if ( $debar ne "9999-12-31" ) { + $template->param( 'userdebarreddate' => C4::Dates::format_date($debar) ); + $template->param( 'debarredcomment' => $data->{debarredcomment} ); + } +} + $data->{'ethnicity'} = fixEthnicity( $data->{'ethnicity'} ); $data->{ "sex_".$data->{'sex'}."_p" } = 1; diff --git a/members/setstatus.pl b/members/setstatus.pl index addeeb3..a45a331 100755 --- a/members/setstatus.pl +++ b/members/setstatus.pl @@ -51,8 +51,8 @@ if ( $reregistration eq 'y' ) { # re-reregistration function to automatic calcul of date expiry $dateexpiry = ExtendMemberSubscriptionTo( $borrowernumber ); } else { - my $sth=$dbh->prepare("Update borrowers set debarred = ? where borrowernumber = ?"); - $sth->execute($status,$borrowernumber); + my $sth = $dbh->prepare("UPDATE borrowers SET debarred = ?, debarredcomment = '' WHERE borrowernumber = ?"); + $sth->execute( $status, $borrowernumber ); $sth->finish; } diff --git a/opac/opac-user.pl b/opac/opac-user.pl index a2f7d9b..9cfa9e0 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -93,6 +93,7 @@ if ( $borr->{'amountoutstanding'} < 0 ) { } $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; +$borr->{'debarred'} = C4::Dates->new($borr->{'debarred'},'iso')->output; my @bordat; $bordat[0] = $borr; -- 1.7.4 From f.demians at tamil.fr Fri May 13 11:01:15 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 11:01:15 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug 6328 Followup--update DB structure In-Reply-To: <1305277275-7472-1-git-send-email-f.demians@tamil.fr> References: <1305277275-7472-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305277275-7472-2-git-send-email-f.demians@tamil.fr> Thanks Katrin. Signed-off-by: Fr?d?ric Demians --- installer/data/mysql/kohastructure.sql | 6 ++++-- installer/data/mysql/updatedatabase.pl | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..37ad2d8 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -232,7 +232,8 @@ CREATE TABLE `borrowers` ( `dateexpiry` date default NULL, `gonenoaddress` tinyint(1) default NULL, `lost` tinyint(1) default NULL, - `debarred` tinyint(1) default NULL, + `debarred` date default NULL, + `debarredcomment` VARCHAR(255) DEFAULT NULL, `contactname` mediumtext, `contactfirstname` text, `contacttitle` text, @@ -684,7 +685,8 @@ CREATE TABLE `deletedborrowers` ( `dateexpiry` date default NULL, `gonenoaddress` tinyint(1) default NULL, `lost` tinyint(1) default NULL, - `debarred` tinyint(1) default NULL, + `debarred` date default NULL, + `debarredcomment` VARCHAR(255) DEFAULT NULL, `contactname` mediumtext, `contactfirstname` text, `contacttitle` text, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ab8ac9a..719c3a5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4332,12 +4332,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } -$DBversion = "3.05.00.002"; +$DBversion = "3.05.00.XXX"; if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { my $borrowers = $dbh->selectcol_arrayref( "SELECT borrowernumber from borrowers where debarred <>0;", { Columns => [1] } ); $dbh->do("ALTER TABLE borrowers MODIFY debarred DATE DEFAULT NULL;"); $dbh->do( "UPDATE borrowers set debarred='9999-12-31' where borrowernumber IN (" . join( ",", @$borrowers ) . ");" ) if ($borrowers and scalar(@$borrowers)>0); $dbh->do("ALTER TABLE borrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;"); + $dbh->do("ALTER TABLE deletedborrowers MODIFY debarred DATE DEFAULT NULL;"); + $dbh->do("ALTER TABLE deletedborrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;"); print "Upgrade done (Change borrowers.debarred into Date )\n"; SetVersion($DBversion); -- 1.7.4 From bargioni at pusc.it Fri May 13 11:59:31 2011 From: bargioni at pusc.it (Stefano Bargioni) Date: Fri, 13 May 2011 11:59:31 +0200 Subject: [Koha-patches] Proposed patch for bug number 6321 relative to Koha 3.2.X Message-ID: <04BC999E-A9A7-45F8-98F5-AC5030A97169@pusc.it> In C4/Serials.pm line 2136 must be changed into: my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 124, 0, 0); add at line 2299: if ( $subscription->{periodicity} == 13 ) { for ( my $i = 0 ; $i < @irreg ; $i++ ) { if ( $irreg[$i] == ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ) ) { ( $year, $month, $day ) = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 ); $tmpmonth = ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ); } } @resultdate = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 ); } In en/modules/serials/subscription-add.tmpl add at line 1236: Add a translation for "1/4 month (3/year)" in po files for two lines of subscription-add.tmpl. From f.demians at tamil.fr Fri May 13 12:19:12 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 12:19:12 +0200 Subject: [Koha-patches] [PATCH] Bug 6321 Add a 1/4 months frequency Message-ID: <1305281952-25488-1-git-send-email-f.demians@tamil.fr> Thanks Stefano Bargioni for the typo fix --- C4/Serials.pm | 11 ++++++++++- .../prog/en/modules/serials/subscription-add.tt | 5 +++++ 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 20ae7a3..9726971 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2154,7 +2154,7 @@ sub abouttoexpire { @res=Date::Calc::Today; } my @endofsubscriptiondate=split(/-/,$expirationdate); - my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 0, 0, 0); + my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 124, 0, 0); my @datebeforeend; @datebeforeend = Add_Delta_Days( $endofsubscriptiondate[0],$endofsubscriptiondate[1],$endofsubscriptiondate[2], - (3 * $per_list[$per])) if (@endofsubscriptiondate && $endofsubscriptiondate[0]*$endofsubscriptiondate[1]*$endofsubscriptiondate[2]); @@ -2317,6 +2317,15 @@ sub GetNextDate(@) { } @resultdate = Add_Delta_YMD( $year, $month, $day, 0, 3, 0 ); } + if ( $subscription->{periodicity} == 13 ) { + for ( my $i = 0 ; $i < @irreg ; $i++ ) { + if ( $irreg[$i] == ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ) ) { + ( $year, $month, $day ) = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 ); + $tmpmonth = ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ); + } + } + @resultdate = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 ); + } if ( $subscription->{periodicity} == 9 ) { for ( my $i = 0 ; $i < @irreg ; $i++ ) { if ( $irreg[$i] == ( ( $tmpmonth != 9 ) ? ( $tmpmonth + 3 ) % 12 : 12 ) ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index b20ced4..3a0633f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -1215,6 +1215,11 @@ $(document).ready(function() { [% ELSE %] [% END %] + [% IF ( periodicity13 ) %] + + [% ELSE %] + + [% END %] [% IF ( periodicity9 ) %] -- 1.7.4 From f.demians at tamil.fr Fri May 13 12:22:32 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 12:22:32 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug #6142 - Delete sub CanBookBeReserved Message-ID: <1305282154-26280-1-git-send-email-f.demians@tamil.fr> From: Alex Arnaud Signed-off-by: Fr?d?ric Demians --- C4/ILSDI/Utility.pm | 49 ------------------------------------------------- 1 files changed, 0 insertions(+), 49 deletions(-) diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm index 8ee1224..274a266 100644 --- a/C4/ILSDI/Utility.pm +++ b/C4/ILSDI/Utility.pm @@ -67,55 +67,6 @@ sub BorrowerExists { return $sth->fetchrow; } -=head2 CanBookBeReserved - -Checks if a book (at bibliographic level) can be reserved by a borrower. - - if ( CanBookBeReserved($borrower, $biblionumber) ) { - # Do stuff - } - -=cut - -sub CanBookBeReserved { - my ( $borrower, $biblionumber ) = @_; - - my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves"); - my $MAXOUTSTANDING = C4::Context->preference("maxoutstanding"); - - my $out = 1; - - if ( $borrower->{'amountoutstanding'} > $MAXOUTSTANDING ) { - $out = undef; - } - if ( $borrower->{gonenoaddress} eq 1 ) { - $out = undef; - } - if ( $borrower->{lost} eq 1 ) { - $out = undef; - } - if ( $borrower->{debarred} eq 1 ) { - $out = undef; - } - my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} ); - if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { - $out = undef; - } - foreach my $res (@reserves) { - if ( $res->{'biblionumber'} == $biblionumber ) { - $out = undef; - } - } - my $issues = GetPendingIssues( $borrower->{'borrowernumber'} ); - foreach my $issue (@$issues) { - if ( $issue->{'biblionumber'} == $biblionumber ) { - $out = undef; - } - } - - return $out; -} - =head2 Availability Returns, for an itemnumber, an array containing availability information. -- 1.7.4 From f.demians at tamil.fr Fri May 13 12:22:33 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 12:22:33 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6152: Document DOM authority index config In-Reply-To: <1305282154-26280-1-git-send-email-f.demians@tamil.fr> References: <1305282154-26280-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305282154-26280-2-git-send-email-f.demians@tamil.fr> From: Jared Camins-Esakov Add a note so developers know not to edit authority-zebra-indexdefs.xsl directly but to instead edit authority-koha-indexdefs.xml and use the koha-indexdefs-to-zebra.xsl stylesheet to generate the former from the latter. Signed-off-by: Fr?d?ric Demians --- .../authorities/authority-koha-indexdefs.xml | 6 ++++++ .../authorities/authority-zebra-indexdefs.xsl | 8 ++++++++ .../marc21/authorities/koha-indexdefs-to-zebra.xsl | 8 ++++++++ 3 files changed, 22 insertions(+), 0 deletions(-) diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml index 2515317..87d31bc 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml @@ -1,4 +1,10 @@ + v diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl index 9538e6f..5c37bc6 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl @@ -1,4 +1,12 @@ + diff --git a/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl b/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl index d466611..66bf816 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl +++ b/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl @@ -18,6 +18,14 @@ + +This file has been automatically generated from a Koha index definition file +with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file, +as it may be overwritten. To regenerate, edit the appropriate Koha index +definition file (probably something like authority-koha-indexdefs.xml) and run: +`xsltproc koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > +authority-zebra-indexdefs.xsl` (substituting the appropriate file names). + -- 1.7.4 From f.demians at tamil.fr Fri May 13 12:22:34 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 12:22:34 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6218: patron gets dot added if no first name In-Reply-To: <1305282154-26280-1-git-send-email-f.demians@tamil.fr> References: <1305282154-26280-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305282154-26280-3-git-send-email-f.demians@tamil.fr> From: conan (aka Fernando Canizo) Trivial fix, now it choose surname if firstname is empty and behaves like before (firstname.surname) if both are provided. [2011.05.12] F. Demians. Works as described. Signed-off-by: Fr?d?ric Demians --- C4/Members.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index a151e03..e03b40b 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -842,7 +842,7 @@ sub Generate_Userid { do { $firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; $surname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; - $newuid = lc("$firstname.$surname"); + $newuid = lc(($firstname)? "$firstname.$surname" : $surname); $newuid .= $offset unless $offset == 0; $offset++; -- 1.7.4 From colin.campbell at ptfs-europe.com Fri May 13 12:33:58 2011 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 13 May 2011 11:33:58 +0100 Subject: [Koha-patches] [Signed Off] Bug 6321 Add a 1/4 months frequency Message-ID: <1305282838-24026-1-git-send-email-colin.campbell@ptfs-europe.com> From: Fr?d?ric Demians Thanks Stefano Bargioni for the typo fix Signed-off-by: Colin Campbell --- C4/Serials.pm | 11 ++++++++++- .../prog/en/modules/serials/subscription-add.tt | 5 +++++ 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 20ae7a3..9726971 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2154,7 +2154,7 @@ sub abouttoexpire { @res=Date::Calc::Today; } my @endofsubscriptiondate=split(/-/,$expirationdate); - my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 0, 0, 0); + my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 124, 0, 0); my @datebeforeend; @datebeforeend = Add_Delta_Days( $endofsubscriptiondate[0],$endofsubscriptiondate[1],$endofsubscriptiondate[2], - (3 * $per_list[$per])) if (@endofsubscriptiondate && $endofsubscriptiondate[0]*$endofsubscriptiondate[1]*$endofsubscriptiondate[2]); @@ -2317,6 +2317,15 @@ sub GetNextDate(@) { } @resultdate = Add_Delta_YMD( $year, $month, $day, 0, 3, 0 ); } + if ( $subscription->{periodicity} == 13 ) { + for ( my $i = 0 ; $i < @irreg ; $i++ ) { + if ( $irreg[$i] == ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ) ) { + ( $year, $month, $day ) = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 ); + $tmpmonth = ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ); + } + } + @resultdate = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 ); + } if ( $subscription->{periodicity} == 9 ) { for ( my $i = 0 ; $i < @irreg ; $i++ ) { if ( $irreg[$i] == ( ( $tmpmonth != 9 ) ? ( $tmpmonth + 3 ) % 12 : 12 ) ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index b20ced4..3a0633f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -1215,6 +1215,11 @@ $(document).ready(function() { [% ELSE %] [% END %] + [% IF ( periodicity13 ) %] + + [% ELSE %] + + [% END %] [% IF ( periodicity9 ) %] -- 1.7.4.4 From M.de.Rooy at rijksmuseum.nl Fri May 13 13:27:51 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Fri, 13 May 2011 11:27:51 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] 5684: Remove all items fields from a Z39.50 record imported for acquisition. In-Reply-To: <1305285990-5629-1-git-send-email-m.de.rooy@rijksmuseum.nl> References: <1305285990-5629-1-git-send-email-m.de.rooy@rijksmuseum.nl> Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3124F733@S-MAIL-1B.rijksmuseum.intra> From: Fr?d?rick Capovilla Signed-off-by: Marcel de Rooy --- acqui/neworderempty.pl | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 386dda7..bd06b0c 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -132,6 +132,11 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'}); die("Could not find the selected record in the reservoir, bailing") unless $marcrecord; + # Remove all the items (952) from the imported record + foreach my $item ($marcrecord->field('952')) { + $marcrecord->delete_field($item); + } + my $duplicatetitle; #look for duplicates ($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord); -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Fri May 13 13:46:52 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Fri, 13 May 2011 11:46:52 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] [3.4.X] 5684: Remove all items fields from a Z39.50 record imported for acquisition. Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3124F759@S-MAIL-1B.rijksmuseum.intra> From: Fr?d?rick Capovilla Signed-off-by: Marcel de Rooy m.de.rooy at rijksmuseum.nl May 13: Patch applies to 3.4.X as well. --- acqui/neworderempty.pl | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 386dda7..bd06b0c 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -132,6 +132,11 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'}); die("Could not find the selected record in the reservoir, bailing") unless $marcrecord; + # Remove all the items (952) from the imported record + foreach my $item ($marcrecord->field('952')) { + $marcrecord->delete_field($item); + } + my $duplicatetitle; #look for duplicates ($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord); -- 1.6.0.6 _______________________________________________ Koha-patches mailing list Koha-patches at lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ From M.de.Rooy at rijksmuseum.nl Fri May 13 13:48:16 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Fri, 13 May 2011 11:48:16 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] [3.2.X] 5684: Remove all items fields from a Z39.50 record imported for acquisition. In-Reply-To: <1305287206-6097-1-git-send-email-m.de.rooy@rijksmuseum.nl> References: <1305287206-6097-1-git-send-email-m.de.rooy@rijksmuseum.nl> Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3124F76A@S-MAIL-1B.rijksmuseum.intra> From: Fr?d?rick Capovilla Signed-off-by: Marcel de Rooy m.de.rooy at rijksmuseum.nl May 13: Patch for 3.2.X. --- acqui/neworderempty.pl | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 7028ee2..f1bab82 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -132,6 +132,11 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'}); die("Could not find the selected record in the reservoir, bailing") unless $marcrecord; + # Remove all the items (952) from the imported record + foreach my $item ($marcrecord->field('952')) { + $marcrecord->delete_field($item); + } + my $duplicatetitle; #look for duplicates if (! (($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord))){ -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Fri May 13 14:43:20 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Fri, 13 May 2011 12:43:20 +0000 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5860 - Attempted follow up patch to fix itemstocknumberindex In-Reply-To: <1305290499-7250-1-git-send-email-m.de.rooy@rijksmuseum.nl> References: <1305290499-7250-1-git-send-email-m.de.rooy@rijksmuseum.nl> Message-ID: <809BE39CD64BFD4EB9036172EBCCFA3124F7A0@S-MAIL-1B.rijksmuseum.intra> From: Chris Cormack Signed-off-by: Marcel de Rooy May 13: Replaced information_schema construct with show indexes. Check existence on both names. Tested it. --- installer/data/mysql/updatedatabase.pl | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..1de273e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4217,7 +4217,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = '3.03.00.042'; if (C4::Context->preference("Version") < TransformToNum($DBversion) && $original_version < TransformToNum("3.02.06.001")) { - $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); + #check old indexes and possibly remove + my @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + #add index $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; SetVersion ($DBversion); -- 1.6.0.6 From f.demians at tamil.fr Fri May 13 16:19:08 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 16:19:08 +0200 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Bug 6098 zebra conf NSB NSE indexed as space Message-ID: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> From: Fridolyn SOMERS Signed-off-by: Fr?d?ric Demians --- etc/zebradb/etc/word-phrase-utf.chr | 2 +- etc/zebradb/lang_defs/fr/sort-string-utf.chr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/zebradb/etc/word-phrase-utf.chr b/etc/zebradb/etc/word-phrase-utf.chr index b41b298..2e8ece6 100644 --- a/etc/zebradb/etc/word-phrase-utf.chr +++ b/etc/zebradb/etc/word-phrase-utf.chr @@ -9,7 +9,7 @@ lowercase {0-9}{a-z} uppercase {0-9}{A-Z} # Breaking characters -space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~? +space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~?{\x88-\x89}{\x98-\x9C} # Characters to be considered equivalent for searching purposes equivalent a??????????? diff --git a/etc/zebradb/lang_defs/fr/sort-string-utf.chr b/etc/zebradb/lang_defs/fr/sort-string-utf.chr index 28c5c19..6a842e3 100644 --- a/etc/zebradb/lang_defs/fr/sort-string-utf.chr +++ b/etc/zebradb/lang_defs/fr/sort-string-utf.chr @@ -10,7 +10,7 @@ uppercase {0-9}A?BCDEFGHIJKLMNOPQRSTUVWXYZ? # Breaking characters -space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~{\x88-\x89} +space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~?{\x88-\x89}{\x98-\x9C} # Characters to be considered equivalent for searching purposes. equivalent ??(ae) -- 1.7.4 From f.demians at tamil.fr Fri May 13 16:19:09 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 16:19:09 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug #6131 - change index "Author-name-personal" for "Personal-name" In-Reply-To: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> References: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305296352-11520-2-git-send-email-f.demians@tamil.fr> From: Alex Arnaud Signed-off-by: Fr?d?ric Demians --- etc/zebradb/marc_defs/unimarc/biblios/record.abs | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index 16b99e4..a9e88d5 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -94,12 +94,12 @@ melm 200$f Author:w,Author:p melm 200$g Author:w,Author:p # physical Author melm 700$9 Koha-Auth-Number,Koha-Auth-Number:n -melm 700$a Author,Author-name-personal,Author:p,Author-name-personal:p,Author-name-personal,Author:s -melm 700 Author,Author-name-personal,Author:p,Author-name-personal:p,Author-name-personal:p +melm 700$a Author,Personal-name,Author:p,Personal-name:p,Personal-name,Author:s +melm 700 Author,Personal-name,Author:p,Personal-name:p,Personal-name:p melm 701$9 Koha-Auth-Number,Koha-Auth-Number:n -melm 701 Author,Author-name-personal,Author:p,Author-name-personal:p,Author-name-personal:p +melm 701 Author,Personal-name,Author:p,Personal-name:p,Personal-name:p melm 702$9 Koha-Auth-Number,Koha-Auth-Number:n -melm 702 Author,Author-name-personal,Author:p,Author-name-personal:p,Author-name-personal:p +melm 702 Author,Personal-name,Author:p,Personal-name:p,Personal-name:p # collective Author melm 710$9 Koha-Auth-Number,Koha-Auth-Number:n -- 1.7.4 From f.demians at tamil.fr Fri May 13 16:19:10 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 16:19:10 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6135: insert fields ordered in C4::biblio:ModBiblioMarc In-Reply-To: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> References: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305296352-11520-3-git-send-email-f.demians@tamil.fr> From: St?phane Delaune Fixing order subfields for biblionumber and biblioitemnumber BibLibre MT5951 Signed-off-by: Fr?d?ric Demians --- C4/Biblio.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index c9590c2..0978f45 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3020,7 +3020,7 @@ sub _koha_marc_update_bib_ids { # drop old field and create new one... $old_field = $record->field($biblio_tag); $record->delete_field($old_field) if $old_field; - $record->append_fields($new_field); + $record->insert_fields_ordered($new_field); # deal with biblioitemnumber if ( $biblioitem_tag < 10 ) { @@ -3436,7 +3436,7 @@ sub ModBiblioMarc { } substr( $string, 22, 6, "frey50" ); unless ( $record->subfield( 100, "a" ) ) { - $record->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) ); + $record->insert_fields_ordered( MARC::Field->new( 100, "", "", "a" => $string ) ); } } -- 1.7.4 From f.demians at tamil.fr Fri May 13 16:19:11 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 16:19:11 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug #6139 Automatic incrementation of call number does not work if prefix contains ' In-Reply-To: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> References: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305296352-11520-4-git-send-email-f.demians@tamil.fr> From: Sophie Meynieux This patch also fixes giving the first callnumber with a given prefix. Signed-off-by: Fr?d?ric Demians --- cataloguing/value_builder/callnumber.pl | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cataloguing/value_builder/callnumber.pl b/cataloguing/value_builder/callnumber.pl index cc37af0..64507f2 100755 --- a/cataloguing/value_builder/callnumber.pl +++ b/cataloguing/value_builder/callnumber.pl @@ -95,7 +95,7 @@ sub plugin { ); } # If a prefix is submited, we look for the highest itemcallnumber with this prefix, and return it incremented - } elsif ( $code =~ m/^[A-Z.\-]+$/ ) { + } elsif ( $code =~ m/^[A-Z.\-']+$/ ) { my $sth = $dbh->prepare("SELECT MAX(CAST(SUBSTRING_INDEX(itemcallnumber,' ',-1) AS SIGNED)) FROM items WHERE itemcallnumber LIKE ?"); $sth->execute($code.' %'); if ( my $max = $sth->fetchrow ) { @@ -103,10 +103,16 @@ sub plugin { return => $code.' '.($max+1) ); } + else { + $template->param( + return => $code.' 1' + ); + } + # The user entered a custom value, we don't touch it, this could be handled in js } else { $template->param( - return => $code, + return => $code ); } output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.4 From f.demians at tamil.fr Fri May 13 16:19:12 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 16:19:12 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug 6098 Followup -- doesn't replace NSB/NSE by space In-Reply-To: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> References: <1305296352-11520-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305296352-11520-5-git-send-email-f.demians@tamil.fr> On any page, NSB/NSE characters are replaced by space in Output.pm. It isn't a good thing: - It isn't necessary since Zebra indexer handle properly those characters as delimiter. - It isn't necessary for display since XSL file already do that. - It isn't efficient since a regex is done on every whole page sent by Koha, not only on biblio record part. - It removes an information that librarian want to keep in their biblio records: any record edited in Koha loose its NSB/NSE characters. Signed-off-by: Fr?d?ric Demians --- C4/Output.pm | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/C4/Output.pm b/C4/Output.pm index 98f2d7a..3dd3a37 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -460,10 +460,7 @@ sub output_with_http_headers($$$$;$) { $options->{'Content-Style-Type' } = 'text/css'; $options->{'Content-Script-Type'} = 'text/javascript'; } - # remove SUDOC specific NSB NSE - $data =~ s/\x{C2}\x{98}|\x{C2}\x{9C}/ /g; - $data =~ s/\x{C2}\x{88}|\x{C2}\x{89}/ /g; - + # We can't encode here, that will double encode our templates, and xslt # We need to fix the encoding as it comes out of the database, or when we pass the variables to templates -- 1.7.4 From oleonard at myacpl.org Fri May 13 16:59:19 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 13 May 2011 10:59:19 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6337 - Variable scope errors in staff client cart print view Message-ID: <1305298759-23781-1-git-send-email-oleonard@myacpl.org> Also removing "Return to cart" link from the print view, redundant now that the print view prints and redirects automatically. --- .../intranet-tmpl/prog/en/modules/basket/basket.tt | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 84504b4..38b25e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -132,7 +132,7 @@ function placeHold () {
        [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]

        - [% IF ( BIBLIO_RESULT.print_basket ) %] + [% IF ( print_basket ) %] [% BIBLIO_RESULT.title |html %] [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %] @@ -301,7 +301,7 @@ function placeHold () {

        - + [% UNLESS ( print_basket ) %][% END %] @@ -313,7 +313,7 @@ function placeHold () { [% ELSE %] [% END %] - [% UNLESS ( BIBLIO_RESULT.print_basket ) %] [% END %] @@ -347,13 +347,9 @@ function placeHold () {
          Title Item Type Location
        + [% UNLESS ( print_basket ) %]
        [% END %] -[% IF ( print_basket ) %] -<< Back to Cart -[% ELSE %]
        -[% END %]

      -- 1.7.3 From oleonard at myacpl.org Fri May 13 17:47:58 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 13 May 2011 11:47:58 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6338 - Datepickers on OPAC hold form does not work Message-ID: <1305301678-24271-1-git-send-email-oleonard@myacpl.org> --- .../opac-tmpl/prog/en/modules/opac-reserve.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index bc46b28..3804a8a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -329,7 +329,7 @@ Calendar.setup( { inputField : "reserve_date_[% bibitemloo.biblionumber %]", - ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "CalendarReserveDate[% bibitemloo.biblionumber %]", disableFunc : validate[% bibitemloo.biblionumber %], dateStatusFunc : validate[% bibitemloo.biblionumber %] @@ -359,7 +359,7 @@ Calendar.setup( { inputField : "expiration_date_[% bibitemloo.biblionumber %]", - ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]", disableFunc : validate1, dateStatusFunc : validate1 -- 1.7.3 From oleonard at myacpl.org Fri May 13 17:49:00 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 13 May 2011 11:49:00 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6332, Hold forms missing 'clear date' link Message-ID: <1305301740-24323-1-git-send-email-oleonard@myacpl.org> --- .../prog/en/modules/reserve/request.tt | 1 + .../opac-tmpl/prog/en/modules/opac-reserve.tt | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 66c9235..4b7aa7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -312,6 +312,7 @@ function checkMultiHold() { ); //]]> + Clear Date [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index bc46b28..bfcbf4a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -337,6 +337,8 @@ ); //]]> +

      + Clear Date

      [% END %] [% END %] -- 1.7.3 From nengard at bywatersolutions.com Wed May 11 16:51:01 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 11 May 2011 10:51:01 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6338 - Datepickers on OPAC hold form does not work Message-ID: <1305125461-10947-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Signed-off-by: Nicole C. Engard --- .../opac-tmpl/prog/en/modules/opac-reserve.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index bc46b28..3804a8a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -329,7 +329,7 @@ Calendar.setup( { inputField : "reserve_date_[% bibitemloo.biblionumber %]", - ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "CalendarReserveDate[% bibitemloo.biblionumber %]", disableFunc : validate[% bibitemloo.biblionumber %], dateStatusFunc : validate[% bibitemloo.biblionumber %] @@ -359,7 +359,7 @@ Calendar.setup( { inputField : "expiration_date_[% bibitemloo.biblionumber %]", - ifFormat : "[% bibitemloo.DHTMLcalendar_dateformat %]", + ifFormat : "[% DHTMLcalendar_dateformat %]", button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]", disableFunc : validate1, dateStatusFunc : validate1 -- 1.7.2.3 From oleonard at myacpl.org Fri May 13 18:01:01 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 13 May 2011 12:01:01 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6300 - can't get to other pages of marc import Message-ID: <1305302461-24466-1-git-send-email-oleonard@myacpl.org> T:T variable scope error. --- .../prog/en/modules/tools/manage-marc-import.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 526f8c9..b5083ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -268,7 +268,7 @@ Page [% IF ( page.current_page ) %] [% page.page_number %] [% ELSE %] - [% page.page_number %] + [% page.page_number %] [% END %] [% END %] @@ -308,7 +308,7 @@ Page [% IF ( page.current_page ) %] [% page.page_number %] [% ELSE %] - [% page.page_number %] + [% page.page_number %] [% END %] [% END %] -- 1.7.3 From nengard at bywatersolutions.com Wed May 11 16:53:21 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 11 May 2011 10:53:21 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6332, Hold forms missing 'clear date' link Message-ID: <1305125601-11051-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Signed-off-by: Nicole C. Engard --- .../prog/en/modules/reserve/request.tt | 1 + .../opac-tmpl/prog/en/modules/opac-reserve.tt | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 66c9235..4b7aa7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -312,6 +312,7 @@ function checkMultiHold() { ); //]]> + Clear Date [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index bc46b28..bfcbf4a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -337,6 +337,8 @@ ); //]]> +

      + Clear Date

      [% END %] [% END %] -- 1.7.2.3 From f.demians at tamil.fr Fri May 13 18:12:51 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 18:12:51 +0200 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Bug 6050 Make calls to GetItemsInfo consistent In-Reply-To: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> References: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305303175-4515-2-git-send-email-f.demians@tamil.fr> From: Colin Campbell Do not misleadingly document or pass an unused second parameter makes all calls use the single parameter call as the C4 routines already did Signed-off-by: Fr?d?ric Demians --- C4/Items.pm | 12 ++++-------- basket/basket.pl | 2 +- basket/sendbasket.pl | 2 +- catalogue/detail.pl | 3 +-- catalogue/detailprint.pl | 2 +- opac/opac-ISBDdetail.pl | 2 +- opac/opac-detail.pl | 2 +- opac/opac-sendbasket.pl | 2 +- opac/opac-sendshelf.pl | 2 +- reports/reservereport.pl | 2 +- serials/routing-preview.pl | 2 +- virtualshelves/sendshelf.pl | 2 +- 12 files changed, 15 insertions(+), 20 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 44272e2..9342564 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1112,16 +1112,12 @@ sub GetItemsByBiblioitemnumber { =head2 GetItemsInfo - @results = GetItemsInfo($biblionumber, $type); + @results = GetItemsInfo($biblionumber); -Returns information about books with the given biblionumber. - -C<$type> may be either C or anything else. If it is not set to -C, then the search will exclude lost, very overdue, and -withdrawn items. +Returns information about items with the given biblionumber. C returns a list of references-to-hash. Each element -contains a number of keys. Most of them are table items from the +contains a number of keys. Most of them are attributes from the C, C, C, and C tables in the Koha database. Other keys include: @@ -1157,7 +1153,7 @@ If this is set, it is set to C. =cut sub GetItemsInfo { - my ( $biblionumber, $type ) = @_; + my ( $biblionumber ) = @_; my $dbh = C4::Context->dbh; # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance. my $query = " diff --git a/basket/basket.pl b/basket/basket.pl index ed6e5a4..8fc15e4 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -66,7 +66,7 @@ foreach my $biblionumber ( @bibs ) { my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); my $marcurlsarray = GetMarcUrls ($record,$marcflavour); - my @items = &GetItemsInfo( $biblionumber, 'opac' ); + my @items = GetItemsInfo( $biblionumber ); my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index 107a737..66f73fa 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -80,7 +80,7 @@ if ( $email_add ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = &GetItemsInfo( $biblionumber, 'opac' ); + my @items = GetItemsInfo( $biblionumber ); my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 03271b4..8738737 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -112,8 +112,7 @@ my $branches = GetBranches(); my $itemtypes = GetItemTypes(); my $dbh = C4::Context->dbh; -# 'intra' param included, even though it's not respected in GetItemsInfo currently -my @all_items= GetItemsInfo($biblionumber, 'intra'); +my @all_items = GetItemsInfo( $biblionumber ); my @items; for my $itm (@all_items) { push @items, $itm unless ( $itm->{itemlost} && GetHideLostItemsPreference($borrowernumber) && !$showallitems); diff --git a/catalogue/detailprint.pl b/catalogue/detailprint.pl index 41d346f..fe92fe5 100755 --- a/catalogue/detailprint.pl +++ b/catalogue/detailprint.pl @@ -35,7 +35,7 @@ my $type = $query->param('type'); my $biblionumber = $query->param('biblionumber'); # change back when ive fixed request.pl -my @items = GetItemsInfo( $biblionumber, $type ); +my @items = GetItemsInfo( $biblionumber ); my $norequests = 1; foreach my $itm (@items) { $norequests = 0 unless $itm->{'notforloan'}; diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index b50947d..e141da7 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -124,7 +124,7 @@ $template->param( my $norequests = 1; my $res = GetISBDView($biblionumber, "opac"); -my @items = &GetItemsInfo($biblionumber, 'opac'); +my @items = GetItemsInfo( $biblionumber ); my $itemtypes = GetItemTypes(); for my $itm (@items) { diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index b357a56..6345da1 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -85,7 +85,7 @@ if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); # change back when ive fixed request.pl -my @all_items = &GetItemsInfo( $biblionumber, 'opac' ); +my @all_items = GetItemsInfo( $biblionumber ); my @items; # Getting items to be hidden diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 0042c42..df1b4c5 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -81,7 +81,7 @@ if ( $email_add ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = &GetItemsInfo( $biblionumber, 'opac' ); + my @items = GetItemsInfo( $biblionumber ); my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index 6a376c4..b1c34de 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -86,7 +86,7 @@ if ( $email ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = &GetItemsInfo( $biblionumber, 'opac' ); + my @items = GetItemsInfo( $biblionumber ); $dat->{MARCNOTES} = $marcnotesarray; $dat->{MARCSUBJCTS} = $marcsubjctsarray; diff --git a/reports/reservereport.pl b/reports/reservereport.pl index 67f384c..42a1d20 100755 --- a/reports/reservereport.pl +++ b/reports/reservereport.pl @@ -96,7 +96,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { # FIXME still need to shift the text to the template so its translateable if ( $data->[$i]) { # find if its on issue - my @items = GetItemsInfo($line{'biblionumber'}, 'intra' ); + my @items = GetItemsInfo( $line{biblionumber} ); my $onissue = 0; foreach my $item (@items) { if ( $item->{'datedue'} eq 'Reserved' ) { diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl index 5d57c13..64849b5 100755 --- a/serials/routing-preview.pl +++ b/serials/routing-preview.pl @@ -65,7 +65,7 @@ if($ok){ # get biblio information.... my $biblio = $subs->{'biblionumber'}; my ($count2, at bibitems) = GetBiblioItemByBiblioNumber($biblio); - my @itemresults = GetItemsInfo($subs->{'biblionumber'}, 'intra'); + my @itemresults = GetItemsInfo( $subs->{biblionumber} ); my $branch = $itemresults[0]->{'holdingbranch'}; my $branchname = GetBranchName($branch); diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl index d902398..16ada89 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -85,7 +85,7 @@ if ( $email ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = &GetItemsInfo( $biblionumber, 'opac' ); + my @items = GetItemsInfo( $biblionumber ); $dat->{MARCNOTES} = $marcnotesarray; $dat->{MARCSUBJCTS} = $marcsubjctsarray; -- 1.7.4 From f.demians at tamil.fr Fri May 13 18:12:52 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 18:12:52 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6073: string misses to be translatable In-Reply-To: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> References: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305303175-4515-3-git-send-email-f.demians@tamil.fr> From: Paul Poulain [2011.05.13] F. Demians. Rebased on HEAD. Signed-off-by: Fr?d?ric Demians --- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index bcfb7b8..ad573de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -4,7 +4,7 @@ function uncheckbox(form, field) { var price = new Number(form.elements['price' + field].value); var tmpprice = ""; - var errmsg = "ERROR: Price is not a valid number, please check the price and try again!" + var errmsg = _("ERROR: Price is not a valid number, please check the price and try again!"); if (isNaN(price)) { alert(errmsg); for(var i=0; i References: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305303175-4515-4-git-send-email-f.demians@tamil.fr> From: Fridolyn SOMERS Signed-off-by: Fr?d?ric Demians --- catalogue/search.pl | 2 +- opac/opac-search.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index e1e9a98..a41b18a 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -297,7 +297,7 @@ if ( $template_type eq 'advsearch' ) { # shouldn't appear on the first one, scan indexes should, adding a new # box should only appear on the last, etc. my @search_boxes_array; - my $search_boxes_count = C4::Context->preference("OPACAdvSearchInputCount") || 3; # FIXME: using OPAC sysprefs? + my $search_boxes_count = 3; # begin whith 3 boxes # FIXME: all this junk can be done in TMPL using __first__ and __last__ for (my $i=1;$i<=$search_boxes_count;$i++) { # if it's the first one, don't display boolean option, but show scan indexes diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 68018b6..ffa1adc 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -215,7 +215,7 @@ if ( $template_type && $template_type eq 'advsearch' ) { # shouldn't appear on the first one, scan indexes should, adding a new # box should only appear on the last, etc. my @search_boxes_array; - my $search_boxes_count = C4::Context->preference("OPACAdvSearchInputCount") || 3; + my $search_boxes_count = 3; # begin whith 3 boxes for (my $i=1;$i<=$search_boxes_count;$i++) { # if it's the first one, don't display boolean option, but show scan indexes if ($i==1) { -- 1.7.4 From f.demians at tamil.fr Fri May 13 18:12:54 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 18:12:54 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug 6050 Followup, edit a last function call In-Reply-To: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> References: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305303175-4515-5-git-send-email-f.demians@tamil.fr> Signed-off-by: Fr?d?ric Demians --- misc/migration_tools/rebuild_zebra.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index 5be01cf..0ec48eb 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -320,7 +320,7 @@ sub export_marc_records_from_sth { ? GetXmlBiblio( $record_number ) : GetAuthorityXML( $record_number ); if ($record_type eq 'biblio'){ - my @items = GetItemsInfo($record_number, 'intra'); + my @items = GetItemsInfo($record_number); if (@items){ my $record = MARC::Record->new; my @itemsrecord; -- 1.7.4 From f.demians at tamil.fr Fri May 13 18:12:50 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 18:12:50 +0200 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] bug 5929: use branch email in preference for due notices Message-ID: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> From: Srdjan Jankovic Signed-off-by: Fr?d?ric Demians --- C4/Circulation.pm | 3 ++- misc/cronjobs/advance_notices.pl | 32 ++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9a2db4c..5efd090 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2093,9 +2093,10 @@ sub GetUpcomingDueIssues { my $dbh = C4::Context->dbh; my $statement = <preference('KohaAdminEmailAddress'); # -f: From address for the emails my $verbose = 0; # -v: verbose my $itemscontent = join(',',qw( issuedate title barcode author )); GetOptions( 'c' => \$confirm, 'n' => \$nomail, 'm:i' => \$maxdays, - 'f:s' => \$fromaddress, 'v' => \$verbose, 'itemscontent=s' => \$itemscontent, ); @@ -83,7 +81,6 @@ See the comments in the script for directions on changing the script. This script has the following parameters : -c Confirm and remove this help & warning -m maximum number of days in advance to send advance notices. - -f from address for the emails. Defaults to KohaAdminEmailAddress system preference -n send No mail. Instead, all mail messages are printed on screen. Usefull for testing purposes. -v verbose -i csv list of fields that get substituted into templates in places @@ -135,10 +132,15 @@ SELECT biblio.*, items.*, issues.* AND (TO_DAYS(date_due)-TO_DAYS(NOW()) = ?) END_SQL +my $admin_adress = C4::Context->preference('KohaAdminEmailAddress'); + UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { warn 'examining ' . $upcoming->{'itemnumber'} . ' upcoming due items' if $verbose; # warn( Data::Dumper->Dump( [ $upcoming ], [ 'overdue' ] ) ); + my $from_address = $upcoming->{branchemail} || $admin_adress; + die Dumper($upcoming); + my $letter; my $borrower_preferences; if ( 0 == $upcoming->{'days_until_due'} ) { @@ -146,11 +148,13 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $upcoming->{'borrowernumber'}, message_name => 'item due' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); - next DUEITEM unless $borrower_preferences; + next unless $borrower_preferences; if ( $borrower_preferences->{'wants_digest'} ) { # cache this one to process after we've run through all of the items. - $due_digest->{$upcoming->{'borrowernumber'}}++; + my $digest = $due_digest->{$upcoming->{'borrowernumber'}} ||= {}; + $digest->{email} ||= $from_address; + $digest->{count}++; } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'DUE'; @@ -179,7 +183,9 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { if ( $borrower_preferences->{'wants_digest'} ) { # cache this one to process after we've run through all of the items. - $upcoming_digest->{$upcoming->{'borrowernumber'}}++; + my $digest = $upcoming_digest->{$upcoming->{'borrowernumber'}} ||= {}; + $digest->{email} ||= $from_address; + $digest->{count}++; } else { my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); my $letter_type = 'PREDUE'; @@ -211,6 +217,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { foreach my $transport ( @{$borrower_preferences->{'transports'}} ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $upcoming->{'borrowernumber'}, + from_address => $from_address, message_transport_type => $transport } ); } } @@ -231,7 +238,10 @@ SELECT biblio.*, items.*, issues.* AND (TO_DAYS(date_due)-TO_DAYS(NOW()) = ?) END_SQL -PATRON: while ( my ( $borrowernumber, $count ) = each %$upcoming_digest ) { +PATRON: while ( my ( $borrowernumber, $digest ) = each %$upcoming_digest ) { + my $count = $digest->{count}; + my $from_address = $digest->{email}; + my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrowernumber, message_name => 'advance notice' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); @@ -241,6 +251,7 @@ PATRON: while ( my ( $borrowernumber, $count ) = each %$upcoming_digest ) { my $letter_type = 'PREDUEDGST'; my $letter = C4::Letters::getletter( 'circulation', $letter_type ); die "no letter of type '$letter_type' found. Please see sample_notices.sql" unless $letter; + $sth->execute($borrowernumber,$borrower_preferences->{'days_in_advance'}); my $titles = ""; while ( my $item_info = $sth->fetchrow_hashref()) { @@ -261,13 +272,17 @@ PATRON: while ( my ( $borrowernumber, $count ) = each %$upcoming_digest ) { foreach my $transport ( @{$borrower_preferences->{'transports'}} ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $borrowernumber, + from_address => $from_address, message_transport_type => $transport } ); } } } # Now, run through all the people that want digests and send them -PATRON: while ( my ( $borrowernumber, $count ) = each %$due_digest ) { +PATRON: while ( my ( $borrowernumber, $digest ) = each %$due_digest ) { + my $count = $digest->{count}; + my $from_address = $digest->{email}; + my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrowernumber, message_name => 'item due' } ); # warn( Data::Dumper->Dump( [ $borrower_preferences ], [ 'borrower_preferences' ] ) ); @@ -297,6 +312,7 @@ PATRON: while ( my ( $borrowernumber, $count ) = each %$due_digest ) { foreach my $transport ( @{$borrower_preferences->{'transports'}} ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $borrowernumber, + from_address => $from_address, message_transport_type => $transport } ); } } -- 1.7.4 From f.demians at tamil.fr Fri May 13 18:12:55 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Fri, 13 May 2011 18:12:55 +0200 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] bug 5929: removed debugging leftover In-Reply-To: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> References: <1305303175-4515-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305303175-4515-6-git-send-email-f.demians@tamil.fr> From: Srdjan Jankovic Signed-off-by: Fr?d?ric Demians --- misc/cronjobs/advance_notices.pl | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index eb5071a..528ad2d 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -139,7 +139,6 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { # warn( Data::Dumper->Dump( [ $upcoming ], [ 'overdue' ] ) ); my $from_address = $upcoming->{branchemail} || $admin_adress; - die Dumper($upcoming); my $letter; my $borrower_preferences; -- 1.7.4 From nengard at bywatersolutions.com Wed May 11 16:56:39 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 11 May 2011 10:56:39 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6300 - can't get to other pages of marc import Message-ID: <1305125799-11187-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard T:T variable scope error. Signed-off-by: Nicole C. Engard --- .../prog/en/modules/tools/manage-marc-import.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 526f8c9..b5083ae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -268,7 +268,7 @@ Page [% IF ( page.current_page ) %] [% page.page_number %] [% ELSE %] - [% page.page_number %] + [% page.page_number %] [% END %] [% END %] @@ -308,7 +308,7 @@ Page [% IF ( page.current_page ) %] [% page.page_number %] [% ELSE %] - [% page.page_number %] + [% page.page_number %] [% END %] [% END %] -- 1.7.2.3 From nengard at bywatersolutions.com Wed May 11 21:13:40 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 11 May 2011 15:13:40 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] BUG 4319 allow holds on waiting items Message-ID: <1305141220-12289-1-git-send-email-nengard@bywatersolutions.com> From: Fridolyn SOMERS Signed-off-by: Nicole C. Engard --- C4/Search.pm | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index ab7cb59..4ce3abc 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1671,7 +1671,7 @@ sub searchResults { ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber}); } - # item is withdrawn, lost or damaged + # item is withdrawn, lost, damaged, not for loan, reserved or in transit if ( $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} @@ -1684,8 +1684,13 @@ sub searchResults { $itemlost_count++ if $item->{itemlost}; $itemdamaged_count++ if $item->{damaged}; $item_in_transit_count++ if $transfertwhen ne ''; - $item_onhold_count++ if $reservestatus eq 'Waiting'; + $item_onhold_count++ if $reservestatus eq 'Waiting'; + $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; + + # only withdrawn, lost and damaged avoid placing hold on item + $can_place_holds = 1 unless ($item->{withdrawn} || $item->{itemlost} || $item->{damaged}); + $other_count++; my $key = $prefix . $item->{status}; -- 1.7.2.3 From f.demians at tamil.fr Sat May 14 08:52:19 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 14 May 2011 08:52:19 +0200 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Bug 5885: UNIMARC XSLT changes In-Reply-To: <1305355940-12329-1-git-send-email-f.demians@tamil.fr> References: <1305355940-12329-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305355940-12329-2-git-send-email-f.demians@tamil.fr> From: Paul Poulain dealing with some BNF/SUDOC invalid utf-8 (in title, the removed fields are used to mark non-sorted words) Signed-off-by: Fr?d?ric Demians --- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 2 +- .../prog/en/xslt/UNIMARCslimUtils.xsl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index fcfe65c..4ead40d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -28,7 +28,7 @@ + select="translate($title, '˜œ슜슛슘슈슉','')"/> : diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index c04a8e4..ad1650d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -135,6 +135,14 @@ + + + + + + + -- 1.7.4 From f.demians at tamil.fr Sat May 14 08:52:20 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 14 May 2011 08:52:20 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug 5885 Followup. Report editing to OPAC XSL files In-Reply-To: <1305355940-12329-1-git-send-email-f.demians@tamil.fr> References: <1305355940-12329-1-git-send-email-f.demians@tamil.fr> Message-ID: <1305355940-12329-3-git-send-email-f.demians@tamil.fr> Signed-off-by: Fr?d?ric Demians --- .../prog/en/xslt/UNIMARCslim2OPACDetail.xsl | 2 +- .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl index 2832b6b..3963292 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -28,7 +28,7 @@ + select="translate($title, '˜œ슜슛슘슈슉','')"/> : diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl index 831724c..85bcd84 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl @@ -33,7 +33,7 @@ + select="translate($title, '˜œ슜슛슘슈슉','')"/>
      -- 1.7.4 From f.demians at tamil.fr Sat May 14 08:52:18 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 14 May 2011 08:52:18 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 3674: reimplementation Message-ID: <1305355940-12329-1-git-send-email-f.demians@tamil.fr> From: conan (aka Fernando L. Canizo) 05eb43f5fc00889420e03845b5059d80bf1663ad reverted a previous implementation of 3674. 3674 was encoding the password field when it was meant to be disabled (password='!'), and then, in Auth.pm we were trying to compare an encoded '!' with '!', which will never succeed. This gets sure we encode only provided passwords and also includes an auto generated login. Signed-off-by: Fr?d?ric Demians --- C4/Members.pm | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index a151e03..e5db97f 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -800,8 +800,10 @@ Returns the borrowernumber sub AddMember { my (%data) = @_; my $dbh = C4::Context->dbh; - $data{'userid'} = '' unless $data{'password'}; - $data{'password'} = md5_base64( $data{'password'} ) if $data{'password'}; + # generate a proper login if none provided + $data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq ''; + # create a disabled account if no password provided + $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!'; $data{'borrowernumber'}=InsertInTable("borrowers",\%data); # mysql_insertid is probably bad. not necessarily accurate and mysql-specific at best. logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog"); @@ -842,7 +844,7 @@ sub Generate_Userid { do { $firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; $surname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; - $newuid = lc("$firstname.$surname"); + $newuid = lc(($firstname)? "$firstname.$surname" : $surname); $newuid .= $offset unless $offset == 0; $offset++; -- 1.7.4 From Katrin.Fischer.83 at web.de Sat May 14 12:59:47 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sat, 14 May 2011 12:59:47 +0200 Subject: [Koha-patches] [PATCH] Bug 6099: Pagination bar on guided reports result page broken Message-ID: <1305370787-4400-1-git-send-email-Katrin.Fischer.83@web.de> The pagination on the guided reports page was not showing up. TT problem. To test: Add a sql report with more than 20 results. Example: select * from borrowers Without the patch, only the first 20 results will show and no pagination bar. --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 24c5a13..589bcdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -518,7 +518,7 @@ NAME="name" -->">[% order_b.name %] [% IF ( notes ) %]

      [% notes %]

      [% END %] [% IF ( unlimited_total ) %]

      Total number of rows matching the (unlimited) query is [% unlimited_total %].

      [% END %]
      [% sql %]
      -
      [% DEFAULT pagination_bar="" %]
      +
      [% pagination_bar %]
      [% UNLESS ( errors ) %] [% FOREACH header_ro IN header_row %][% END %] -- 1.7.4.1 From f.demians at tamil.fr Sat May 14 15:21:29 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sat, 14 May 2011 15:21:29 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6099: Pagination bar on guided reports result page broken Message-ID: <1305379289-23970-1-git-send-email-f.demians@tamil.fr> From: Katrin Fischer The pagination on the guided reports page was not showing up. TT problem. To test: Add a sql report with more than 20 results. Example: select * from borrowers Without the patch, only the first 20 results will show and no pagination bar. [2011.05.14] I confirm the bug, and that this patch fix it. Signed-off-by: Fr?d?ric Demians --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 24c5a13..589bcdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -518,7 +518,7 @@ NAME="name" -->">[% order_b.name %][% END %] - [% IF ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %] + [% IF ( bibitemloo.holdable ) %] + + [% IF ( OPACItemHolds ) %] + [% END %] - [% IF ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %] + [% IF ( bibitemloo.holdable ) %] + + [% IF ( OPACItemHolds ) %] + [% END %][% END %] @@ -440,9 +440,8 @@ [% IF ( OPACItemHolds ) %] [% IF ( bibitemloo.holdable ) %] - - + [% ELSIF ( text_field.link_field ) %] [% ELSE %] diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 8f89597..29d2dd3 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -61,7 +61,7 @@ my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my $barcode = $cgi->param('barcode') if $cgi->param('barcode'); -my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); +my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); if ($op eq 'remove') { $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); diff --git a/labels/label-manage.pl b/labels/label-manage.pl index 197c8d4..70302e8 100755 --- a/labels/label-manage.pl +++ b/labels/label-manage.pl @@ -74,7 +74,7 @@ my $op = $cgi->param('op') || 'none'; my $element_id = $cgi->param('element_id') || undef; my $error = $cgi->param('error') || 0; -my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); +my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); if ($op eq 'delete') { if ($label_element eq 'layout') {$error = C4::Labels::Layout::delete(layout_id => $element_id);} -- 1.7.4.1 From oleonard at myacpl.org Fri May 20 21:23:41 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 20 May 2011 15:23:41 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6370 - news showing that it's for the opac when it's for the librarian interface Message-ID: <1305919421-10503-1-git-send-email-oleonard@myacpl.org> T:T variable scope error. --- .../prog/en/modules/tools/koha-news.tt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index 19242ed..fbe4b4a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -172,10 +172,10 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %] - [% END %] - [% IF ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %] + [% IF ( bibitemloo.holdable ) %] + + [% IF ( OPACItemHolds ) %] + [% END %][% END %] @@ -440,9 +440,8 @@ [% IF ( OPACItemHolds ) %] [% IF ( bibitemloo.holdable ) %] - - + [% END %] - + - - + + [% END %]
      [% header_ro.cell %]
      [% IF ( notes ) %]

      [% notes %]

      [% END %] [% IF ( unlimited_total ) %]

      Total number of rows matching the (unlimited) query is [% unlimited_total %].

      [% END %]
      [% sql %]
      -
      [% DEFAULT pagination_bar="" %]
      +
      [% pagination_bar %]
      [% UNLESS ( errors ) %] [% FOREACH header_ro IN header_row %][% END %] -- 1.7.4 From jcamins at bywatersolutions.com Sat May 14 15:16:23 2011 From: jcamins at bywatersolutions.com (Jared Camins-Esakov) Date: Sat, 14 May 2011 09:16:23 -0400 Subject: [Koha-patches] [PATCH] Bug 5268: Change all occurances of 'debar' to 'restrict' Message-ID: <1305378983-5085-1-git-send-email-jcamins@bywatersolutions.com> From: Nicole C. Engard Signed-off-by: Nicole C. Engard Signed-off-by: Jared Camins-Esakov --- koha-tmpl/intranet-tmpl/prog/en/columns.def | 2 +- .../intranet-tmpl/prog/en/modules/circ/overdue.tt | 2 +- .../prog/en/modules/help/members/moremember.tt | 2 +- .../prog/en/modules/help/tools/overduerules.tt | 4 ++-- .../prog/en/modules/members/memberentrygen.tt | 2 +- .../prog/en/modules/members/moremember.tt | 2 +- .../prog/en/modules/tools/overduerules.tt | 10 +++++----- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/columns.def b/koha-tmpl/intranet-tmpl/prog/en/columns.def index b8d6e8c..3c67949 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/columns.def +++ b/koha-tmpl/intranet-tmpl/prog/en/columns.def @@ -22,7 +22,7 @@ borrowers.categorycode Borrowers Category borrowers.dateenrolled Date Enrolled borrowers.gonenoaddress Address Missing borrowers.lost Lost Card -borrowers.debarred Debarred +borrowers.debarred Restricted borrowers.studentnumber Student Id number borrowers.school School borrowers.contactname Contact Name diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 9f4ec8d..67df77c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -178,7 +178,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt index d0ead07..9384e6f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/moremember.tt @@ -63,7 +63,7 @@ In the case of patrons who are marked as 'Child' or 'Professional' and their Gua
    • Patrons can also be blocked from checking items out by setting Patron Flags
      • If you would like your circulation staff to confirm a patron's address before checking items out to the patron, you can see the 'Gone no Address' flag
      • -
      • If you would like to bar a patron from the library you can set the 'Debarred' flag +
      • If you would like to prevent a patron from checking items out or performing circulation actions at the library you can set the 'Restricted' flag
        • This flag can automatically be set with the Overdue/Notice Status Triggers
        diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt index 630ef0c..7b7704b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt @@ -12,9 +12,9 @@
        • Delay is the number of days after an issue is due before an action is triggered.
          • Important: These rules should not be used for Advanced Notices. Advanced Notices should be set using the Enhanched Messaging Preferences on the Patron Profile.
          • -
          • Important: If you want Koha to trigger an action (send a letter or debar member), a delay value is required.
          +
        • Important: If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.
      • To send additional notices, click on the tabs for 'Second' and 'Third' notice
      • -
      • If you would like to prevent a patron from checking items out because of their overdue items, check the 'Debar' box, this will put a notice on the patron's record at checkout informing the librarian that the patron cannot check out due to overdue items.
      +
    • If you would like to prevent a patron from checking items out because of their overdue items, check the 'Restrict' box, this will put a notice on the patron's record at checkout informing the librarian that the patron cannot check out due to overdue items.
    • If the numbers you've entered in a give row beneath the 'delay' columns are logically inconsistent, Koha will give you an alert, and explain the inconsistency.

      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 497b9ac..e815dfb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -947,7 +947,7 @@ [% FOREACH flagloo IN flagloop %]
    • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index f8073bb..e023009 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -163,7 +163,7 @@ function validate1(date) {
      - +
    • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt index 75d4b79..c3ad0c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt @@ -30,7 +30,7 @@ $(document).ready(function() {

      Defining [% IF ( branch ) %]overdue actions for [% branch %][% ELSE %]default overdue actions[% END %]

      Delay is the number of days after an checkout is due before an action is triggered.

      -

      If you want Koha to trigger an action (send a letter or debar member), a delay value is required.

      +

      If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.

      Columns must be filled left to right: if the first column is blank, other columns will be ignored.

      @@ -56,7 +56,7 @@ $(document).ready(function() {
    • Delay [% ERRORDELAY %] for [% BORERR %] patron category has some unexpected characters. There should be only numerical characters.
    • [% END %] [% IF ( ERRORUSELESSDELAY ) %] -
    • No letter or debar action specified for delay [% ERRORUSELESSDELAY %] for [% BORERR %] patron category. If a delay is supplied, either a letter, debar action, or both should be specified.
    • +
    • No letter or restriction action specified for delay [% ERRORUSELESSDELAY %] for [% BORERR %] patron category. If a delay is supplied, either a letter, restrict action, or both should be specified.
    • [% END %] [% IF ( ERRORORDER ) %]
    • The first notice's delay should be less than the second, which should be less than the third for the [% BORERR %] patron category
    • @@ -79,7 +79,7 @@ $(document).ready(function() {
      [% header_ro.cell %]
      - + [% FOREACH tabl IN table %] [% UNLESS ( loop.odd ) %] @@ -119,7 +119,7 @@ $(document).ready(function() {
       DelayFirst LetterDebar
       DelayFirst LetterRestrict
      - + [% FOREACH tabl IN table %] [% UNLESS ( loop.odd ) %] @@ -159,7 +159,7 @@ $(document).ready(function() {
       DelaySecond LetterDebar
       DelaySecond LetterRestrict
      - + [% FOREACH tabl IN table %] [% UNLESS ( loop.odd ) %] -- 1.7.2.3 From f.demians at tamil.fr Sun May 15 07:24:51 2011 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sun, 15 May 2011 07:24:51 +0200 Subject: [Koha-patches] [PATCH] Bug 6342 Help link doesn't popup anymore contextual help page Message-ID: <1305437091-16003-1-git-send-email-f.demians@tamil.fr> Fix help.pl script to deal with Template Toolkit. --- help.pl | 55 +++++++++++-------------------------------------------- 1 files changed, 11 insertions(+), 44 deletions(-) diff --git a/help.pl b/help.pl index f871e3c..58354b0 100755 --- a/help.pl +++ b/help.pl @@ -18,9 +18,9 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; -use HTML::Template::Pro; use warnings; -use C4::Output; # contains gettemplate +use C4::Templates; +use C4::Output; # use C4::Auth; use C4::Context; use CGI; @@ -30,49 +30,16 @@ my $query = new CGI; # find the script that called the online help using the CGI referer() our $refer = $query->referer(); -# workaround for popup not functioning correctly in IE -my $referurl = $query->param('url'); -if ($referurl) { - $refer = $query->param('url'); -} - -$refer =~ /.*koha\/(.*)\.pl.*/; -my $from = "modules/help/$1.tmpl"; +$refer =~ /koha\/(.*)\.pl/; +my $from = "modules/help/$1.tt"; -my $template = gethelptemplate( $from, "intranet" ); +my $htdocs = C4::Context->config('intrahtdocs'); +my ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); +unless ( -e "$htdocs/$theme/$lang/$from" ) { + $from = "modules/help/nohelp.tt"; + ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); +} +my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); -# my $template output_html_with_http_headers $query, "", $template->output; -sub gethelptemplate { - my ($tmplbase) = @_; - - my $htdocs; - $htdocs = C4::Context->config('intrahtdocs'); - my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet", $query ); - unless ( -e "$htdocs/$theme/$lang/$tmplbase" ) { - $tmplbase = "modules/help/nohelp.tmpl"; - ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet", $query ); - } - my $template = HTML::Template::Pro->new( - filename => "$htdocs/$theme/$lang/$tmplbase", - die_on_bad_params => 0, - global_vars => 1, - path => ["$htdocs/$theme/$lang/includes"] - ); - - # XXX temporary patch for Bug 182 for themelang - $template->param( - themelang => '/intranet-tmpl' . "/$theme/$lang", - interface => '/intranet-tmpl', - theme => $theme, - lang => $lang, - intranetcolorstylesheet => - C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - yuipath => (C4::Context->preference("yuipath") eq "local"?"/intranet-tmpl/$theme/$lang/lib/yui":C4::Context->preference("yuipath")), - referer => $refer, - ); - return $template; -} -- 1.7.4 From chris at bigballofwax.co.nz Sun May 15 10:26:52 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Sun, 15 May 2011 20:26:52 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 6342 Help link doesn't popup anymore contextual help page Message-ID: <1305448012-14602-1-git-send-email-chris@bigballofwax.co.nz> From: Fr?d?ric Demians Fix help.pl script to deal with Template Toolkit. Signed-off-by: Chris Cormack --- help.pl | 55 +++++++++++-------------------------------------------- 1 files changed, 11 insertions(+), 44 deletions(-) diff --git a/help.pl b/help.pl index f871e3c..58354b0 100755 --- a/help.pl +++ b/help.pl @@ -18,9 +18,9 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; -use HTML::Template::Pro; use warnings; -use C4::Output; # contains gettemplate +use C4::Templates; +use C4::Output; # use C4::Auth; use C4::Context; use CGI; @@ -30,49 +30,16 @@ my $query = new CGI; # find the script that called the online help using the CGI referer() our $refer = $query->referer(); -# workaround for popup not functioning correctly in IE -my $referurl = $query->param('url'); -if ($referurl) { - $refer = $query->param('url'); -} - -$refer =~ /.*koha\/(.*)\.pl.*/; -my $from = "modules/help/$1.tmpl"; +$refer =~ /koha\/(.*)\.pl/; +my $from = "modules/help/$1.tt"; -my $template = gethelptemplate( $from, "intranet" ); +my $htdocs = C4::Context->config('intrahtdocs'); +my ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); +unless ( -e "$htdocs/$theme/$lang/$from" ) { + $from = "modules/help/nohelp.tt"; + ( $theme, $lang ) = themelanguage( $htdocs, $from, "intranet", $query ); +} +my $template = C4::Templates->new('intranet', "$htdocs/$theme/$lang/$from"); -# my $template output_html_with_http_headers $query, "", $template->output; -sub gethelptemplate { - my ($tmplbase) = @_; - - my $htdocs; - $htdocs = C4::Context->config('intrahtdocs'); - my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet", $query ); - unless ( -e "$htdocs/$theme/$lang/$tmplbase" ) { - $tmplbase = "modules/help/nohelp.tmpl"; - ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet", $query ); - } - my $template = HTML::Template::Pro->new( - filename => "$htdocs/$theme/$lang/$tmplbase", - die_on_bad_params => 0, - global_vars => 1, - path => ["$htdocs/$theme/$lang/includes"] - ); - - # XXX temporary patch for Bug 182 for themelang - $template->param( - themelang => '/intranet-tmpl' . "/$theme/$lang", - interface => '/intranet-tmpl', - theme => $theme, - lang => $lang, - intranetcolorstylesheet => - C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - yuipath => (C4::Context->preference("yuipath") eq "local"?"/intranet-tmpl/$theme/$lang/lib/yui":C4::Context->preference("yuipath")), - referer => $refer, - ); - return $template; -} -- 1.7.2.2 From chris at bigballofwax.co.nz Sun May 15 10:32:43 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Sun, 15 May 2011 20:32:43 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Fix for Bug 6337 - Variable scope errors in staff client cart print view Message-ID: <1305448363-14722-1-git-send-email-chris@bigballofwax.co.nz> From: Owen Leonard Also removing "Return to cart" link from the print view, redundant now that the print view prints and redirects automatically. Signed-off-by: Chris Cormack --- .../intranet-tmpl/prog/en/modules/basket/basket.tt | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 84504b4..38b25e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -132,7 +132,7 @@ function placeHold () { [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]

      - [% IF ( BIBLIO_RESULT.print_basket ) %] + [% IF ( print_basket ) %] [% BIBLIO_RESULT.title |html %] [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %] @@ -301,7 +301,7 @@ function placeHold () {

       DelayThird LetterDebar
       DelayThird LetterRestrict
      - + [% UNLESS ( print_basket ) %][% END %] @@ -313,7 +313,7 @@ function placeHold () { [% ELSE %] [% END %] - [% UNLESS ( BIBLIO_RESULT.print_basket ) %] [% END %] @@ -347,13 +347,9 @@ function placeHold () {
        Title Item Type Location
      + [% UNLESS ( print_basket ) %]
      [% END %] -[% IF ( print_basket ) %] -<< Back to Cart -[% ELSE %]
      -[% END %] -- 1.7.2.2 From chris at bigballofwax.co.nz Sun May 15 11:07:16 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Sun, 15 May 2011 21:07:16 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 6340: Pagination bar on guided reports result page broken Message-ID: <1305450436-14893-1-git-send-email-chris@bigballofwax.co.nz> From: Katrin Fischer The pagination on the guided reports page was not showing up. TT problem. To test: Add a sql report with more than 20 results. Example: select * from borrowers Without the patch, only the first 20 results will show and no pagination bar. Signed-off-by: Chris Cormack --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 24c5a13..589bcdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -518,7 +518,7 @@ NAME="name" -->">[% order_b.name %]
      [% IF ( notes ) %]

      [% notes %]

      [% END %] [% IF ( unlimited_total ) %]

      Total number of rows matching the (unlimited) query is [% unlimited_total %].

      [% END %]
      [% sql %]
      -
      [% DEFAULT pagination_bar="" %]
      +
      [% pagination_bar %]
      [% UNLESS ( errors ) %] [% FOREACH header_ro IN header_row %][% END %] -- 1.7.2.2 From chris at bigballofwax.co.nz Mon May 16 09:30:21 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Mon, 16 May 2011 19:30:21 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 4002: issues table referential integrity Message-ID: <1305531021-16332-1-git-send-email-chris@bigballofwax.co.nz> From: Srdjan Jankovic This patch fixes rows in the issues table that have null borrower or item numbers And stops this being able to happen in the future Signed-off-by: Chris Cormack --- installer/data/mysql/kohastructure.sql | 12 +++++----- installer/data/mysql/updatedatabase.pl | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e3c6f42..cd0d722 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -936,8 +936,8 @@ CREATE TABLE `import_items` ( DROP TABLE IF EXISTS `issues`; CREATE TABLE `issues` ( - `borrowernumber` int(11) default NULL, - `itemnumber` int(11) default NULL, + `borrowernumber` int(11), + `itemnumber` int(11), `date_due` date default NULL, `branchcode` varchar(10) default NULL, `issuingbranch` varchar(18) default NULL, @@ -947,11 +947,11 @@ CREATE TABLE `issues` ( `renewals` tinyint(4) default NULL, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `issuedate` date default NULL, + PRIMARY KEY (`itemnumber`), KEY `issuesborridx` (`borrowernumber`), - KEY `issuesitemidx` (`itemnumber`), KEY `bordate` (`borrowernumber`,`timestamp`), - CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, - CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL + CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -2098,7 +2098,7 @@ CREATE TABLE `serialitems` ( UNIQUE KEY `serialitemsidx` (`itemnumber`), KEY `serialitems_sfk_1` (`serialid`), CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT serialitems_sfk_2 FOREIGN KEY (itemnumber) REFERENCES items (itemnumber) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `user_permissions`; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..640f59a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4332,6 +4332,39 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) + SELECT borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate FROM issues WHERE borrowernumber IS NULL"); + $dbh->do("DELETE FROM issues WHERE borrowernumber IS NULL"); + + $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) + SELECT borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate FROM issues WHERE itemnumber IS NULL"); + $dbh->do("DELETE FROM issues WHERE itemnumber IS NULL"); + + $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) + SELECT borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate FROM issues WHERE NOT EXISTS (SELECT * FROM borrowers WHERE borrowernumber = issues.borrowernumber)"); + $dbh->do("DELETE FROM issues WHERE NOT EXISTS (SELECT * FROM borrowers WHERE borrowernumber = issues.borrowernumber)"); + + $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) + SELECT borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate FROM issues WHERE NOT EXISTS (SELECT * FROM borrowers WHERE itemnumber = issues.itemnumber)"); + $dbh->do("DELETE FROM issues WHERE NOT EXISTS (SELECT * FROM items WHERE itemnumber = issues.itemnumber)"); + + $dbh->do("ALTER TABLE issues ALTER COLUMN borrowernumber DROP DEFAULT"); + $dbh->do("ALTER TABLE issues ALTER COLUMN itemnumber DROP DEFAULT"); + $dbh->do("ALTER TABLE issues MODIFY COLUMN borrowernumber int(11) NOT NULL"); + $dbh->do("ALTER TABLE issues MODIFY COLUMN itemnumber int(11) NOT NULL"); + $dbh->do("ALTER TABLE issues DROP KEY `issuesitemidx`"); + $dbh->do("ALTER TABLE issues ADD PRIMARY KEY (`itemnumber`)"); + $dbh->do("ALTER TABLE issues DROP FOREIGN KEY `issues_ibfk_1`"); + $dbh->do("ALTER TABLE issues DROP FOREIGN KEY `issues_ibfk_2`"); + $dbh->do("ALTER TABLE issues ADD CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE"); + $dbh->do("ALTER TABLE issues ADD CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE"); + + print "Upgrade to $DBversion done (issues referential integrity)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.7.2.2 From M.de.Rooy at rijksmuseum.nl Mon May 16 09:51:35 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 07:51:35 +0000 Subject: [Koha-patches] [PATCH] [3.2.X] 5860 Follow up fix for itemstocknumber index Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C660F@S-MAIL-1B.rijksmuseum.intra> Remove itemstocknumber index and recreate it. --- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6888b72..261bf90 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4074,6 +4074,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.02.09.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + #Follow up fix for 5860 + #check old indexes and possibly remove + my @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + #add index (non unique) + $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); + print "Upgrade to $DBversion done (5860: Change items.stocknumber to be not unique)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 16 09:51:47 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 07:51:47 +0000 Subject: [Koha-patches] [PATCH] [3.4.X] 5860 Follow up fix for itemstocknumber index Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C661A@S-MAIL-1B.rijksmuseum.intra> Remove itemstocknumber index and recreate it. --- installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f503112..d802f8e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4323,6 +4323,19 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.04.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + #Follow up fix for 5860 + #check old indexes and possibly remove + my @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + #add index (non unique) + $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); + print "Upgrade to $DBversion done (5860: Change items.stocknumber to be not unique)\n"; + SetVersion ($DBversion); +} =head1 FUNCTIONS -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 16 10:07:49 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 08:07:49 +0000 Subject: [Koha-patches] [PATCH] Second follow up fix for 5860 Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C6641@S-MAIL-1B.rijksmuseum.intra> Added code also at end of updatedatabase. Some installs may need it. Since it only may recreate the index, it does not harm... NOTE: Please apply after first follow up fix! --- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1de273e..d7bd5a3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4337,6 +4337,20 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = '3.05.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + #follow up fix 5860: some installs already past 3.3.0.42 + #check old indexes and possibly remove + my @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + #add index + $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); + print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 16 11:47:14 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 09:47:14 +0000 Subject: [Koha-patches] [PATCH] [REVISED] 5860 Fixing stocknumber index Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C66AD@S-MAIL-1B.rijksmuseum.intra> Fixing code for 3.3.0.42 update. Adding code at end of update script if install past that point already. --- installer/data/mysql/updatedatabase.pl | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..de9806b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4216,13 +4216,27 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } $DBversion = '3.03.00.042'; -if (C4::Context->preference("Version") < TransformToNum($DBversion) && $original_version < TransformToNum("3.02.06.001")) { - $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); - $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); - print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + stocknumber_checker(); + print "Upgrade to $DBversion done (5860 Index itemstocknumber)\n"; SetVersion ($DBversion); } +sub stocknumber_checker { #code reused later on + my @row; + #drop the obsolete itemSStocknumber idx if it exists + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + + #check itemstocknumber idx; remove it if it is unique + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx' AND non_unique=0"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + + #add itemstocknumber index non-unique IF it still not exists + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);") unless @row; +} + $DBversion = "3.03.00.043"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { @@ -4332,6 +4346,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = '3.05.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + #follow up fix 5860: some installs already past 3.3.0.42 + stocknumber_checker(); + print "Upgrade to $DBversion done (Fix for stocknumber index)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 16 11:47:56 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 09:47:56 +0000 Subject: [Koha-patches] [PATCH] [REVISED] [3.4.X] 5860 Fixing stocknumber index Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C66C5@S-MAIL-1B.rijksmuseum.intra> Fixing code for 3.3.0.42 update. Adding code at end of update script if install past that point already. --- installer/data/mysql/updatedatabase.pl | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f503112..02b3ea2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4216,13 +4216,27 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } $DBversion = '3.03.00.042'; -if (C4::Context->preference("Version") < TransformToNum($DBversion) && $original_version < TransformToNum("3.02.06.001")) { - $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); - $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); - print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + stocknumber_checker(); + print "Upgrade to $DBversion done (5860 Index itemstocknumber)\n"; SetVersion ($DBversion); } +sub stocknumber_checker { #code reused later on + my @row; + #drop the obsolete itemSStocknumber idx if it exists + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + + #check itemstocknumber idx; remove it if it is unique + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx' AND non_unique=0"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + + #add itemstocknumber index non-unique IF it still not exists + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);") unless @row; +} + $DBversion = "3.03.00.043"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { @@ -4323,6 +4337,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.04.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + #follow up fix 5860: some installs already past 3.3.0.42 + stocknumber_checker(); + print "Upgrade to $DBversion done (Fix for stocknumber index)\n"; + SetVersion ($DBversion); +} =head1 FUNCTIONS -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 16 11:49:01 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 09:49:01 +0000 Subject: [Koha-patches] [PATCH] [REVISED] [3.2.X] 5860 Fixing stocknumber index Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C66DF@S-MAIL-1B.rijksmuseum.intra> Fixing code for 3.2.6.1/3.2.7.1 update. Adding code at end of update script if install past that point already. --- installer/data/mysql/updatedatabase.pl | 34 ++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6888b72..061ebd6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4017,12 +4017,26 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = '3.02.06.001'; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); - $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); - print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; + stocknumber_checker(); + print "Upgrade to $DBversion done (5860 Index itemstocknumber)\n"; SetVersion ($DBversion); } +sub stocknumber_checker { #code reused later on + my @row; + #drop the obsolete itemSStocknumber idx if it exists + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemsstocknumberidx'"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;") if @row; + + #check itemstocknumber idx; remove it if it is unique + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx' AND non_unique=0"); + $dbh->do("ALTER TABLE `items` DROP INDEX `itemstocknumberidx`;") if @row; + + #add itemstocknumber index non-unique IF it still not exists + @row = $dbh->selectrow_array("SHOW INDEXES FROM items WHERE key_name='itemstocknumberidx'"); + $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);") unless @row; +} + $DBversion = '3.02.07.000'; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (Incrementing version for 3.2.7 release. See release notes for details.)\n"; @@ -4031,9 +4045,9 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = '3.02.07.001'; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do("ALTER TABLE `items` DROP INDEX `itemsstocknumberidx`;"); - $dbh->do("ALTER TABLE items ADD INDEX itemstocknumberidx (stocknumber);"); - print "Upgrade to $DBversion done (Change items.stocknumber to be not unique)\n"; + #follow up fix 5860: some installs already past 3.2.6.1 + stocknumber_checker(); + print "Upgrade to $DBversion done (Fix for stocknumber index)\n"; SetVersion ($DBversion); } @@ -4074,6 +4088,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.02.09.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + #follow up fix 5860: some installs already past 3.2.6.1/3.2.7.1 + stocknumber_checker(); + print "Upgrade to $DBversion done (Fix for stocknumber index)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.6.0.6 From christophe.croullebois at biblibre.com Mon May 16 12:11:38 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Mon, 16 May 2011 12:11:38 +0200 Subject: [Koha-patches] [PATCH 1/1] Bug 6268: (MT #6408) Bad Total in basket.pl Message-ID: <1305540698-5034-1-git-send-email-christophe.croullebois@biblibre.com> The total_est_gste or gsti is computed on the total_rrp_gste or gsti. But in the budget this amount is the summ of discounts computed for each line. Due to the rounding to 2 decimal places this produces a difference in Funds view with Total sublevels spent. --- acqui/basket.pl | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 0261e86..8104316 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -224,11 +224,13 @@ if ( $op eq 'delete_confirm' ) { my @results = GetOrders( $basketno ); my $gist = $bookseller->{gstrate} // C4::Context->preference("gist") // 0; + $gist = 0 if $gist == 0.0000; my $discount = $bookseller->{'discount'} / 100; my $total_rrp; # RRP Total, its value will be assigned to $total_rrp_gsti or $total_rrp_gste depending of $bookseller->{'listincgst'} my $total_rrp_gsti; # RRP Total, GST included my $total_rrp_gste; # RRP Total, GST excluded my $gist_rrp; + my $total_rrp_est; my $qty_total; my @books_loop; @@ -250,6 +252,7 @@ if ( $op eq 'delete_confirm' ) { $total_rrp += $qty * $order->{'rrp'}; my $line_total = $qty * $order->{'ecost'}; + $total_rrp_est += $qty * $results[$i]->{'ecost'}; # FIXME: what about the "actual cost" field? $qty_total += $qty; my %line = %{ $order }; @@ -275,19 +278,28 @@ if ( $op eq 'delete_confirm' ) { push @books_loop, \%line; } - if ($bookseller->{'listincgst'}) { # if prices already includes GST - $total_rrp_gsti = $total_rrp; # we know $total_rrp_gsti - $total_rrp_gste = $total_rrp_gsti / ($gist + 1); # and can reverse compute other values - $gist_rrp = $total_rrp_gsti - $total_rrp_gste; # - } else { # if prices does not include GST - $total_rrp_gste = $total_rrp; # then we use the common way to compute other values - $gist_rrp = $total_rrp_gste * $gist; # - $total_rrp_gsti = $total_rrp_gste + $gist_rrp; # - } - # These vars are estimated totals and GST, taking in account the booksellet discount - my $total_est_gsti = $total_rrp_gsti - ($total_rrp_gsti * $discount); - my $gist_est = $gist_rrp - ($gist_rrp * $discount); - my $total_est_gste = $total_rrp_gste - ($total_rrp_gste * $discount); +my $total_est_gste; + my $total_est_gsti; + my $gist_est; + if ($gist){ # if we have GST + if ( $bookseller->{'listincgst'} ) { # if prices already includes GST + $total_rrp_gsti = $total_rrp; # we know $total_rrp_gsti + $total_rrp_gste = $total_rrp_gsti / ( $gist + 1 ); # and can reverse compute other values + $gist_rrp = $total_rrp_gsti - $total_rrp_gste; # + $total_est_gste = $total_rrp_gste - ( $total_rrp_gste * $discount ); + $total_est_gsti = $total_rrp_est; + } else { # if prices does not include GST + $total_rrp_gste = $total_rrp; # then we use the common way to compute other values + $gist_rrp = $total_rrp_gste * $gist; # + $total_rrp_gsti = $total_rrp_gste + $gist_rrp; # + $total_est_gste = $total_rrp_est; + $total_est_gsti = $total_rrp_gsti - ( $total_rrp_gsti * $discount ); + } + $gist_est = $gist_rrp - ( $gist_rrp * $discount ); + } else { + $total_rrp_gsti = $total_rrp; + $total_est_gsti = $total_rrp_est; +} my $contract = &GetContract($basket->{contractnumber}); my @orders = GetOrders($basketno); -- 1.7.0.4 From M.de.Rooy at rijksmuseum.nl Mon May 16 14:48:08 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 16 May 2011 12:48:08 +0000 Subject: [Koha-patches] [PATCH] 4513: Resetting framework to Default seems impossible Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312C6BB2@S-MAIL-1B.rijksmuseum.intra> Test this patch by opening a biblio saved in e.g. books framework. Change the framework in Staff Cataloging back to Default and save. Open the biblio again and check if it really has been set to Default. --- cataloguing/addbiblio.pl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 7e146c0..03d9063 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -866,6 +866,7 @@ foreach my $thisframeworkcode ( keys %$frameworks ) { push @frameworkcodeloop, \%row; } $template->param( frameworkcodeloop => \@frameworkcodeloop, + frameworkcode => $frameworkcode||"Default", breedingid => $breedingid ); # ++ Global @@ -963,6 +964,7 @@ if ( $op eq "addbiblio" ) { $template->param( title => $record->title() ) if ($record ne "-1" && C4::Context->preference('marcflavour') eq "usmarc"); $template->param( popup => $mode, + frameworkcode => $frameworkcode||'Default', itemtype => $frameworkcode, ); output_html_with_http_headers $input, $cookie, $template->output; @@ -1027,7 +1029,7 @@ if (C4::Context->preference("marcflavour") eq "MARC21"){ $template->param( popup => $mode, - frameworkcode => $frameworkcode, + frameworkcode => $frameworkcode||'Default', itemtype => $frameworkcode, borrowernumber => $loggedinuser ); -- 1.6.0.6 From mdhafen at tech.washk12.org Mon May 16 18:26:15 2011 From: mdhafen at tech.washk12.org (Mike Hafen) Date: Mon, 16 May 2011 10:26:15 -0600 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 4002: issues table referential integrity In-Reply-To: <1305531021-16332-1-git-send-email-chris@bigballofwax.co.nz> References: <1305531021-16332-1-git-send-email-chris@bigballofwax.co.nz> Message-ID: Looks like you are selecting from the wrong table here... borrowers should be items On Mon, May 16, 2011 at 1:30 AM, Chris Cormack wrote: > From: Srdjan Jankovic > > This patch fixes rows in the issues table that have null borrower or item > numbers > And stops this being able to happen in the future > > Signed-off-by: Chris Cormack > --- > + $dbh->do("INSERT INTO old_issues (borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate) + SELECT borrowernumber, itemnumber, date_due, branchcode, issuingbranch, returndate, lastreneweddate, `return`, renewals, timestamp, issuedate FROM issues WHERE NOT EXISTS (SELECT * FROM borrowers WHERE itemnumber = issues.itemnumber)"); + $dbh->do("DELETE FROM issues WHERE NOT EXISTS (SELECT * FROM items WHERE itemnumber = issues.itemnumber)"); -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleonard at myacpl.org Mon May 16 22:04:10 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 16 May 2011 16:04:10 -0400 Subject: [Koha-patches] [PATCH] Follow-up fix for Bug 6170 'More options' in advanced search broken Message-ID: <1305576250-27279-1-git-send-email-oleonard@myacpl.org> Simplifying markup in the staff client advanced search: - Moving IDs to fieldsets and removing redundant divs - Removing unused section - Adding missing IDs and fieldsets --- .../intranet-tmpl/prog/en/css/staff-global.css | 33 +++++- .../prog/en/modules/catalogue/advsearch.tt | 132 ++++++-------------- 2 files changed, 68 insertions(+), 97 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index c211507..d1dffa8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1988,4 +1988,35 @@ fieldset.rows+h3 {clear:both;padding-top:.5em;} .importing .importing_msg { padding-left: 10px; padding-bottom: 10px; -} \ No newline at end of file +} + +#advanced-search fieldset { + border : 1px solid #EEE; + -moz-border-radius : 3px; + border-radius : 3px; +} + +#advanced-search fieldset.action { + border : 0; +} + +#advanced-search fieldset fieldset { + border : 1px solid #EEE; + margin : 0; + padding : .3em .5em; + -moz-border-radius : 0; + border-radius : 0; +} +#advanced-search fieldset fieldset+fieldset { + border-top : 0; +} +#advanced-search table { + border-spacing : 5px; + border-collapse : separate; + border-width : 0; +} +#advanced-search td { + border : 1px solid #EEE; + padding : 0.3em 0.4em; +} + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt index bfa5179..7e6b5ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt @@ -43,8 +43,8 @@ [% IF ( outer_servers_loop ) %] -
      - Select remote databases: +
      + Select remote databases [% FOREACH outer_servers_loo IN outer_servers_loop %] [% IF ( outer_servers_loo.checked ) %][% ELSE %][% END %] @@ -54,8 +54,8 @@ [% END %] -
      - Search For: +
      + Search For [% FOREACH search_box IN search_boxes_loop %] [% IF ( search_boxes_label ) %]
      [% ELSE %]
      [% END %] [% IF ( expanded_options ) %] @@ -74,7 +74,7 @@ [+] [% END %] [% IF ( search_box.scan_index ) %] - + [% END %] [% END %]
      @@ -83,20 +83,19 @@ -

      +

      [% IF ( expanded_options ) %] [Fewer Options] [% ELSE %] [More options] [% END %] [New search] -

      +
      -
      -
      - Limit to any of the following: +
      + Limit to any of the following
      [% header_ro.cell %]
      [% FOREACH itemtypeloo IN itemtypeloop %] @@ -113,23 +112,21 @@
      - [% IF ( expanded_options ) %] -
      -
      - Limits: -
      +
      + Limits +

      -   (format: yyyy-yyyy)

      +   (format: yyyy-yyyy)

      -
      -
      +
      +

      - [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] @@ -141,20 +138,18 @@ [% END %]

      -
      + - [% END %] [% IF ( UNIMARC ) %] [% INCLUDE 'subtypes_unimarc.inc' %] [% ELSE %] -
      -
      - Subtype limits:

      +

      + Subtype limits

      - - - - - - - - - - - - - - - - - - -
      - - -
      - - -
      - - -
      + +

      Location and availability +
      +

      -
      -[% END %] - -
      - -
      Location and availability: -
      - -
      -

      -

      - [% FOREACH branchloo IN branchloop %] [% IF ( branchloo.selected ) %] @@ -288,47 +233,42 @@ [% END %] [% END %] - +

      [% IF ( searchdomainloop ) %]

      OR

      - [% FOREACH searchdomainloo IN searchdomainloop %] [% END %] - +

      [% END %] -
      +
      -
      - -
      -
      Sort by: -

      [% INCLUDE 'resort_form.inc' %]

      -
      - - - - + -

      +

      [% IF ( expanded_options ) %] [Fewer Options] [% ELSE %] [More options] [% END %] [New search] -

      +
      + -- 1.7.3 From chris at bigballofwax.co.nz Mon May 16 23:23:52 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Tue, 17 May 2011 09:23:52 +1200 Subject: [Koha-patches] [PATCH] Bug 6347 - Fix for itemlevel holds in OPAC Message-ID: <1305581032-23384-1-git-send-email-chris@bigballofwax.co.nz> --- .../opac-tmpl/prog/en/modules/opac-reserve.tt | 5 ++++- opac/opac-reserve.pl | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index bc46b28..012cd0b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -371,7 +371,10 @@ Clear Date

      - +   @@ -466,7 +465,7 @@ - [% UNLESS ( tagloo.filter_approved_pending ) %][% END %] + [% UNLESS ( filter_approved_pending ) %][% END %] [% END %] -- 1.7.3 From lrea at nekls.org Fri May 20 17:59:39 2011 From: lrea at nekls.org (Liz Rea) Date: Fri, 20 May 2011 10:59:39 -0500 Subject: [Koha-patches] [PATCH 17/17] Bug 6380 - Z39.50 Cataloging Search needs a way to try search again, even if results are found Message-ID: <1305907179-2353-1-git-send-email-lrea@nekls.org> This patch adds a nice button to the results page to "Try Another Search" even if results are found. It also makes the "no results found" try again link a proper button. To test: Do a search for something that will give results -- there should now be a button to "Try Another Search" Do a search for somethng that returns no results -- The link for "Try Another Search" should now be a proper button. --- .../prog/en/modules/cataloguing/z3950_search.tt | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index 1ee7823..092826d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -160,6 +160,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% END %] [% END %]
      Select a specific copy:
      [% IF ( itemLoo.available ) %] - [% ELSE %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index d50480a..a92a976 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -477,11 +477,11 @@ if ( $numBibsAvailable == 0 || !$anyholdable) { $template->param( none_available => 1 ); } -my $itemTableColspan = 5; -if (!$template->param('OPACItemHolds')) { +my $itemTableColspan = 7; +if (! $template->{VARS}->{'OPACItemHolds'}) { $itemTableColspan--; } -if ($template->param('singleBranchMode')) { +if (! $template->{VARS}->{'singleBranchMode'}) { $itemTableColspan--; } $template->param(itemtable_colspan => $itemTableColspan); -- 1.7.3 From oleonard at myacpl.org Fri May 20 16:49:21 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 20 May 2011 10:49:21 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6378 - Misaligned columns on tags approval page Message-ID: <1305902961-9485-1-git-send-email-oleonard@myacpl.org> T:T variable scope correction. --- .../intranet-tmpl/prog/en/modules/tags/review.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index abe8b95..8c53028 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -239,7 +239,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }   [% tagloo.date_approved %]
      +

      [% ELSE %] [% IF ( emptyserverlist ) %] You didn't select any Z39.50 target. @@ -168,7 +169,8 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Connection failed to [% errcon.server %] [% END %] [% END %] -

      Nothing found. Try another search.

      +

      Nothing found. +

      [% END %] -- 1.7.2.5 From Katrin.Fischer.83 at web.de Fri May 20 21:19:14 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 20 May 2011 21:19:14 +0200 Subject: [Koha-patches] [PATCH] Bug 6343: TT issues in label creator Message-ID: <1305919154-9908-1-git-send-email-Katrin.Fischer.83@web.de> - Manage Batch had no branch set - New Batch had no branch set - Add link on item result list was broken, missing the batchid To test: Create a new batch and add items one by one. Look at 'Manage batches'. Check that the branch in the top right corner is always correctly shown and set. --- .../intranet-tmpl/prog/en/modules/labels/result.tt | 2 +- labels/label-edit-batch.pl | 2 +- labels/label-manage.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt index 16bbf25..4513a25 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt @@ -93,7 +93,7 @@
      - Add + Add [% text_field.field_value %] [% IF ( lang == 'koha' ) %] + [% IF ( opac_new.lang == 'koha' ) %] Librarian interface [% ELSE %] - [% IF ( lang == 'slip' ) %] + [% IF ( opac_new.lang == 'slip' ) %] Slip [% ELSE %] OPAC -- 1.7.3 From oleonard at myacpl.org Fri May 20 21:39:50 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 20 May 2011 15:39:50 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6306 - It is not possible edit news Message-ID: <1305920390-10650-1-git-send-email-oleonard@myacpl.org> --- .../prog/en/modules/tools/koha-news.tt | 12 ++++++------ tools/koha-news.pl | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index 19242ed..57a545e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -82,11 +82,11 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]
    • - +
    • - + Show Calendar + @@ -371,11 +372,13 @@ Clear Date

    • - +   @@ -466,7 +465,7 @@
      Select a specific copy:
      [% IF ( itemLoo.available ) %] - [% ELSE %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index d50480a..a92a976 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -477,11 +477,11 @@ if ( $numBibsAvailable == 0 || !$anyholdable) { $template->param( none_available => 1 ); } -my $itemTableColspan = 5; -if (!$template->param('OPACItemHolds')) { +my $itemTableColspan = 7; +if (! $template->{VARS}->{'OPACItemHolds'}) { $itemTableColspan--; } -if ($template->param('singleBranchMode')) { +if (! $template->{VARS}->{'singleBranchMode'}) { $itemTableColspan--; } $template->param(itemtable_colspan => $itemTableColspan); -- 1.7.4.1 From Katrin.Fischer.83 at web.de Fri May 20 23:23:57 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 20 May 2011 23:23:57 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6306 - It is not possible edit news Message-ID: <1305926637-28770-1-git-send-email-Katrin.Fischer.83@web.de> From: Owen Leonard Signed-off-by: Katrin Fischer --- .../prog/en/modules/tools/koha-news.tt | 12 ++++++------ tools/koha-news.pl | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index 19242ed..57a545e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -82,11 +82,11 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]
    • - +
    • - + Show Calendar - -
    • +
    • + + Show Calendar - -
    • + +
      +

      [% ELSE %] [% IF ( emptyserverlist ) %] You didn't select any Z39.50 target. @@ -168,7 +169,8 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Connection failed to [% errcon.server %] [% END %] [% END %] -

      Nothing found. Try another search.

      +

      Nothing found.

      +

      [% END %] -- 1.6.0.6 From fridolyn.somers at progilone.fr Mon May 23 13:41:28 2011 From: fridolyn.somers at progilone.fr (Fridolyn SOMERS) Date: Mon, 23 May 2011 13:41:28 +0200 Subject: [Koha-patches] [PATCH] BUG6388 Broken pager images in branch_transfer_limits.tt Message-ID: <1306150888-5698-1-git-send-email-fridolyn.somers@progilone.fr> --- .../en/modules/admin/branch_transfer_limits.tt | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 9410c23..a1b6fa2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -101,11 +101,11 @@
       page(s) : - - + + - - + + , entries/page :
      [% loo.tagsubfield %][% loo.tagsubfield %] [% IF ( loo.subfield_ignored ) %] [% loo.liblibrarian %] @@ -206,8 +206,8 @@ [% IF ( loo.link ) %] | Link:[% loo.link %],[% END %] [% END %] EditDeleteEditDelete
      -- 1.7.1 From oleonard at myacpl.org Mon May 23 15:07:28 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 23 May 2011 09:07:28 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] BUG 5658 can't delete subfields in frameworks Message-ID: <1306156048-11443-1-git-send-email-oleonard@myacpl.org> From: Fridolyn SOMERS Signed-off-by: Owen Leonard --- .../en/modules/admin/marc_subfields_structure.tt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt index a65297b..154aea5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt @@ -181,7 +181,7 @@ [% ELSE %] [% END %] - [% loo.tagsubfield %] + [% loo.tagsubfield %] [% IF ( loo.subfield_ignored ) %] [% loo.liblibrarian %] @@ -206,8 +206,8 @@ [% IF ( loo.link ) %] | Link:[% loo.link %],[% END %] [% END %] - Edit - Delete + Edit + Delete [% END %] -- 1.7.3 From oleonard at myacpl.org Mon May 23 15:13:21 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 23 May 2011 09:13:21 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] BUG 6388 Broken pager images in branch_transfer_limits.tt Message-ID: <1306156401-11579-1-git-send-email-oleonard@myacpl.org> From: Fridolyn SOMERS Signed-off-by: Owen Leonard --- .../en/modules/admin/branch_transfer_limits.tt | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 9410c23..a1b6fa2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -101,11 +101,11 @@  page(s) : - - + + - - + + , entries/page : [% ELSIF ( text_field.link_field ) %] - Add + Add [% ELSE %] [% text_field.field_value %] diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 8f89597..29d2dd3 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -61,7 +61,7 @@ my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my $barcode = $cgi->param('barcode') if $cgi->param('barcode'); -my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); +my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); if ($op eq 'remove') { $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); diff --git a/labels/label-manage.pl b/labels/label-manage.pl index 197c8d4..70302e8 100755 --- a/labels/label-manage.pl +++ b/labels/label-manage.pl @@ -74,7 +74,7 @@ my $op = $cgi->param('op') || 'none'; my $element_id = $cgi->param('element_id') || undef; my $error = $cgi->param('error') || 0; -my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); +my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); if ($op eq 'delete') { if ($label_element eq 'layout') {$error = C4::Labels::Layout::delete(layout_id => $element_id);} -- 1.7.2.2 From chris at bigballofwax.co.nz Tue May 24 09:55:19 2011 From: chris at bigballofwax.co.nz (Chris Cormack) Date: Tue, 24 May 2011 19:55:19 +1200 Subject: [Koha-patches] [Signed Off] [PATCH] Bug 6327: Edit subfield links broken Message-ID: <1306223719-3752-1-git-send-email-chris@bigballofwax.co.nz> From: Katrin Fischer TT issue. To test: 1) Administration > Bibliographic MARC Frameworks > Marc Structure (not Default) 2) Subfields (any field with subfields) 3) Edit link behind subfields will edit the default framework. Patch adds correct framework to URL. Signed-off-by: Chris Cormack --- .../en/modules/admin/marc_subfields_structure.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt index a65297b..1213711 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt @@ -206,7 +206,7 @@ [% IF ( loo.link ) %] | Link:[% loo.link %],[% END %] [% END %] - Edit + Edit Delete [% END %] -- 1.7.2.2 From christophe.croullebois at biblibre.com Tue May 24 17:14:19 2011 From: christophe.croullebois at biblibre.com (Christophe Croullebois) Date: Tue, 24 May 2011 17:14:19 +0200 Subject: [Koha-patches] [PATCH 1/1] [PATCH] Bug 5860: Order cancelling improvement : delete attached items & biblio if avalaible Message-ID: <1306250059-13828-1-git-send-email-christophe.croullebois@biblibre.com> - all items attached to the order are deleted - if there is no more items, and if the biblio is not in other orders then the biblio is proposed to deletion Now whe have 2 links : delete order and delete order and biblio, the second one appears only if the deletion is possible. --- C4/Acquisition.pm | 2 + C4/Biblio.pm | 25 +++++++++++++++++++- acqui/addorder.pl | 4 +++ acqui/basket.pl | 10 +++++-- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 12 ++++++++- 5 files changed, 48 insertions(+), 5 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index e431bd2..2e5f4bc 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1223,6 +1223,8 @@ sub DelOrder { my $sth = $dbh->prepare($query); $sth->execute( $bibnum, $ordernumber ); $sth->finish; + my @itemnumbers = GetItemnumbersFromOrder( $ordernumber ); + C4::Items::DelItem( $dbh, $bibnum, $_ ) for @itemnumbers; } =head2 FUNCTIONS ABOUT PARCELS diff --git a/C4/Biblio.pm b/C4/Biblio.pm index c9590c2..5b918e1 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -89,8 +89,8 @@ BEGIN { &GetMarcFromKohaField &GetFrameworkCode &TransformKohaToMarc - &CountItemsIssued + &CountBiblioInOrders ); # To modify something @@ -3630,6 +3630,29 @@ sub get_biblio_authorised_values { return $authorised_values; } +=head2 CountBiblioInOrders + +=over 4 +$count = &CountBiblioInOrders( $biblionumber); + +=back + +This function return count of biblios in orders with $biblionumber + +=cut + +sub CountBiblioInOrders { + my ($biblionumber) = @_; + my $dbh = C4::Context->dbh; + my $query = "SELECT count(*) + FROM aqorders + WHERE biblionumber=? AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')"; + my $sth = $dbh->prepare($query); + $sth->execute($biblionumber); + my $count = $sth->fetchrow; + return ($count); +} + 1; __END__ diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 44623ec..b8d0e21 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -190,6 +190,7 @@ my $user = $input->remote_user; # create if $quantity>=0 and $existing='no' # modify if $quantity>=0 and $existing='yes' # delete if $quantity has been set to 0 by the librarian +# delete biblio if delbiblio has been set to 1 by the librarian my $bibitemnum; if ( $orderinfo->{quantity} ne '0' ) { #TODO:check to see if biblio exists @@ -270,6 +271,9 @@ if ( $orderinfo->{quantity} ne '0' ) { else { # qty=0, delete the line my $biblionumber = $input->param('biblionumber'); DelOrder( $biblionumber, $$orderinfo{ordernumber} ); + if ($orderinfo->{delbiblio} == 1){ + DelBiblio($biblionumber) if (C4::Items::GetItemsCount($biblionumber) == 0 && CountBiblioInOrders($biblionumber) <= 1); + } } my $basketno=$$orderinfo{basketno}; my $booksellerid=$$orderinfo{booksellerid}; diff --git a/acqui/basket.pl b/acqui/basket.pl index 0261e86..99956cf 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -28,12 +28,12 @@ use C4::Output; use CGI; use C4::Acquisition; use C4::Budgets; - use C4::Bookseller qw( GetBookSellerFromId); use C4::Dates qw/format_date/; use C4::Debug; - +use C4::Biblio; use C4::Members qw/GetMember/; #needed for permissions checking for changing basketgroup of a basket +use C4::Items; =head1 NAME basket.pl @@ -253,7 +253,11 @@ if ( $op eq 'delete_confirm' ) { # FIXME: what about the "actual cost" field? $qty_total += $qty; my %line = %{ $order }; - + my $biblionumber = $order->{'biblionumber'}; + my $countbiblio = CountBiblioInOrders($biblionumber); + my $ordernumber = $order->{'ordernumber'}; + # if the biblio is not in other orders and if there is no items elsewhere we can show the link "Delete order and Biblio" see bug 5680 + $line{can_del_bib} = 1 if $countbiblio <= 1 && GetItemsCount($biblionumber) == scalar GetItemnumbersFromOrder( $ordernumber ); $line{order_received} = ( $qty == $order->{'quantityreceived'} ); $line{basketno} = $basketno; $line{budget_name} = $budget->{budget_name}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index d34e3d5..c1e574a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -39,6 +39,13 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber; } } + + function confirm_delete_biblio(ordernumber, biblionumber) { + var is_confirmed = confirm(_('Are you sure you want to delete this order with his biblio ?')); + if (is_confirmed) { + window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1"; + } + } //]]> @@ -278,9 +285,12 @@ Modify - Delete + Delete order
      + [% IF ( books_loo.can_del_bib ) %] + Delete order and Biblio [% END %] + [% END %] [% END %] [% END %] -- 1.7.0.4 From oleonard at myacpl.org Tue May 24 18:12:33 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 24 May 2011 12:12:33 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6402, Lists sorted by year appear to be empty Message-ID: <1306253553-15063-1-git-send-email-oleonard@myacpl.org> If you create a list, populate it with titles, and then change the sort to "year" it will appear as if your list is empty. The SQL in VirtualShelves.pm's GetShelfContents tries to accept "year" as a sort by but 'year' is not a valid column name. The SQL pulls biblioitems.publicationyear. Changing this to 'biblioitems.publicationyear as year,' --- C4/VirtualShelves.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 6ed7549..df54de8 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -292,7 +292,7 @@ sub GetShelfContents ($;$$$) { } my $query = " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*, - biblio.*, biblioitems.itemtype, biblioitems.publicationyear, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages + biblio.*, biblioitems.itemtype, biblioitems.publicationyear as year, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages FROM virtualshelfcontents vc LEFT JOIN biblio ON vc.biblionumber = biblio.biblionumber LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber -- 1.7.3 From paul.poulain at biblibre.com Tue May 24 18:46:17 2011 From: paul.poulain at biblibre.com (Paul Poulain) Date: Tue, 24 May 2011 18:46:17 +0200 Subject: [Koha-patches] [PATCH 1/1] [PATCH] Bug 5860: Order cancelling improvement : delete attached items & biblio if avalaible In-Reply-To: <1306250059-13828-1-git-send-email-christophe.croullebois@biblibre.com> References: <1306250059-13828-1-git-send-email-christophe.croullebois@biblibre.com> Message-ID: <4DDBE0D9.4070604@biblibre.com> Christophe, it's 5680, not 5860 ;-) And you forget to attach your patch to the bugzilla entry & set to "needs signoff" -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08 From oleonard at myacpl.org Tue May 24 19:01:45 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 24 May 2011 13:01:45 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5020 - on patron record sex should be gender Message-ID: <1306256505-15589-1-git-send-email-oleonard@myacpl.org> --- .../prog/en/modules/members/moremember-brief.tt | 2 +- .../prog/en/modules/members/moremember.tt | 4 +++- .../prog/en/modules/reports/borrowers_stats.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-userdetails.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-userupdate.tt | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt index 9ad6dbd..87c7a1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt @@ -48,7 +48,7 @@ [% END %]
    • Initials: [% initials %]
    • Date of birth:[% dateofbirth %]
    • -
    • Sex:[% sex %]
    • [% END %] +
    • Gender:[% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
    • [% END %] [% IF ( printethnicityline ) %]
    • Ethnicity:[% ethnicity %]
    • Ethnicity notes: [% ethnotes %]
    • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 8384dfb..275cea6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -212,7 +212,9 @@ function validate1(date) { [% END %]
    • Initials: [% initials %]
    • Date of birth:[% dateofbirth %]
    • -
    • Sex:[% sex %]
    • [% END %] +
    • Gender: + [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] +
    • [% END %] [% IF ( printethnicityline ) %]
    • Ethnicity:[% ethnicity %]
    • Ethnicity notes: [% ethnotes %]
    • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt index b177838..78f927b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt @@ -209,7 +209,7 @@ - Sex + Gender diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt index 6c4f0c3..cb09184 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt @@ -51,7 +51,7 @@ Card Number:[% cardnumber %] Identity Details DoB: [% IF ( dateofbirth ) %][% dateofbirth %][% ELSE %] [% END %] -Sex:[% IF ( sex ) %][% sex %][% ELSE %] [% END %] +Gender:[% IF ( sex ) %][% sex %][% ELSE %] [% END %] [% IF ( contactname ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt index 12fb53c..9a68851 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt @@ -66,7 +66,7 @@
      1. -
      2. [% IF ( BORROWER_INF.sex == 'F' ) %][% ELSE %][% END %] [% IF ( BORROWER_INF.sex == 'M' ) %][% ELSE %][% END %]
      3. @@ -126,7 +126,7 @@ Personal Information
        1. Date of Birth: [% BORROWER_INF.dateofbirth %]
        2. -
        3. Sex: +
        4. Gender: [% IF ( sex == 'F' ) %]Female[% END %] [% IF ( sex == 'M' ) %]Male[% END %]
        5. -- 1.7.3 From ruth at bywatersolutions.com Tue May 24 23:16:45 2011 From: ruth at bywatersolutions.com (ruth at bywatersolutions.com) Date: Tue, 24 May 2011 17:16:45 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5020 - on patron record sex should be gender Message-ID: <1306271805-1991-1-git-send-email-ruth@bywatersolutions.com> From: Owen Leonard Signed-off-by: D Ruth Bavousett --- .../prog/en/modules/members/moremember-brief.tt | 2 +- .../prog/en/modules/members/moremember.tt | 4 +++- .../prog/en/modules/reports/borrowers_stats.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-userdetails.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-userupdate.tt | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt index 9ad6dbd..87c7a1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt @@ -48,7 +48,7 @@ [% END %]
        6. Initials: [% initials %]
        7. Date of birth:[% dateofbirth %]
        8. -
        9. Sex:[% sex %]
        10. [% END %] +
        11. Gender:[% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
        12. [% END %] [% IF ( printethnicityline ) %]
        13. Ethnicity:[% ethnicity %]
        14. Ethnicity notes: [% ethnotes %]
        15. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 8384dfb..275cea6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -212,7 +212,9 @@ function validate1(date) { [% END %]
        16. Initials: [% initials %]
        17. Date of birth:[% dateofbirth %]
        18. -
        19. Sex:[% sex %]
        20. [% END %] +
        21. Gender: + [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] +
        22. [% END %] [% IF ( printethnicityline ) %]
        23. Ethnicity:[% ethnicity %]
        24. Ethnicity notes: [% ethnotes %]
        25. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt index b177838..78f927b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt @@ -209,7 +209,7 @@
      - + -
      SexGender diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt index 6c4f0c3..cb09184 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tt @@ -51,7 +51,7 @@ Card Number:[% cardnumber %]
      Identity Details
      DoB: [% IF ( dateofbirth ) %][% dateofbirth %][% ELSE %] [% END %]
      Sex:[% IF ( sex ) %][% sex %][% ELSE %] [% END %]
      +Gender:[% IF ( sex ) %][% sex %][% ELSE %] [% END %] [% IF ( contactname ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt index 12fb53c..9a68851 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt @@ -66,7 +66,7 @@
      1. -
      2. [% IF ( BORROWER_INF.sex == 'F' ) %][% ELSE %][% END %] [% IF ( BORROWER_INF.sex == 'M' ) %][% ELSE %][% END %]
      3. @@ -126,7 +126,7 @@ Personal Information
        1. Date of Birth: [% BORROWER_INF.dateofbirth %]
        2. -
        3. Sex: +
        4. Gender: [% IF ( sex == 'F' ) %]Female[% END %] [% IF ( sex == 'M' ) %]Male[% END %]
        5. -- 1.7.2.3 From oleonard at myacpl.org Tue May 24 21:18:04 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 24 May 2011 15:18:04 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6395, Cannot create routing list Message-ID: <1306264684-16032-1-git-send-email-oleonard@myacpl.org> Some old TMPL tags got left behind. --- .../prog/en/modules/serials/member-search.tt | 3 +-- .../prog/en/modules/serials/routing.tt | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt index 64c23d6..91172be 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tt @@ -64,8 +64,7 @@ function add_member(subscriptionid,borrowernumber){
      - + [% END %]
      [% resultsloo.cardnumber %] [% resultsloo.surname %], [% resultsloo.firstname %] [% resultsloo.branchcode %] ,[% resultsloo.borrowernumber %]); return false" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% resultsloo.subscriptionid %]&borrowernumber=[% resultsloo.borrowernumber %]&op=add">Add
      Add
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt index 581ca97..85c42b1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt @@ -55,17 +55,14 @@ function search_member(subscriptionid){ [% FOREACH memberloo IN memberloop %] [% memberloo.name %] [% memberloo.routingbox %] - Delete + Delete [% END %] -

      ); return false" -href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=" class="button">Add recipients  

      Add recipients   Delete All

      [% ELSE %]
    • Recipients: - ); return false" href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=[% subscriptionid %]" class="button">Add recipients
    • + Add recipients [% END %]
    • -- 1.7.3 From oleonard at myacpl.org Tue May 24 21:31:52 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 24 May 2011 15:31:52 -0400 Subject: [Koha-patches] [PATCH] Follow-up fixes for Bug 5917, Switch Koha to use Template::Toolkit Message-ID: <1306265512-16338-1-git-send-email-oleonard@myacpl.org> While fixing Bug 6395 I found a few other instances of leftover TMPL usage. --- .../en/modules/admin/branch_transfer_limits.tt | 3 +-- .../prog/en/modules/catalogue/issuehistory.tt | 3 +-- .../en/modules/reports/guided_reports_start.tt | 13 +++---------- .../prog/en/modules/serials/serials-recieve.tt | 3 +-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 9410c23..b839529 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -127,8 +127,7 @@ [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %] - [% UNLESS ( loop.odd ) %][% END %] + [% UNLESS ( loop.odd ) %][% ELSE %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index d4443f0..bc2490f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -33,8 +33,7 @@ [% FOREACH issue IN issues %] - [% UNLESS ( loop.odd ) %][% END %] + [% UNLESS ( loop.odd ) %][% ELSE %][% END %] [% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %] [% IF ( issue.barcode ) %] [% issue.barcode %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 24c5a13..5491ede 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -392,8 +392,7 @@ canned reports and writing custom SQL reports.

      [% IF ( definitions ) %]
      Dictionary Definitions [% FOREACH definition IN definitions %] - + [% END %]
      " /> [% definition.name %]
      [% definition.name %]
      [% END %] @@ -415,10 +414,7 @@ TMPL_VAR NAME="id" -->" /> [% definition.name %]
      [% FOREACH total_b IN total_by %] - +
      " value="" />
      [% FOREACH order_b IN order_by %] - [% END %] + [% END %] [% END %] [% END %] -- 1.7.0.4 From gmcharlt at gmail.com Wed May 25 20:31:54 2011 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 25 May 2011 14:31:54 -0400 Subject: [Koha-patches] [PATCH] Bug 6340: Pagination bar on guided reports result page broken Message-ID: <1306348314-8755-1-git-send-email-gmcharlt@gmail.com> From: Katrin Fischer The pagination on the guided reports page was not showing up. TT problem. To test: Add a sql report with more than 20 results. Example: select * from borrowers Without the patch, only the first 20 results will show and no pagination bar. Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 24c5a13..589bcdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -518,7 +518,7 @@ NAME="name" -->">[% order_b.name %]
      " name="order_by" value="" /> +
      - Delete + Delete order
      + [% IF ( books_loo.can_del_bib ) %] + Delete order and Biblio
      [% IF ( notes ) %]

      [% notes %]

      [% END %] [% IF ( unlimited_total ) %]

      Total number of rows matching the (unlimited) query is [% unlimited_total %].

      [% END %]
      [% sql %]
      -
      [% DEFAULT pagination_bar="" %]
      +
      [% pagination_bar %]
      [% UNLESS ( errors ) %] [% FOREACH header_ro IN header_row %][% END %] -- 1.7.2.3 From gmcharlt at gmail.com Wed May 25 20:32:33 2011 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 25 May 2011 14:32:33 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6340: Pagination bar on guided reports result page broken Message-ID: <1306348353-8839-1-git-send-email-gmcharlt@gmail.com> From: Katrin Fischer The pagination on the guided reports page was not showing up. TT problem. To test: Add a sql report with more than 20 results. Example: select * from borrowers Without the patch, only the first 20 results will show and no pagination bar. Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- .../en/modules/reports/guided_reports_start.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 24c5a13..589bcdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -518,7 +518,7 @@ NAME="name" -->">[% order_b.name %]
      [% header_ro.cell %]
      [% IF ( notes ) %]

      [% notes %]

      [% END %] [% IF ( unlimited_total ) %]

      Total number of rows matching the (unlimited) query is [% unlimited_total %].

      [% END %]
      [% sql %]
      -
      [% DEFAULT pagination_bar="" %]
      +
      [% pagination_bar %]
      [% UNLESS ( errors ) %] [% FOREACH header_ro IN header_row %][% END %] -- 1.7.2.3 From gmcharlt at gmail.com Wed May 25 20:45:54 2011 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 25 May 2011 14:45:54 -0400 Subject: [Koha-patches] [PATCH] bug 6409: fix pagination of SQL report output when parameters are used Message-ID: <1306349154-9771-1-git-send-email-gmcharlt@gmail.com> Fixes bug where paging through output of an SQL report that includes one or more parameters fails by asking you for the parameter values and again and sending you back to the first page of results. Signed-off-by: Galen Charlton --- reports/guided_reports.pl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 600ac29..582c0dc 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -21,6 +21,7 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use Text::CSV; +use URI::Escape; use C4::Reports::Guided; use C4::Auth qw/:DEFAULT get_session/; use C4::Output; @@ -521,6 +522,9 @@ elsif ($phase eq 'Run this report'){ my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0); my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report&phase=Run%20this%20report"; + if (@sql_params) { + $url = join('&sql_params=', $url, map { URI::Escape::uri_escape($_) } @sql_params); + } $template->param( 'results' => \@rows, 'sql' => $sql, -- 1.7.2.3 From lrea at nekls.org Wed May 25 20:53:18 2011 From: lrea at nekls.org (Liz Rea) Date: Wed, 25 May 2011 13:53:18 -0500 Subject: [Koha-patches] [PATCH] [Signed Off] Bug 6401 fix to the history file Message-ID: <1306349598-19959-1-git-send-email-lrea@nekls.org> From: ruth at bywatersolutions.com This patch adds Ian Walls' name to the history file, so he can be found. Signed-off-by: Liz Rea --- docs/history.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index c2c0a2f..1381ace 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -458,7 +458,7 @@ December 2 2009 General meeting http://wiki.koha-community.org/wiki/General_IRC_ December 3 2009 Foundation meeting http://wiki.koha-community.org/wiki/Foundation_Forming_IRC_Meeting,_3_December_2009 December 9 2009 Piotr Wejman becomes the 98th committer to have a patch accepted developer December 19 2009 Koha 3.0.5 released releases -December 20 2009 NYUHSL becomes the 99th committer to have a patch accepted developer +December 20 2009 Ian Walls (NYUHSL) becomes the 99th committer to have a patch accepted developer December 23 2009 Sharon Moreland becomes the 100th committer to have a patch accepted (sent via Liz Rea) developer December 23 2009 Nicolas Morin becomes the 101st committed to have a patch accepted developer January 13 2010 IRC General Meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_13_January_2010 -- 1.7.2.5 From nengard at bywatersolutions.com Tue May 24 21:25:41 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Tue, 24 May 2011 15:25:41 -0400 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] bug 6409: fix pagination of SQL report output when parameters are used Message-ID: <1306265141-15421-1-git-send-email-nengard@bywatersolutions.com> From: Galen Charlton Fixes bug where paging through output of an SQL report that includes one or more parameters fails by asking you for the parameter values and again and sending you back to the first page of results. Signed-off-by: Galen Charlton Signed-off-by: Nicole C. Engard --- reports/guided_reports.pl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 600ac29..582c0dc 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -21,6 +21,7 @@ use strict; #use warnings; FIXME - Bug 2505 use CGI; use Text::CSV; +use URI::Escape; use C4::Reports::Guided; use C4::Auth qw/:DEFAULT get_session/; use C4::Output; @@ -521,6 +522,9 @@ elsif ($phase eq 'Run this report'){ my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0); my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report&phase=Run%20this%20report"; + if (@sql_params) { + $url = join('&sql_params=', $url, map { URI::Escape::uri_escape($_) } @sql_params); + } $template->param( 'results' => \@rows, 'sql' => $sql, -- 1.7.2.3 From lrea at nekls.org Thu May 26 00:04:29 2011 From: lrea at nekls.org (Liz Rea) Date: Wed, 25 May 2011 17:04:29 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6362: fixes display to re-embed items in OPAC MARC view Message-ID: <1306361069-23404-1-git-send-email-lrea@nekls.org> From: ruth at bywatersolutions.com This patch is a followon to repair a side-effect of Bug 5579. A similar patch is already pushed to make this change for ISBD view. Signed-off-by: Liz Rea --- opac/opac-MARCdetail.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index 8e492aa..7544902 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -61,7 +61,7 @@ my $biblionumber = $query->param('biblionumber'); my $itemtype = &GetFrameworkCode($biblionumber); my $tagslib = &GetMarcStructure( 0, $itemtype ); my $biblio = GetBiblioData($biblionumber); -my $record = GetMarcBiblio($biblionumber); +my $record = GetMarcBiblio($biblionumber, 1); if ( ! $record ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); exit; -- 1.7.2.5 From srdjan at catalyst.net.nz Thu May 26 01:23:53 2011 From: srdjan at catalyst.net.nz (Srdjan Jankovic) Date: Thu, 26 May 2011 11:23:53 +1200 Subject: [Koha-patches] [PATCH] bug_6410: correct borrowernumber template var name In-Reply-To: References: Message-ID: <1306365833-30698-1-git-send-email-srdjan@catalyst.net.nz> Conflicts: koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tmpl --- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 620f770..f2b855c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -204,7 +204,7 @@ function Dopop(link) { [% FOREACH inputloo IN inputloop %] - + [% END %] -- 1.6.5 From lrea at nekls.org Thu May 26 03:25:42 2011 From: lrea at nekls.org (Liz Rea) Date: Wed, 25 May 2011 20:25:42 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5579: further fancifying remove_items_from_biblioitems.pl Message-ID: <1306373142-26998-1-git-send-email-lrea@nekls.org> From: ruth at bywatersolutions.com This patch adds a progress indicator to remove_items_from_biblioitems.pl, with the user option of silencing it with --silent. Signed-off-by: Liz Rea --- misc/maintenance/remove_items_from_biblioitems.pl | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/misc/maintenance/remove_items_from_biblioitems.pl b/misc/maintenance/remove_items_from_biblioitems.pl index 0778b29..9f30db0 100755 --- a/misc/maintenance/remove_items_from_biblioitems.pl +++ b/misc/maintenance/remove_items_from_biblioitems.pl @@ -20,15 +20,17 @@ use strict; use warnings; +$|=1; use C4::Context; use C4::Biblio; use Getopt::Long; -my ($wherestring, $run, $want_help); +my ($wherestring, $run, $silent, $want_help); my $result = GetOptions( 'where:s' => \$wherestring, '--run' => \$run, + '--silent' => \$silent, 'help|h' => \$want_help, ); @@ -38,11 +40,15 @@ if ( not $result or not $run or $want_help ) { } my $dbh = C4::Context->dbh; +my $count = 0; my $querysth = qq{SELECT biblionumber from biblioitems }; $querysth .= " WHERE $wherestring " if ($wherestring); my $query = $dbh->prepare($querysth); $query->execute; while (my $biblionumber = $query->fetchrow){ + $count++; + print "." unless $silent; + print "\r$count" unless ($silent or ($count % 100)); my $record = GetMarcBiblio($biblionumber); if ($record) { @@ -53,6 +59,8 @@ while (my $biblionumber = $query->fetchrow){ } } +print "\n\n$count records processed.\n" unless $silent; + sub print_usage { print <<_USAGE_; $0: removes items from selected biblios @@ -66,6 +74,7 @@ should be run using rebuild_zebra.pl -b -r. Parameters: -where use this to limit modifications to selected biblios --run perform the update + --silent run silently --help or -h show this message _USAGE_ } -- 1.7.2.5 From lrea at nekls.org Thu May 26 03:40:00 2011 From: lrea at nekls.org (Liz Rea) Date: Wed, 25 May 2011 20:40:00 -0500 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6397: fix variable name in template that mis-aligns table Message-ID: <1306374000-27327-1-git-send-email-lrea@nekls.org> From: ruth at bywatersolutions.com This patch repairs the detail table when enumeration and chronology is present. Signed-off-by: Liz Rea --- .../prog/en/modules/catalogue/detail.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index a019733..97cb22c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -355,7 +355,7 @@ function verify_images() { - [% IF ( itemloo.volinfo ) %] - + [% END %]
      [% header_ro.cell %]
      [% itemloo.datelastseen %] [% itemloo.barcode %] + [% IF ( itemloo.enumchron ) %] [% IF ( itemdata_enumchron ) %] [% IF ( itemloo.enumchron ) %] [% itemloo.enumchron %][% IF ( itemloo.serialseq ) %] -- [% END %] -- 1.7.2.5 From gmcharlt at gmail.com Fri May 27 01:23:34 2011 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 26 May 2011 19:23:34 -0400 Subject: [Koha-patches] [3.2.x] [PULL REQUEST] [SIGNED OFF] bugfix backports Message-ID: The following changes since commit 3e011a9fb0a0740d4732518cb1ab5b7a2d979e28: Updating Version Number to 3.02.09.000 (2011-05-15 15:58:24 -0400) are available in the git repository at: git://git.esilibrary.com/git/koha-equinox.git 3.2.x_bugfix_backports Jared Camins-Esakov (2): Bug 3072: Add Heading-Main and Any to MARC21 DOM Bug 6152: Document DOM authority index config Owen Leonard (1): Follow-up fix for Bug 5760 - Add the jquery table sorter to reading record .../authorities/authority-koha-indexdefs.xml | 48 ++++++- .../authorities/authority-zebra-indexdefs.xsl | 173 ++++++++++++++++++++ .../marc21/authorities/koha-indexdefs-to-zebra.xsl | 13 ++ .../intranet-tmpl/prog/en/css/staff-global.css | 2 +- .../prog/en/modules/members/readingrec.tmpl | 40 ++--- members/readingrec.pl | 16 +-- 6 files changed, 252 insertions(+), 40 deletions(-) -- Galen Charlton gmcharlt at gmail.com From Katrin.Fischer.83 at web.de Fri May 27 07:58:50 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Fri, 27 May 2011 07:58:50 +0200 Subject: [Koha-patches] [PATCH] Bug 6415: Can't make patron card batch Message-ID: <1306475930-1671-1-git-send-email-Katrin.Fischer.83@web.de> TT corrections from bug 6343 for label creator were also needed for patron card creator. - Manage Batch and New Batch were missing the branch info - Add link on patron search was missing batch id parameter To test: - Check branch is correctly shown on pages 'Manage Batch' and 'New Batch' - Check you can create a new batch and add names to it by using the 'Add' right to the patron's name --- .../prog/en/modules/patroncards/members-search.tt | 2 +- patroncards/edit-batch.pl | 2 +- patroncards/manage.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt index 55095d9..a67c080 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt @@ -118,7 +118,7 @@ function add_item(borrowernum,batch_id,type_id){ [% resultsloo.branchcode %] [% resultsloo.dateexpiry %] [% resultsloo.borrowernotes %]AddAdd
      diff --git a/patroncards/edit-batch.pl b/patroncards/edit-batch.pl index 449e82a..50bbbf4 100755 --- a/patroncards/edit-batch.pl +++ b/patroncards/edit-batch.pl @@ -60,7 +60,7 @@ my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number'); my $errstr = $cgi->param('error') || ''; -my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); +my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); if ($op eq 'remove') { $batch = C4::Patroncards::Batch->retrieve(batch_id => $batch_id); diff --git a/patroncards/manage.pl b/patroncards/manage.pl index 2a449ba..71e1b82 100755 --- a/patroncards/manage.pl +++ b/patroncards/manage.pl @@ -73,7 +73,7 @@ my $display_columns = { layout => [ # db column => {col label }; my $errstr = ($cgi->param('error') ? $cgi->param('error') : ''); -my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); +my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); if ($op eq 'delete') { my $err = 0; -- 1.7.4.1 From oleonard at myacpl.org Fri May 27 15:00:57 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 27 May 2011 09:00:57 -0400 Subject: [Koha-patches] [PATCH] [REVISED] Fix for Bug 5714 - Unescaped ampersands in OPAC facets Message-ID: <1306501257-23559-1-git-send-email-oleonard@myacpl.org> In the OPAC the "query_cgi" variable passed to the template outputs a string like this: idx=kw&q=thing The ampersand is unescaped. Adding an "|html" filter to the variable. Also correcting some TT markup which added a new validation error (an unopened
      ). --- .../opac-tmpl/prog/en/includes/opac-facets.inc | 7 ++++--- .../opac-tmpl/prog/en/modules/opac-results.tt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc index eac00aa..4931283 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc @@ -2,8 +2,9 @@ [% IF ( facets_loop ) %]

      Refine your search

      +[% query_cgi %]
        -
      • Availability +
      • Availability [% IF ( related ) %]
      • (related searches: [% FOREACH relate IN related %][% relate.related_search %][% END %])
      • [% END %] @@ -18,8 +19,8 @@ [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %] [% END %]
          - [% FOREACH facet IN facets_loo.facets %]
        • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
        • [% END %][% IF ( facets_loo.expandable ) %] -
        • Show More
        • + [% FOREACH facet IN facets_loo.facets %]
        • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
        • [% END %][% IF ( facets_loo.expandable ) %] +
        • Show More
        • [% END %]
        [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index e08e31b..f371db1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -499,7 +499,7 @@ $(document).ready(function(){ [% ELSIF ( loop.first ) %]Log in to add tags. [% END %] [% END %] - [% IF ( SEARCH_RESULT.TagLoop ) %] + [% IF ( SEARCH_RESULT.TagLoop.size ) %]
      [% END %] [% END %] [% END %][% END %] -- 1.7.3 From oleonard at myacpl.org Fri May 27 16:01:34 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 27 May 2011 10:01:34 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Displaying the unavailability of items corrected Message-ID: <1306504894-25511-1-git-send-email-oleonard@myacpl.org> From: Janusz Kaczmarek http://bugs.koha-community.org/show_bug.cgi?id=6357 Signed-off-by: Owen Leonard --- .../opac-tmpl/prog/en/modules/opac-results.tt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index e08e31b..7666c74 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -437,7 +437,7 @@ $(document).ready(function(){ Availability: - [% IF ( SEARCH_RESULT.available_items_loop ) %] + [% IF ( SEARCH_RESULT.available_items_loop.0 ) %] Copies available: [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %] [% UNLESS ( available_items_loo.hideatopac ) %] -- 1.7.3 From oleonard at myacpl.org Fri May 27 16:43:04 2011 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 27 May 2011 10:43:04 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 6417 - Template variable errors in Guided Reports Message-ID: <1306507384-25916-1-git-send-email-oleonard@myacpl.org> Looks like the T:T conversion script missed these instances of TMPL markup because they had line breaks: --- .../en/modules/reports/guided_reports_start.tt | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 589bcdf..04cfb43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -392,8 +392,7 @@ canned reports and writing custom SQL reports.

      [% IF ( definitions ) %]
      Dictionary Definitions [% FOREACH definition IN definitions %] - + [% END %]
      " /> [% definition.name %]
      [% definition.name %]
      [% END %] @@ -415,10 +414,7 @@ TMPL_VAR NAME="id" -->" /> [% definition.name %]
      [% FOREACH total_b IN total_by %] - +
      " value="" />
      [% FOREACH order_b IN order_by %] - - + - + [% END %]
      " name="order_by" value="" /> +
      [% resultsloo.branchcode %] [% resultsloo.dateexpiry %] [% IF ( resultsloo.overdues ) %][% resultsloo.overdues %][% ELSE %][% resultsloo.overdues %][% END %]/[% resultsloo.issues %][% resultsloo.fines %][% IF ( resultsloo.fines < 0 ) %][% resultsloo.fines %] [% ELSIF resultsloo.fines > 0 %] [% resultsloo.fines %] [% ELSE %] [% resultsloo.fines %] [% END %] [% resultsloo.borrowernotes %] [% IF ( resultsloo.category_type ) %] Edit -- 1.7.2.3 From magnus at enger.priv.no Fri May 27 23:58:24 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Fri, 27 May 2011 23:58:24 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6415: Can't make patron card batch Message-ID: <1306533504-23485-1-git-send-email-magnus@enger.priv.no> From: Katrin Fischer TT corrections from bug 6343 for label creator were also needed for patron card creator. - Manage Batch and New Batch were missing the branch info - Add link on patron search was missing batch id parameter To test: - Check branch is correctly shown on pages 'Manage Batch' and 'New Batch' - Check you can create a new batch and add names to it by using the 'Add' right to the patron's name Signed-off-by: Magnus Enger --- .../prog/en/modules/patroncards/members-search.tt | 2 +- patroncards/edit-batch.pl | 2 +- patroncards/manage.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt index 55095d9..a67c080 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/members-search.tt @@ -118,7 +118,7 @@ function add_item(borrowernum,batch_id,type_id){ [% resultsloo.branchcode %] [% resultsloo.dateexpiry %] [% resultsloo.borrowernotes %]AddAdd
      diff --git a/patroncards/edit-batch.pl b/patroncards/edit-batch.pl index 449e82a..50bbbf4 100755 --- a/patroncards/edit-batch.pl +++ b/patroncards/edit-batch.pl @@ -60,7 +60,7 @@ my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number'); my $errstr = $cgi->param('error') || ''; -my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); +my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); if ($op eq 'remove') { $batch = C4::Patroncards::Batch->retrieve(batch_id => $batch_id); diff --git a/patroncards/manage.pl b/patroncards/manage.pl index 2a449ba..71e1b82 100755 --- a/patroncards/manage.pl +++ b/patroncards/manage.pl @@ -73,7 +73,7 @@ my $display_columns = { layout => [ # db column => {col label }; my $errstr = ($cgi->param('error') ? $cgi->param('error') : ''); -my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); +my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); if ($op eq 'delete') { my $err = 0; -- 1.7.4.1 From nengard at bywatersolutions.com Wed May 25 18:52:23 2011 From: nengard at bywatersolutions.com (Nicole C. Engard) Date: Wed, 25 May 2011 12:52:23 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF} Fix for Bug 6417 - Template variable errors in Guided Reports Message-ID: <1306342343-19514-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Looks like the T:T conversion script missed these instances of TMPL markup because they had line breaks: Signed-off-by: Nicole C. Engard --- .../en/modules/reports/guided_reports_start.tt | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 589bcdf..04cfb43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -392,8 +392,7 @@ canned reports and writing custom SQL reports.

      [% IF ( definitions ) %]
      Dictionary Definitions [% FOREACH definition IN definitions %] - + [% END %]
      " /> [% definition.name %]
      [% definition.name %]
      [% END %] @@ -415,10 +414,7 @@ TMPL_VAR NAME="id" -->" /> [% definition.name %]
      [% FOREACH total_b IN total_by %] - +
      " value="" />
      [% FOREACH order_b IN order_by %] - - [% IF ( loo.EnhancedMessagingPreferences ) %] + [% IF ( EnhancedMessagingPreferences ) %] [% END %] - [% UNLESS ( bibitemloo.singleBranchMode ) %] + [% UNLESS ( singleBranchMode ) %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index e08e31b..410a269 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -441,14 +441,14 @@ $(document).ready(function(){ Copies available: [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %] [% UNLESS ( available_items_loo.hideatopac ) %] - [% IF ( available_items_loo.singleBranchMode ) %] + [% IF ( singleBranchMode ) %] [% available_items_loo.location %] [% ELSE %] [% available_items_loo.branchname %] [% END %] [% IF ( OPACItemsResultsDisplay ) %] - [% UNLESS ( available_items_loo.singleBranchMode ) %][% available_items_loo.location %][% END %] + [% UNLESS ( singleBranchMode ) %][% available_items_loo.location %][% END %] [% IF ( available_items_loo.itemcallnumber ) %][[% available_items_loo.itemcallnumber %]][% END %] [% END %] ([% available_items_loo.count %]), -- 1.7.4.1 From fridolyn.somers at progilone.fr Mon May 30 09:57:36 2011 From: fridolyn.somers at progilone.fr (Fridolyn SOMERS) Date: Mon, 30 May 2011 09:57:36 +0200 Subject: [Koha-patches] [PATCH] BUG6389 Administration menu like Tools menu Message-ID: <1306742256-2707-1-git-send-email-fridolyn.somers@progilone.fr> --- .../intranet-tmpl/prog/en/includes/admin-menu.inc | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index e1dde68..e9537f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -1,3 +1,16 @@ + + -- 1.7.1 From M.de.Rooy at rijksmuseum.nl Mon May 30 13:56:52 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 30 May 2011 11:56:52 +0000 Subject: [Koha-patches] [PATCH 1/3] 6429: Sync history/about Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312D0F27@S-MAIL-1B.rijksmuseum.intra> Some initial corrections in history/about to improve syncing. --- docs/history.txt | 14 +++++++------- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 1381ace..b2df084 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -44,7 +44,7 @@ November 8 2001 Steve Tonessen succeeds Chris Cormack as Release manager January 24 2002 First message to the main koha list from Stephen Hedges at NPL February 1 2002 First message to the main koha list from Paul Poulain February 22 2002 Paul Poulain sends an email saying he will work on Koha -March 6 2002 Paul becomes the 7th committer to Koha +March 6 2002 Paul Poulain becomes the 7th committer to Koha March 13 2002 Katipo's new developer Finlay Thompson becomes the 8th committer to Koha March 14 2002 First email from Joshua Ferraro March 20 2002 Roger Buck sets up the first Koha wiki @@ -98,14 +98,14 @@ September 22 2002 Koha and NPL written about in Computerworld NZ September 25 2002 Koha 1.3.0 released - Mulitple MARC flavours supported September 27 2002 Koha mentioned in Biblio-Tech review October 14 2000 Koha 1.3.1 released -October 16 2002 David Strainchamps 15th committer to Koha +October 16 2002 David Strainchamps becomes 15th committer to Koha October 16 2002 Koha 1.3.1 released October 23-25 2002 NPL (Joshua Ferraro, Stephen Hedges & Owen Leonard) plus Chris Cormack at Ohio Library conference, Columbus October 30-31 2002 Chris Cormack speaks at Think Linux Toledo, Chris, Joshua Ferraro and Stephen Hedges man a stand November 14 2002 Henri-Damien Laurent becomes 16th committer to Koha Novemer 21 2002 Kohausers page is started November ?? 2002 Chawner, Brenda. 2002. Koha: an open source success story. http://mustafa.emeraldinsight.com/vl=12220074/cl=48/nw=1/rpsv/librarylink/technology/nov02.htm -November 30 2002 Francisco M. Marzoa Alonso 17th committer to Koha +November 30 2002 Francisco M. Marzoa Alonso becomes 17th committer to Koha December 2 2002 Koha 1.3.2 released ?? Decemeber 6 2002 Koha mentioned in an article about opensource in American Libraries December 6 2002 First known install in france ND-Dombes Abbey @@ -134,7 +134,7 @@ May 3 2003 Dorian Meid translate the opac into German translation, german May 9 2003 Ingrid resigns as QA manager May 6 2003 software.coop (as TTLLP) publicly offer Koha support May 15 2003 Pat Eyler, Steve Tonnesen and Chris Cormack add RSS support to Koha -May 21 2003 M J Ray becomes the 22nd committer to Koha +May 21 2003 MJ Ray becomes the 22nd committer to Koha May 22 2003 Paul Poulain commits new bulkmarcimport tool to Koha May 22 2003 Koha 1.9.3 released May 26 2003 Koha wins Trophee Du Libre Award @@ -200,7 +200,7 @@ October 20 2004 Koha 2.1.3 released October 29 2004 Koha 2.0.2beta released October 29 2004 Gerry Arthus starts work on a Turkish translation translation, turkish November 17 2004 Koha 2.2.0rc1 released -November 17 2004 M J Ray releases Koha 2.0.2 +November 17 2004 MJ Ray releases Koha 2.0.2 November 20 2004 Koha 2.2.0rc2 released November 23 2004 Koha 2.2.0rc3 released December 9 2004 Koha 2.2.0rc4 released @@ -325,7 +325,7 @@ March 8 2007 Koha 2.2.8 released March 10 2007 Ryan Higgins (of Liblime) becomes the 44th committer to Koha March 12 2007 "Software development benefits from open source" http://computerworld.co.nz/news.nsf/devt/2B9B1FE8678CC680CC257299000A233F?Opendocument&HighLight=2,koha March 17 2007 Liblime accepted to google summer of code, call out to the mailing list for project ideas -March 28 2007 Passini becomes the 45th committer to Koha +March 28 2007 H. Passini becomes the 45th committer to Koha March 31 2007 Katipo sells Koha division to Liblime http://katipo.co.nz/about-us/news/nr1175402768.shtml April 1 2007 Russel Garlick, Chris Cormack and Mason James start at Liblime April 10 2007 Agnes Imecs begins work on a Hungarian translation of Koha translation, hungarian @@ -345,7 +345,7 @@ October 2 2007 "Pharmac publishes directly with open source" http://computerwor October 3 2007 Joe Atzberger becomes the 47th committer to Koha October 3 2007 Chris Catalfo becomes the 48th committer to Koha October 4 2007 Biblibre formed -October 10 2007 Frederic Demians becomes the 49th committer to Koha +October 10 2007 Fr?d?ric Demians becomes the 49th committer to Koha October 12 2007 Axel Bojer working on Norwegian translation translation, norwegian October 17 2007 Galen Charlton becomes the 50th committer to Koha October 18 2007 Chris Cormack wins Open Source contributor of the year at the NZ Open Source awards. Koha was a finalist for project of the year http://lists.katipo.co.nz/public/koha/2007-October/012579.html diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 8a9bb49..5ca2e68 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -146,7 +146,7 @@
    • Andrew Elwell
    • Magnus Enger
    • Esiee School (J?rome Vizcaino, Michel Lerenard, Pierre Cauchois)
    • -
    • Pate Eyler (Kaitiaki from 2002 to 2004)
    • +
    • Pat Eyler (Kaitiaki from 2002 to 2004)
    • Antoine Farnault
    • Katrin Fischer
    • Clay Fouts
    • -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 30 13:57:06 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 30 May 2011 11:57:06 +0000 Subject: [Koha-patches] [PATCH 2/3] 6429: Sync history/about Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312D0F31@S-MAIL-1B.rijksmuseum.intra> Adding new developers (including myself :-) Adding Rijksmuseum. --- docs/history.txt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 25 +++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index b2df084..f33f90c 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -296,7 +296,7 @@ April 3 2006 Developer meeting on IRC April 11 2006 T?mer Garip becomes the 40th committer to Koha (major influence in the addition of zebra to Koha and other) April 14 2006 Pierrick Le Gall begins as translation manager May 2,3 2006 Kohacon in Paris http://www.koha.org/community/conferences/ -May 12 2006 Bruno Tuomi (from San Ouest Provence) becomes the 41st committer to Koha +May 12 2006 Bruno Toumi (from San Ouest Provence) becomes the 41st committer to Koha May 12-18 2006 Developers week at Bibliotheque du Centre de Mathematiques et Informatique (CMI) at the Universite de Provence, in Marseille May 19 2006 Arnaud Laurin (also from SAN-OP) becomes the 42nd committer to Koha May 31 2006 First email from Mike Hafen to the devel list diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 5ca2e68..a8bb418 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -114,9 +114,12 @@

      Koha Development Team

      • Md. Aftabuddin
      • +
      • Edward Allen
      • Francisco M. Marzoa Alonso
      • Cindy Murdock Ames
      • +
      • Richard Anderson
      • Nahuel Angelinetti
      • +
      • Tom?s Cohen Arazi
      • Andrew Arensburger (the small and great C4::Context module)
      • Alex Arnaud
      • Joe Atzberger
      • @@ -135,37 +138,47 @@
      • DeAndre Carroll
      • Chris Catalfo (new plugin MARC editor)
      • Marc Chantreux
      • +
      • Andrew Chilton
      • Garry Collum
      • +
      • Christophe Croullebois
      • +
      • Nate Curulla
      • Vincent Danjean
      • Kip DeGraaf
      • Fr?d?ric Demians
      • +
      • Serhij Dubyk
      • Thomas Dukleth (MARC Frameworks Maintenance)
      • Sebastiaan Durand
      • Ecole des Mines de Saint Etienne, Philippe Jaillon (OAI-PMH support)
      • Stephen Edwards
      • Andrew Elwell
      • +
      • Brian Engard
      • Magnus Enger
      • Esiee School (J?rome Vizcaino, Michel Lerenard, Pierre Cauchois)
      • +
      • Shaun Evans
      • Pat Eyler (Kaitiaki from 2002 to 2004)
      • Antoine Farnault
      • Katrin Fischer
      • Clay Fouts
      • Marco Gaiarin
      • +
      • Pierrick Le Gall
      • Brendan A. Gallagher
      • Tumer Garip
      • Russel Garlick
      • Daniel Kahn Gillmor
      • David Goldfein
      • +
      • Daniel Grobani
      • Amit Gupta
      • Michael Hafen
      • Mike Hansen
      • Brian Harrington
      • +
      • Friedrich zur Hellen
      • Michaes Herman
      • Wolfgang Heymans
      • Ryan Higgins
      • S?bastien Hinderer
      • Daniel Holth
      • Andrew Hooper
      • +
      • Matthew Hunt
      • Christopher Hyde
      • Cory Jaeger
      • Srdjan Jankovic
      • @@ -183,16 +196,25 @@
      • Brig C. McCoy
      • Dorian Meid (German translation)
      • Matthias Meusburger
      • +
      • Alan Millar
      • Andrew Moore
      • Sharon Moreland
      • Nicolas Morin
      • Mike Mylonas
      • Chris Nighswonger
      • +
      • Eric Olsen
      • +
      • H. Passini
      • +
      • Dobrica Pavlinusic
      • Polytechnic University
      • MJ Ray
      • Liz Rea
      • Allen Reinmeyer
      • +
      • Serge Renaux
      • +
      • Waylon Robertson
      • +
      • Marcel de Rooy
      • +
      • Brice Sanchez
      • Robin Sheat
      • +
      • Zach Sim
      • Savitra Sirohi
      • Pawel Skuza (Polish for 1.2)
      • Southeastern University
      • @@ -219,7 +241,7 @@
      • James Winter
      • Lars Wirzenius
      -

      Contributing Companies

      +

      Contributing Companies and Institutions

      • BibLibre, France
      • Bibliotheksservice-Zentrum Baden-W?rttemberg (BSZ), Germany
      • @@ -232,6 +254,7 @@
      • Nelsonville Public Library, Ohio, USA
      • PTFS, Maryland, USA
      • PTFS Europe Ltd, United Kingdom
      • +
      • Rijksmuseum, Amsterdam, The Netherlands
      • SAN-Ouest Provence, France
      • Software Coop, United Kingdom
      • Tamil, France
      • -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 30 13:57:29 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 30 May 2011 11:57:29 +0000 Subject: [Koha-patches] [PATCH 3/3] 6429: Sync history/about Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312D0F3B@S-MAIL-1B.rijksmuseum.intra> Helpful script for syncing about with history. --- docs/comp_about.pl | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 119 insertions(+), 0 deletions(-) create mode 100755 docs/comp_about.pl diff --git a/docs/comp_about.pl b/docs/comp_about.pl new file mode 100755 index 0000000..50afbb8 --- /dev/null +++ b/docs/comp_about.pl @@ -0,0 +1,119 @@ +#!/usr/bin/perl + +# Copyright 2011 Rijksmuseum +# +# 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. + +# This script prints the names of all new developers in history.txt, not found +# in about template (English version). + +use strict; +use warnings; + +use utf8; +use open OUT=>':utf8', ":std"; +use Encode; + +use constant HISTORY => '../docs/history.txt'; +use constant ABOUT_T => '../koha-tmpl/intranet-tmpl/prog/en/modules/about.tt'; + +my ($fh_about, $fh_history, $about_cont, $about_cont2, $lastnum); + +#------------------------------------------------------------------------------- + +init_vars(); +show_new_committers(); +exit_stuff(); + +#------------------------------------------------------------------------------- + +sub init_vars { + open $fh_about, '<:encoding(UTF-8)', ABOUT_T or die $!; + open $fh_history, '<:encoding(UTF-8)', HISTORY or die $!; + + my @a=<$fh_about>; + $about_cont= join '', @a; + if ($about_cont=~/id=\"team\"(.*)id=\"licenses\"/s ) { + $about_cont= $1; + } + else { + print "WARNING: Check about template for div ids\n"; + } + $about_cont2= $about_cont; + $about_cont2=~ tr/???????????????/aeiouaeiouaeiou/; #remove some diacritics +} + +sub show_new_committers { + my @lines= <$fh_history>; + + foreach(@lines) { + if(/becomes?.*(developer|committer)/) { + my $dev=extract_name($_); + check_developer($dev) if $dev; + } + } +} + +sub extract_name { + #get name from line + #format looks like date name becomes .. + my $line=shift; + if($line=~/^\w+\s+\d+\s+\d{4}\s+(.*)become\D+(\d+)/) { + my $found=$1; my $num=$2; + print "MISSING NUMBER: ".($lastnum+1)."\n" if $lastnum && $num>$lastnum+1 && $lastnum>5; #first five not all mentioned? + $lastnum=$num; + + #strip some garbage + $found=~s/\(.*\)//g; + $found=~s/narrowly beats Jane to//; + $found=~s/Katipo.s new developer//; + $found=~s/^\s+//; + $found=~s/\s+$//; + #print "$num $found\n"; + + return "$found"; + } + print 'NO MATCH:'.$line; +} + +sub check_developer { + my $dev= shift; + my $test; + + #skip some names + return if $dev=~/Polytechnic University|NCE|Koha production|Andy\?\?|doXulting|Gavin \?\?|Nicole Engard/; #tt lists Nicole C. Engard + + return if index(lc $about_cont,lc $dev) >=0; #lowercase + + #test removing some diacritics? + $test= $dev; + $test=~ tr/???????????????/aeiouaeiouaeiou/; + #return if index(lc $about_cont,lc $test) >=0; + return if index(lc $about_cont2, lc $test) >=0; + + #remove middle initials + #$test=$dev; + #$test=~s/(?<=\s)[A-Z]\.\s//; + #return if index(lc $about_cont,lc $test) >=0; + + print "MISSING DEV: $dev\n"; +} + +sub exit_stuff { + close $fh_about; + close $fh_history; +} + -- 1.6.0.6 From M.de.Rooy at rijksmuseum.nl Mon May 30 14:18:33 2011 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Mon, 30 May 2011 12:18:33 +0000 Subject: [Koha-patches] [PATCH 2/3] [REVISED] 6429: Sync history/about Message-ID: <809BE39CD64BFD4EB9036172EBCCFA312D0FB1@S-MAIL-1B.rijksmuseum.intra> Adding new developers (including myself :-) Adding Rijksmuseum. --- docs/history.txt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 41 +++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index b2df084..f33f90c 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -296,7 +296,7 @@ April 3 2006 Developer meeting on IRC April 11 2006 T?mer Garip becomes the 40th committer to Koha (major influence in the addition of zebra to Koha and other) April 14 2006 Pierrick Le Gall begins as translation manager May 2,3 2006 Kohacon in Paris http://www.koha.org/community/conferences/ -May 12 2006 Bruno Tuomi (from San Ouest Provence) becomes the 41st committer to Koha +May 12 2006 Bruno Toumi (from San Ouest Provence) becomes the 41st committer to Koha May 12-18 2006 Developers week at Bibliotheque du Centre de Mathematiques et Informatique (CMI) at the Universite de Provence, in Marseille May 19 2006 Arnaud Laurin (also from SAN-OP) becomes the 42nd committer to Koha May 31 2006 First email from Mike Hafen to the devel list diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 5ca2e68..93f2144 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -114,9 +114,12 @@

        Koha Development Team

        • Md. Aftabuddin
        • +
        • Edward Allen
        • Francisco M. Marzoa Alonso
        • Cindy Murdock Ames
        • +
        • Richard Anderson
        • Nahuel Angelinetti
        • +
        • Tom?s Cohen Arazi
        • Andrew Arensburger (the small and great C4::Context module)
        • Alex Arnaud
        • Joe Atzberger
        • @@ -132,40 +135,61 @@
        • Roger Buck
        • Jared Camins-Esakov
        • Colin Campbell
        • +
        • Fernando Canizo
        • +
        • Fr?d?rick Capovilla
        • DeAndre Carroll
        • Chris Catalfo (new plugin MARC editor)
        • Marc Chantreux
        • +
        • Jerome Charaoui
        • +
        • Andrew Chilton
        • Garry Collum
        • +
        • John Copeland
        • +
        • Christophe Croullebois
        • +
        • Nate Curulla
        • Vincent Danjean
        • +
        • Doug Dearden
        • Kip DeGraaf
        • Fr?d?ric Demians
        • +
        • Jonathan Druart
        • +
        • Serhij Dubyk
        • Thomas Dukleth (MARC Frameworks Maintenance)
        • +
        • Frederic Durand
        • Sebastiaan Durand
        • Ecole des Mines de Saint Etienne, Philippe Jaillon (OAI-PMH support)
        • Stephen Edwards
        • Andrew Elwell
        • +
        • Brian Engard
        • Magnus Enger
        • Esiee School (J?rome Vizcaino, Michel Lerenard, Pierre Cauchois)
        • +
        • Shaun Evans
        • Pat Eyler (Kaitiaki from 2002 to 2004)
        • Antoine Farnault
        • Katrin Fischer
        • Clay Fouts
        • +
        • Claudia Forsman
        • Marco Gaiarin
        • +
        • Pierrick Le Gall
        • Brendan A. Gallagher
        • Tumer Garip
        • Russel Garlick
        • +
        • Mark Gavillet
        • Daniel Kahn Gillmor
        • David Goldfein
        • +
        • Daniel Grobani
        • Amit Gupta
        • Michael Hafen
        • +
        • Christopher Hall
        • Mike Hansen
        • Brian Harrington
        • +
        • Friedrich zur Hellen
        • Michaes Herman
        • Wolfgang Heymans
        • Ryan Higgins
        • S?bastien Hinderer
        • +
        • Stephanie Hogan
        • Daniel Holth
        • Andrew Hooper
        • +
        • Matthew Hunt
        • Christopher Hyde
        • Cory Jaeger
        • Srdjan Jankovic
        • @@ -173,6 +197,7 @@
        • Mason James
        • Mike Johnson
        • Donovan Jones
        • +
        • Janusz Kaczmarek
        • Koustubha Kale
        • Arnaud Laurin
        • Ambrose Li (translation tool)
        • @@ -180,19 +205,31 @@
        • Robert Lyon (Corporate Serials)
        • Fr?re S?bastien Marie
        • Ricardo Dias Marques
        • +
        • Julian Maurice
        • Brig C. McCoy
        • Dorian Meid (German translation)
        • Matthias Meusburger
        • +
        • Sophie Meynieux
        • +
        • Alan Millar
        • Andrew Moore
        • Sharon Moreland
        • Nicolas Morin
        • Mike Mylonas
        • Chris Nighswonger
        • +
        • Eric Olsen
        • +
        • H. Passini
        • +
        • Dobrica Pavlinusic
        • Polytechnic University
        • MJ Ray
        • Liz Rea
        • Allen Reinmeyer
        • +
        • Serge Renaux
        • +
        • Waylon Robertson
        • +
        • Marcel de Rooy
        • +
        • Salvador Zaragoza Rubio
        • +
        • Brice Sanchez
        • Robin Sheat
        • +
        • Zach Sim
        • Savitra Sirohi
        • Pawel Skuza (Polish for 1.2)
        • Southeastern University
        • @@ -209,6 +246,7 @@
        • Andrei V. Toutoukine
        • Darrell Ulm
        • Universidad ORT Uruguay (Ernesto Silva, Andres Tarallo)
        • +
        • Reed Wade
        • Ian Walls
        • Jane Wagner
        • Jesse Weaver
        • @@ -219,7 +257,7 @@
        • James Winter
        • Lars Wirzenius
        -

        Contributing Companies

        +

        Contributing Companies and Institutions

        • BibLibre, France
        • Bibliotheksservice-Zentrum Baden-W?rttemberg (BSZ), Germany
        • @@ -232,6 +270,7 @@
        • Nelsonville Public Library, Ohio, USA
        • PTFS, Maryland, USA
        • PTFS Europe Ltd, United Kingdom
        • +
        • Rijksmuseum, Amsterdam, The Netherlands
        • SAN-Ouest Provence, France
        • Software Coop, United Kingdom
        • Tamil, France
        • -- 1.6.0.6 From conan at lugmen.org.ar Mon May 30 18:04:11 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Mon, 30 May 2011 13:04:11 -0300 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] BZ6328 follow-up 3 Message-ID: <1306771451-15406-1-git-send-email-conan@lugmen.org.ar> From: Paul Poulain Fixes comment 23 from Fernando L. Canizo : when the patron was debarred and debar removed he still could not check-out. The changes in the IsMemberBlocked (that were on biblibre/master) were lost somewhere The sub was still checking for old_issues instead of calling CheckBorrowerDebarred to get a debardate if applicable Note : this bug was appearing only is you had issuing rules defined for itemtype/categorycode/branch. Seemed to work if you had only default rules. That's probably why it hadn't been spotted before Signed-off-by: conan (aka Fernando L. Canizo) --- C4/Members.pm | 37 +++++-------------------------------- 1 files changed, 5 insertions(+), 32 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index ddbf021..8e57fb1 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -659,39 +659,12 @@ sub IsMemberBlocked { my $borrowernumber = shift; my $dbh = C4::Context->dbh; - # does patron have current fine days? - my $strsth=qq{ - SELECT - ADDDATE(returndate, finedays * DATEDIFF(returndate,date_due) ) AS blockingdate, - DATEDIFF(ADDDATE(returndate, finedays * DATEDIFF(returndate,date_due)),NOW()) AS blockedcount - FROM old_issues - }; - if(C4::Context->preference("item-level_itypes")){ - $strsth.= - qq{ LEFT JOIN items ON (items.itemnumber=old_issues.itemnumber) - LEFT JOIN issuingrules ON (issuingrules.itemtype=items.itype)} - }else{ - $strsth .= - qq{ LEFT JOIN items ON (items.itemnumber=old_issues.itemnumber) - LEFT JOIN biblioitems ON (biblioitems.biblioitemnumber=items.biblioitemnumber) - LEFT JOIN issuingrules ON (issuingrules.itemtype=biblioitems.itemtype) }; - } - $strsth.= - qq{ WHERE finedays IS NOT NULL - AND date_due < returndate - AND borrowernumber = ? - ORDER BY blockingdate DESC, blockedcount DESC - LIMIT 1}; - my $sth=$dbh->prepare($strsth); - $sth->execute($borrowernumber); - my $row = $sth->fetchrow_hashref; - my $blockeddate = $row->{'blockeddate'}; - my $blockedcount = $row->{'blockedcount'}; + my $blockeddate = CheckBorrowerDebarred($borrowernumber); - return (1, $blockedcount) if $blockedcount > 0; + return ( 1, $blockeddate ) if $blockeddate; # if he have late issues - $sth = $dbh->prepare( + my $sth = $dbh->prepare( "SELECT COUNT(*) as latedocs FROM issues WHERE borrowernumber = ? @@ -700,9 +673,9 @@ sub IsMemberBlocked { $sth->execute($borrowernumber); my $latedocs = $sth->fetchrow_hashref->{'latedocs'}; - return (-1, $latedocs) if $latedocs > 0; + return ( -1, $latedocs ) if $latedocs > 0; - return (0, 0); + return ( 0, 0 ); } =head2 GetMemberIssuesAndFines -- 1.7.2.5 From conan at lugmen.org.ar Mon May 30 19:27:17 2011 From: conan at lugmen.org.ar (conan (aka Fernando L. Canizo)) Date: Mon, 30 May 2011 14:27:17 -0300 Subject: [Koha-patches] =?utf-8?q?Spam__=5BPATCH=5D_Bug_3674=3A_reimplemen?= =?utf-8?q?tation?= Message-ID: <1306776437-12612-1-git-send-email-conan@lugmen.org.ar> 05eb43f5fc00889420e03845b5059d80bf1663ad reverted a previous implementation of 3674. 3674 was encoding the password field when it was meant to be disabled (password='!'), and then, in Auth.pm we were trying to compare an encoded '!' with '!', which will never succeed. This gets sure we encode only provided passwords and also includes an auto generated login. Note: patch reworked to avoid including change already made in bug 6218 which is already pushed to master and was causing this patch to not apply. --- C4/Members.pm | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index e03b40b..267e2d9 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -800,8 +800,10 @@ Returns the borrowernumber sub AddMember { my (%data) = @_; my $dbh = C4::Context->dbh; - $data{'userid'} = '' unless $data{'password'}; - $data{'password'} = md5_base64( $data{'password'} ) if $data{'password'}; + # generate a proper login if none provided + $data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq ''; + # create a disabled account if no password provided + $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!'; $data{'borrowernumber'}=InsertInTable("borrowers",\%data); # mysql_insertid is probably bad. not necessarily accurate and mysql-specific at best. logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog"); -- 1.7.2.5 From Katrin.Fischer.83 at web.de Mon May 30 20:41:15 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Mon, 30 May 2011 20:41:15 +0200 Subject: [Koha-patches] =?utf-8?q?=5BPATCH=5D_Bug_5418=3A_Follow_up_fix_fo?= =?utf-8?q?r_translated_sys_pref_sql_files?= Message-ID: <1306780875-13784-1-git-send-email-Katrin.Fischer.83@web.de> Add 'libsuite8' as new option to system preference 'itemBarcodeInputFilter' en and nb-NO files are already correct. --- installer/data/mysql/de-DE/mandatory/sysprefs.sql | 4 ++-- .../1-Obligatoire/unimarc_standard_systemprefs.sql | 4 ++-- installer/data/mysql/it-IT/necessari/sysprefs.sql | 2 +- installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 4 ++-- ...m_preferences_full_optimal_for_install_only.sql | 6 +++--- ...m_preferences_full_optimal_for_install_only.sql | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index c7c885d..190ec6b 100755 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -157,7 +157,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo'); @@ -311,4 +311,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 185c74b..6c39b9b 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -157,7 +157,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'Si activ?, envoie un mail ? la biblioth?que lorsqu''une r?servation est pos?e',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Nombre d''exemplaires rendus ? afficher sur la page de retour',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choisissez un mode pour le calcul des amendes : Test ou Production.','test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','Si activ?, permet de d?finir le format des codes ? barre','whitespace|T-prefix|cuecat','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','Si activ?, permet de d?finir le format des codes ? barre','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Activer s''il n''y a qu''une seule biblioth?que sur ce catalogue, cela cache le s?lecteur de biblioth?que inutile',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Texte ? afficher dans l''ancre du logo de l''OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'Si activ?, toutes les suggestions sont affich?es ? l''OPAC',NULL,'YesNo'); @@ -312,4 +312,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index fca0cfb..8cee09c 100755 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -82,7 +82,7 @@ insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('IssueLog','0','','Se ON, logga le attivit? di prestito.','YesNo'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('IssuingInProcess','0','','Se ON, disattiva le multe se l?utente prendendo un prestito farebbe dei debiti con la biblioteca.','YesNo'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('item-level_itypes','1','','Se ON, abilita la gestione della circolazione a livello di copia, usado le tipologie di copia (Itemtype) e le regole di prestito (Issuing Rules)','YesNo'); -insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('itemBarcodeInputFilter','whitespace','whitespace|T-prefix|cuecat','Se configurata, permette di definire un filtro su quanto legge il lettore di barcode','Choice'); +insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('itemBarcodeInputFilter','whitespace','whitespace|T-prefix|cuecat|libsuite8','Se configurata, permette di definire un filtro su quanto legge il lettore di barcode','Choice'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('itemcallnumber','676a','','Il campo/sottocampo MARC usato per calcolare la stringa di collocazione (per la Dewey sarebbe 082ab o 092ab; LOC 050ab o 090ab) potrebbe essere 852hi da un record MARC21 Holding.','free'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('KohaAdminEmailAddress','koha at cilea.it','','Definisce l?indirizzo email dove vengono spedite le richieste di modifica utente. ','free'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('LabelMARCView','standard','standard|economical','Per definire la modalit? di visualizzazione di un record MARC','Choice'); diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index c39e231..757a026 100755 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -156,7 +156,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numReturnedItemsToShow','20','Number of returned items to show on the check-in page',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo'); @@ -310,4 +310,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index a7c6a10..3105e02 100755 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -184,7 +184,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('emailLibrarianWhenHoldIsPlaced',0,'If ON, emails the librarian whenever a hold is placed',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo'); @@ -342,7 +342,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetUserCSS','','Add CSS to be included in the intranet in an embedded
      " name="order_by" value="" /> +
      [% IF ( loo.overduenoticerequired ) %]Yes[% ELSE %]No[% END %] [% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %] [% loo.reservefee %] [% IF ( loo.messaging_prefs ) %] [% IF ( messaging_preference.Item_Due ) %]Item Due -- 1.7.2.3 From magnus at enger.priv.no Sat May 28 23:09:55 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Sat, 28 May 2011 23:09:55 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 3397 - Deleting item record leaves a hole in patron's reading history Message-ID: <1306616995-3183-1-git-send-email-magnus@enger.priv.no> From: Owen Leonard Excluding entries in old_issues which have a NULL itemnumber Signed-off-by: Magnus Enger --- C4/Members.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index e03b40b..3185686 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1115,7 +1115,7 @@ sub GetAllIssues { LEFT JOIN items on items.itemnumber=old_issues.itemnumber LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber - WHERE borrowernumber=? + WHERE borrowernumber=? AND old_issues.itemnumber IS NOT NULL order by $order"; if ( $limit != 0 ) { $query .= " limit $limit"; -- 1.7.4.1 From magnus at enger.priv.no Sun May 29 00:59:33 2011 From: magnus at enger.priv.no (Magnus Enger) Date: Sun, 29 May 2011 00:59:33 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5714 - Unescaped ampersands in OPAC facets Message-ID: <1306623573-5121-1-git-send-email-magnus@enger.priv.no> From: Owen Leonard In the OPAC the "query_cgi" variable passed to the template outputs a string like this: idx=kw&q=thing The ampersand is unescaped. Adding an "|html" filter to the variable. Also correcting some TT markup which added a new validation error (an unopened
      ). Signed-off-by: Magnus Enger --- .../opac-tmpl/prog/en/includes/opac-facets.inc | 7 ++++--- .../opac-tmpl/prog/en/modules/opac-results.tt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc index eac00aa..4931283 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc @@ -2,8 +2,9 @@ [% IF ( facets_loop ) %]

      Refine your search

      +[% query_cgi %]
        -
      • Availability +
      • Availability [% IF ( related ) %]
      • (related searches: [% FOREACH relate IN related %][% relate.related_search %][% END %])
      • [% END %] @@ -18,8 +19,8 @@ [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %] [% END %]
          - [% FOREACH facet IN facets_loo.facets %]
        • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
        • [% END %][% IF ( facets_loo.expandable ) %] -
        • Show More
        • + [% FOREACH facet IN facets_loo.facets %]
        • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
        • [% END %][% IF ( facets_loo.expandable ) %] +
        • Show More
        • [% END %]
        [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index e08e31b..f371db1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -499,7 +499,7 @@ $(document).ready(function(){ [% ELSIF ( loop.first ) %]Log in to add tags. [% END %] [% END %] - [% IF ( SEARCH_RESULT.TagLoop ) %] + [% IF ( SEARCH_RESULT.TagLoop.size ) %]
      [% END %] [% END %] [% END %][% END %] -- 1.7.4.1 From Katrin.Fischer.83 at web.de Sun May 29 23:04:34 2011 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sun, 29 May 2011 23:04:34 +0200 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 6353: Erroneous prefixes before the singleBranchMode preference removed Message-ID: <1306703074-15317-1-git-send-email-Katrin.Fischer.83@web.de> From: Janusz Kaczmarek Patch resent due to errors in formating in previous e-mail Signed-off-by: Katrin Fischer Checked: - library facet - library limit on advanced search - library shown in item level hold table --- .../opac-tmpl/prog/en/includes/opac-facets.inc | 2 +- .../opac-tmpl/prog/en/modules/opac-reserve.tt | 2 +- .../opac-tmpl/prog/en/modules/opac-results.tt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc index eac00aa..17eb7fc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc @@ -14,7 +14,7 @@ [% IF ( facets_loo.type_label_Topics ) %]Topics[% END %] [% IF ( facets_loo.type_label_Places ) %]Places[% END %] [% IF ( facets_loo.type_label_Series ) %]Series[% END %] -[% UNLESS ( facets_loo.singleBranchMode ) %] +[% UNLESS ( singleBranchMode ) %] [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %] [% END %]
        diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt index 4480338..25e9a3a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -452,7 +452,7 @@
      Item TypeBarcodeHome Library Last Location