From d4f69745814a70ae80e3c117a0e9f1bc0e18ec3d Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Sat, 3 Jul 2010 09:17:01 -0400 Subject: [PATCH 01/13] Bug 2725: Fixes uppercasesurnames preference. Signed-off-by: Galen Charlton --- members/memberentry.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/members/memberentry.pl b/members/memberentry.pl index 5cb4d723ad..c121460040 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -246,6 +246,11 @@ if ($op eq 'save' || $op eq 'insert'){ $template->param('ERROR_age_limitations' => "$low to $high"); } } + + if(C4::Context->preference('uppercasesurnames')) { + $newdata{'surname'} = uc($newdata{'surname'}); + } + if (C4::Context->preference("IndependantBranches")) { if ($userenv && $userenv->{flags} % 2 != 1){ $debug and print STDERR " $newdata{'branchcode'} : ".$userenv->{flags}.":".$userenv->{branch}; From 2e6f91dc71f249bbb4f703d424e0c0a20f711adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sat, 3 Jul 2010 16:32:44 +0200 Subject: [PATCH 02/13] Bug 4188 Valid PDF file name when printing basket group with no name Signed-off-by: Galen Charlton --- acqui/basketgroup.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index a3b7dc940c..69de0990dc 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -238,7 +238,10 @@ sub printbasketgrouppdf{ } $orders{$basket->{basketno}}=\@ba_orders; } - print $input->header( -type => 'application/pdf', -attachment => $basketgroup->{name}.'.pdf' ); + print $input->header( + -type => 'application/pdf', + -attachment => ( $basketgroup->{name} || $basketgroupid ) . '.pdf' + ); my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} || C4::Context->preference("gist")) || die "pdf generation failed"; print $pdf; exit; From de4eeac2af2a65f0013850e6051830a739d45783 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 6 Jul 2010 20:58:03 +1200 Subject: [PATCH 03/13] Bug 4139 - Adding some indexes to deal with a performance issue with overdue reports Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 6 ++++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ kohaversion.pl | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d8ed27de14..e42cecd475 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -104,7 +104,8 @@ CREATE TABLE `authorised_values` ( `imageurl` varchar(200) default NULL, PRIMARY KEY (`id`), KEY `name` (`category`), - KEY `lib` (`lib`) + KEY `lib` (`lib`), + KEY `auth_value_idx` (`authorised_value`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -279,7 +280,8 @@ CREATE TABLE `borrower_attribute_types` ( `password_allowed` tinyint(1) NOT NULL default 0, `staff_searchable` tinyint(1) NOT NULL default 0, `authorised_value_category` varchar(10) default NULL, - PRIMARY KEY (`code`) + PRIMARY KEY (`code`), + KEY `auth_val_cat_idx` (`authorised_value_category`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f32d43ca3d..4210328986 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3677,6 +3677,14 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){ SetVersion ($DBversion); } +$DBversion = 'XXXX'; +if (C4::Context->preference('Version') < TransformToNum($DBversion)){ + $dbh->do(qq{CREATE INDEX auth_value_idx ON authorised_values (authorised_value)}); + $dbh->do(qq{CREATE INDEX auth_val_cat_idx ON borrower_attribute_types (authorised_value_category)}); + print "Create index on authorised_values and borrower_attribute_types (bug 4139)"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index d2cf8dbdf8..04bf49386a 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -11,7 +11,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.142'; + our $VERSION = 'XXXX'; # version needs to be set this way # so that it can be picked up by Makefile.PL From efc9e3a331d3bf8dec536694cfca8c1dd58313f1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 6 Jul 2010 08:24:13 -0400 Subject: [PATCH 04/13] bug 4139: set DBrev to 143 Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 2 +- kohaversion.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4210328986..5db690a356 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3677,7 +3677,7 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){ SetVersion ($DBversion); } -$DBversion = 'XXXX'; +$DBversion = '3.01.00.143'; if (C4::Context->preference('Version') < TransformToNum($DBversion)){ $dbh->do(qq{CREATE INDEX auth_value_idx ON authorised_values (authorised_value)}); $dbh->do(qq{CREATE INDEX auth_val_cat_idx ON borrower_attribute_types (authorised_value_category)}); diff --git a/kohaversion.pl b/kohaversion.pl index 04bf49386a..37605ebffc 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -11,7 +11,7 @@ use strict; sub kohaversion { - our $VERSION = 'XXXX'; + our $VERSION = '3.01.00.143'; # version needs to be set this way # so that it can be picked up by Makefile.PL From 8dcfa1ec4cd78be7b6525ea4ac519e7adef942c6 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 7 Jul 2010 14:24:44 +1200 Subject: [PATCH 05/13] bug 4952 - make the koha-remove script stop zebra for the instance Signed-off-by: Galen Charlton --- debian/scripts/koha-remove | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove index de3fe1ccc6..97399cca35 100755 --- a/debian/scripts/koha-remove +++ b/debian/scripts/koha-remove @@ -30,6 +30,7 @@ DROP DATABASE koha_$name; FLUSH PRIVILEGES; eof + koha-stop-zebra $name rm "/etc/apache2/sites-available/$name" rm "/etc/koha/sites/$name/koha-conf.xml" rm "/etc/koha/sites/$name/zebra-biblios.cfg" From 618b092a5e9f37551ccac178f1735ddf6d05d1b8 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 7 Jul 2010 19:11:10 +1200 Subject: [PATCH 06/13] bug 4953 - make the debian package copy in YUI images Signed-off-by: Galen Charlton --- debian/rules | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/debian/rules b/debian/rules index 2a8aa0d1c0..25f111a6c8 100755 --- a/debian/rules +++ b/debian/rules @@ -55,6 +55,38 @@ override_dh_auto_install: install -m 0644 koha-tmpl/opac-tmpl/prog/en/lib/yui/skin.css \ koha-tmpl/opac-tmpl/prog/en/lib/yui/reset-fonts-grids.css \ $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow-disabled.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow-disabled.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-active.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-active.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-disabled.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-disabled.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-focus.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-focus.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-hover.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-hover.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/sprite.png \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/sprite.png \ + $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css sed -i -e 's:url(.*/reset-fonts-grids.css.*):url(reset-fonts-grids.css):' \ -e 's:url(.*/skin.css.*):url(skin.css):' \ $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \ From 17800939e8a3e6f34549ade0e5e068728e5cb907 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 7 Jul 2010 15:58:58 +0200 Subject: [PATCH 07/13] Update 3.0 to 3.2 budgets FOREIGN_KEY_CHECKS had to be set to 0 in order to make the upgrade of aqbudgets table work. Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5db690a356..68e7cbcf4f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2874,6 +2874,8 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = '3.01.00.077'; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + + $dbh->do("SET FOREIGN_KEY_CHECKS=0 "); $dbh->do("DROP TABLE IF EXISTS `aqbudgetperiods` "); $dbh->do(qq| CREATE TABLE `aqbudgetperiods` ( @@ -2890,7 +2892,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(< AQBUDGETS IMPORT JUST YET, # BUT A NEW CLEAN AQBUDGETS TABLE CREATE FOR NOW.. @@ -2906,18 +2908,19 @@ ADDPERIODS #$dbh->do("drop table aqbudget;"); - $dbh->do(<selectcol_arrayref(<selectcol_arrayref(<do(<do(<do(<do("DROP TABLE aqbookfund "); - - # $dbh->do("ALTER TABLE aqorders ADD FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON UPDATE CASCADE " ); ???? + $dbh->do("SET FOREIGN_KEY_CHECKS=1 "); print "Upgrade to $DBversion done (Adding new aqbudgetperiods, aqbudgets and aqbudget_planning tables )\n"; SetVersion ($DBversion); From 5f5d093c5b5742dc21ca96c0b58bcee3a074da7d Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 7 Jul 2010 15:58:59 +0200 Subject: [PATCH 08/13] (bug #4954) allow date expiry modification only on step 0 and 3 This add a verification, to allow automatic modification of expiry date, only if we are on a page that allow modification of expiry date. Signed-off-by: Galen Charlton --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index c121460040..6ec6d8e2ae 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -278,7 +278,7 @@ if ($op eq 'save' || $op eq 'insert'){ } } -if ($op eq 'modify' || $op eq 'insert' || $op eq 'save' ){ +if ( ($op eq 'modify' || $op eq 'insert' || $op eq 'save') and ($step == 0 or $step == 3 )){ if (exists ($newdata{'dateexpiry'}) && !($newdata{'dateexpiry'})){ my $arg2 = $newdata{'dateenrolled'} || C4::Dates->today('iso'); $newdata{'dateexpiry'} = GetExpiryDate($newdata{'categorycode'},$arg2); From 3807dd7b19de3f400a956c573d8f3369837ba7f4 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 5 Nov 2009 16:59:07 +0100 Subject: [PATCH 09/13] (bug #3772) show place hold button in isbd view This fix the isbd view to show the "place hold" button. Signed-off-by: Galen Charlton --- opac/opac-ISBDdetail.pl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index 9b5c031172..4883e89321 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -50,6 +50,7 @@ use C4::Output; use CGI; use MARC::Record; use C4::Biblio; +use C4::Items; use C4::Acquisition; use C4::Review; use C4::Serials; # uses getsubscriptionfrom biblionumber @@ -123,9 +124,19 @@ $template->param( subscriptionsnumber => $subscriptionsnumber, ); -# my @blocs = split /\@/,$ISBD; -# my @fields = $record->fields(); +my $norequests = 1; my $res = GetISBDView($biblionumber, "opac"); +my @items = &GetItemsInfo($biblionumber, 'opac'); + +my $itemtypes = GetItemTypes(); +for my $itm (@items) { + $norequests = 0 + if ( (not $itm->{'wthdrawn'} ) + && (not $itm->{'itemlost'} ) + && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} ) + && (not $itemtypes->{$itm->{'itype'}}->{notforloan} ) + && ($itm->{'itemnumber'} ) ); +} my $reviews = getreviews( $biblionumber, 1 ); foreach ( @$reviews ) { @@ -139,6 +150,9 @@ foreach ( @$reviews ) { $template->param( + RequestOnOpac => C4::Context->preference("RequestOnOpac"), + AllowOnShelfHolds => C4::Context->preference('AllowOnShelfHolds'), + norequests => $norequests, ISBD => $res, biblionumber => $biblionumber, reviews => $reviews, From ab1ca606e33ecd9d10833e2ee9143c31ed127f89 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 7 Jul 2010 15:59:01 +0200 Subject: [PATCH 10/13] UNIMARC coded field search : No results ccl.properties had to be adapted in order to be able to request the good index Signed-off-by: Galen Charlton --- etc/zebradb/ccl.properties | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 3dbf9be755..231c420d6e 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -775,6 +775,19 @@ Host-item 1=1033 # language and/or script. #Title-parallel 1=35 +#Video +video-mt 1=Video-mt +Video-mt video-mt +Graphics-type 1=Graphic-type +Graphics-support 1=Graphic-support +Type-Of-Serial 1=Type-Of-Serial +Frequency-code 1=Frequency-code +Regularity-code 1=Regularity-code +Material-type 1=Material-type +Literature-Code 1=Literature-Code +Biography-code 1=Biography-code +Illustration-code 1=Illustration-code + #Title-related- 1026 Serial titles related to this 247, 780, 785 #periodical item, either the immediate # predecessor or the immediate From 6e0c124c9c271df11b3dd06666b5556c94e26bef Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 7 Jul 2010 15:59:03 +0200 Subject: [PATCH 11/13] error 500 when record cannot be loaded On a basket or a basket download, or csv export, if Koha cannot get a biblio, then it failed with error 500. This patch fixes that behaviour skipping the faulty record in order to present the user with the biblios which are not causing trouble. Signed-off-by: Galen Charlton --- C4/Record.pm | 2 +- opac/opac-basket.pl | 1 + opac/opac-downloadcart.pl | 1 + opac/opac-downloadshelf.pl | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Record.pm b/C4/Record.pm index 3b073987fc..8e09adf2c3 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -362,7 +362,7 @@ sub marcrecord2csv { # Getting the record my $record = GetMarcBiblio($biblio); - + next unless $record; # Getting the framework my $frameworkcode = GetFrameworkCode($biblio); diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 9562d2f077..c453c87d22 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -62,6 +62,7 @@ foreach my $biblionumber ( @bibs ) { my $dat = &GetBiblioData($biblionumber); my $record = &GetMarcBiblio($biblionumber); + next unless $record; my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); diff --git a/opac/opac-downloadcart.pl b/opac/opac-downloadcart.pl index 53d1b77fc9..ff1b58f49c 100755 --- a/opac/opac-downloadcart.pl +++ b/opac/opac-downloadcart.pl @@ -66,6 +66,7 @@ if ($bib_list && $format) { foreach my $biblio (@bibs) { my $record = GetMarcBiblio($biblio); + next unless $record; switch ($format) { case "iso2709" { $output .= $record->as_usmarc(); } diff --git a/opac/opac-downloadshelf.pl b/opac/opac-downloadshelf.pl index 5a3fb1fa1e..d73a8e72bd 100755 --- a/opac/opac-downloadshelf.pl +++ b/opac/opac-downloadshelf.pl @@ -70,6 +70,7 @@ if ($shelfid && $format) { my $biblionumber = $biblio->{biblionumber}; my $record = GetMarcBiblio($biblionumber); + next unless $record; switch ($format) { case "iso2709" { $output .= $record->as_usmarc(); } From eb53c0d662ea7c4eefce905844903ad6ac50e741 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 7 Jul 2010 15:59:04 +0200 Subject: [PATCH 12/13] newordersuggestion would not filter by status All the suggestions would be displayed without any consideration of their status. Signed-off-by: Galen Charlton --- acqui/newordersuggestion.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl index ba966b6620..156dab8f0b 100755 --- a/acqui/newordersuggestion.pl +++ b/acqui/newordersuggestion.pl @@ -133,7 +133,7 @@ my $suggestions_loop = author => $author, title => $title, publishercode => $publishercode, - status => 'ACCEPTED'}); + STATUS => 'ACCEPTED'}); my $vendor = GetBookSellerFromId($supplierid); $template->param( suggestions_loop => $suggestions_loop, From 6127553c4494393beb3cec6bc534db0db079a5a9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 7 Jul 2010 12:27:47 -0400 Subject: [PATCH 13/13] Fix for Bug 4484, Rss tag is not escaped in search result Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index d5d87a2e22..3282600da2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -6,7 +6,7 @@ You did not specify any search criteria. - Search RSS Feed" href="/cgi-bin/koha/opac-search.pl?&sort_by=&format=rss2" /> + Search RSS Feed" href="/cgi-bin/koha/opac-search.pl?&sort_by=&format=rss2" />