From c8c80a8e787ff04cf167dbeae7602a484e22f977 Mon Sep 17 00:00:00 2001 From: Marc Veron Date: Wed, 10 Oct 2012 07:49:36 +0200 Subject: [PATCH 01/15] Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length... Clicking on Local use tab in system preferences results in warning in log file: systempreferences.pl: Use of uninitialized value in length at (...)/admin/systempreferences.pl line 456 Reason: content field "value" in table "systempreferences" can be NULL (and is tested for length). Added test for "defined" at to places. Signed-off-by: Kyle M Hall Signed-off-by: Chris Cormack --- admin/systempreferences.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 5e3848d623..835466a16c 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -428,6 +428,7 @@ sub StringSearch { my $sth = $dbh->prepare("Select variable,value,explanation,type,options from systempreferences where (variable like ?) order by variable"); $sth->execute($syspref); while ( my $data = $sth->fetchrow_hashref ) { + unless (defined $data->{value}) { $data->{value} = "";} $data->{shortvalue} = $data->{value}; $data->{shortvalue} = substr( $data->{value}, 0, 60 ) . "..." if defined( $data->{value} ) and length( $data->{value} ) > 60; push( @results, $data ); @@ -460,6 +461,7 @@ sub StringSearch { } while ( my $data = $sth->fetchrow_hashref ) { + unless (defined $data->{value}) { $data->{value} = "";} $data->{shortvalue} = $data->{value}; $data->{shortvalue} = substr( $data->{value}, 0, 60 ) . "..." if length( $data->{value} ) > 60; push( @results, $data ); From 69231a29cedd0b15f403afe71004b40df5ddaa12 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sat, 27 Apr 2013 09:27:12 +1200 Subject: [PATCH 02/15] Revert "Bug 9812 - Forbid access to several files through the browser" This reverts commit f5593842dc99211192955a4e70818de18b6204b5. Revert at author's request --- etc/koha-httpd.conf | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index 9233b53fff..dc82d08a39 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -20,16 +20,6 @@ SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__" SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__" - - Options -Indexes - - - # Secure internal stuff - - Order deny,allow - Deny from all - - mod_gzip_on yes mod_gzip_dechunk yes @@ -129,16 +119,6 @@ ErrorDocument 404 /cgi-bin/koha/errors/404.pl ErrorDocument 500 /cgi-bin/koha/errors/500.pl - - Options -Indexes - - - # Secure internal stuff - - Order deny,allow - Deny from all - - mod_gzip_on yes mod_gzip_dechunk yes From ed0faee2e3eb81c32612807ec935d99d06a93814 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 13 Apr 2013 21:31:14 -0300 Subject: [PATCH 03/15] Bug 10042 - Minor typo ("Communnity") in packages docs VERY trivial string patch. Couldn't help sending it. To+ Signed-off-by: Magnus Enger Thanks for fixing my typo! I did not test by building packages etc, but by grepping for "Communnity". The patch removes all occurences of the typo. Passed-QA-by: Marcel de Rooy Signed-off-by: Chris Cormack --- debian/docs/koha-common.xml | 2 +- debian/docs/koha-create-dirs.xml | 2 +- debian/docs/koha-create.xml | 2 +- debian/docs/koha-disable.xml | 2 +- debian/docs/koha-dump-defaults.xml | 2 +- debian/docs/koha-dump.xml | 2 +- debian/docs/koha-email-disable.xml | 2 +- debian/docs/koha-email-enable.xml | 2 +- debian/docs/koha-enable.xml | 2 +- debian/docs/koha-foreach.xml | 2 +- debian/docs/koha-list.xml | 2 +- debian/docs/koha-mysql.xml | 2 +- debian/docs/koha-rebuild-zebra.xml | 2 +- debian/docs/koha-remove.xml | 2 +- debian/docs/koha-reset-passwd.xml | 2 +- debian/docs/koha-restart-zebra.xml | 2 +- debian/docs/koha-restore.xml | 2 +- debian/docs/koha-run-backups.xml | 2 +- debian/docs/koha-start-zebra.xml | 2 +- debian/docs/koha-stop-zebra.xml | 2 +- debian/docs/koha-upgrade-schema.xml | 2 +- debian/docs/koha-upgrade-to-3.4.xml | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/debian/docs/koha-common.xml b/debian/docs/koha-common.xml index 4dc21799ce..39da872491 100644 --- a/debian/docs/koha-common.xml +++ b/debian/docs/koha-common.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-create-dirs.xml b/debian/docs/koha-create-dirs.xml index 9f9ddead63..a7383e5e3e 100644 --- a/debian/docs/koha-create-dirs.xml +++ b/debian/docs/koha-create-dirs.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-create.xml b/debian/docs/koha-create.xml index 26559c917a..d879a69beb 100644 --- a/debian/docs/koha-create.xml +++ b/debian/docs/koha-create.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-disable.xml b/debian/docs/koha-disable.xml index 8b7f729808..1bc9ca3372 100644 --- a/debian/docs/koha-disable.xml +++ b/debian/docs/koha-disable.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-dump-defaults.xml b/debian/docs/koha-dump-defaults.xml index 048c3e9277..b4623695ee 100644 --- a/debian/docs/koha-dump-defaults.xml +++ b/debian/docs/koha-dump-defaults.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-dump.xml b/debian/docs/koha-dump.xml index ec79f6e393..a749fb21d6 100644 --- a/debian/docs/koha-dump.xml +++ b/debian/docs/koha-dump.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-email-disable.xml b/debian/docs/koha-email-disable.xml index 83bf8ef396..81834f2f86 100644 --- a/debian/docs/koha-email-disable.xml +++ b/debian/docs/koha-email-disable.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-email-enable.xml b/debian/docs/koha-email-enable.xml index 5274f753f4..0f39010bff 100644 --- a/debian/docs/koha-email-enable.xml +++ b/debian/docs/koha-email-enable.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-enable.xml b/debian/docs/koha-enable.xml index a2f8cc3569..db45daa9af 100644 --- a/debian/docs/koha-enable.xml +++ b/debian/docs/koha-enable.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-foreach.xml b/debian/docs/koha-foreach.xml index 733ddd99a8..c8a612ccbc 100644 --- a/debian/docs/koha-foreach.xml +++ b/debian/docs/koha-foreach.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-list.xml b/debian/docs/koha-list.xml index 9d0acf9d58..c67096d0ad 100644 --- a/debian/docs/koha-list.xml +++ b/debian/docs/koha-list.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-mysql.xml b/debian/docs/koha-mysql.xml index b8079ced70..070deb6cb9 100644 --- a/debian/docs/koha-mysql.xml +++ b/debian/docs/koha-mysql.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-rebuild-zebra.xml b/debian/docs/koha-rebuild-zebra.xml index e5b319c507..b8ce51cac3 100644 --- a/debian/docs/koha-rebuild-zebra.xml +++ b/debian/docs/koha-rebuild-zebra.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-remove.xml b/debian/docs/koha-remove.xml index 4e272f8186..69079bef50 100644 --- a/debian/docs/koha-remove.xml +++ b/debian/docs/koha-remove.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-reset-passwd.xml b/debian/docs/koha-reset-passwd.xml index 85e84436fd..5ded51d8ab 100644 --- a/debian/docs/koha-reset-passwd.xml +++ b/debian/docs/koha-reset-passwd.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-restart-zebra.xml b/debian/docs/koha-restart-zebra.xml index 649df1e6ac..4b78902247 100644 --- a/debian/docs/koha-restart-zebra.xml +++ b/debian/docs/koha-restart-zebra.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-restore.xml b/debian/docs/koha-restore.xml index 6acb0e825b..5409d83857 100644 --- a/debian/docs/koha-restore.xml +++ b/debian/docs/koha-restore.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-run-backups.xml b/debian/docs/koha-run-backups.xml index 153881713a..653a611a4f 100644 --- a/debian/docs/koha-run-backups.xml +++ b/debian/docs/koha-run-backups.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-start-zebra.xml b/debian/docs/koha-start-zebra.xml index eb3c2abf34..2d52000f9b 100644 --- a/debian/docs/koha-start-zebra.xml +++ b/debian/docs/koha-start-zebra.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-stop-zebra.xml b/debian/docs/koha-stop-zebra.xml index 050ddd7cb0..ea35f893ef 100644 --- a/debian/docs/koha-stop-zebra.xml +++ b/debian/docs/koha-stop-zebra.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-upgrade-schema.xml b/debian/docs/koha-upgrade-schema.xml index 8b5a4c4b60..a0391d0b60 100644 --- a/debian/docs/koha-upgrade-schema.xml +++ b/debian/docs/koha-upgrade-schema.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ diff --git a/debian/docs/koha-upgrade-to-3.4.xml b/debian/docs/koha-upgrade-to-3.4.xml index c528377169..d3d6ae2f41 100644 --- a/debian/docs/koha-upgrade-to-3.4.xml +++ b/debian/docs/koha-upgrade-to-3.4.xml @@ -3,7 +3,7 @@ Koha is the first free software library automation package. - The Koha Communnity + The Koha Community http://koha-community.org/ From 63ff9d849db148f35393fee80997da5864141cd6 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Thu, 14 Feb 2013 14:23:30 +0100 Subject: [PATCH 04/15] Bug 9613: items namespace missing in XSLT In some XSLT, "items" namespace is used in exclude-result-prefixes but is not defined. This patch add this namespace where missing. Also corrects a koha.org, instead of koha-community.org, in one namespace URL. Test plan : - Enable XSLT on search results - Perform a search => Look at error logs to check that there is no xsl error like : [Fri Feb 08 15:35:06 2013] [error] [client 127.0.0.1] [Fri Feb 8 15:35:06 2013] opac-search.pl: compilation error: file koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl line 8 element stylesheet, referer: http://opac.master.community.localhost/cgi-bin/koha/opac-detail.pl?biblionumber=299 [Fri Feb 08 15:35:06 2013] [error] [client 127.0.0.1] [Fri Feb 8 15:35:06 2013] opac-search.pl: xsl:exclude-result-prefixes : undefined namespace items, referer: http://opac.master.community.localhost/cgi-bin/koha/opac-detail.pl?biblionumber=299 Signed-off-by: Kyle M Hall Signed-off-by: Mathieu Saby Passed-QA-by: Marcel de Rooy With comment on Bugzilla. Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack --- .../intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl | 2 +- koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 1 + koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl index 963fd722c1..62b6b7f260 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl @@ -2,7 +2,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index faad011fbf..7a92d2d796 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -4,6 +4,7 @@ diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl index 09bd9e09a4..91d9b3db2e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslimUtils.xsl @@ -4,6 +4,7 @@ From b7cdee156e47617ff79849321b178f66ec7058e6 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Mon, 15 Apr 2013 20:24:08 +0200 Subject: [PATCH 05/15] Bug 9804 - Fix name for NORMARC biblio-koha-indexdefs.xml When i did bug 8805, I gave the biblio-koha-indexdefs.xml file the wrong name, and called it biblio-zebra-indexdefs.xml. This patch fixes that. To reproduce: - Check that etc/zebradb/marc_defs/normarc/biblios/biblio-zebra- indexdefs.xml exists To test: - Apply the patch and check that etc/zebradb/marc_defs/normarc/ biblios/biblio-zebra-indexdefs.xml no longer exists, but that etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml does exist. Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- .../{biblio-zebra-indexdefs.xml => biblio-koha-indexdefs.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename etc/zebradb/marc_defs/normarc/biblios/{biblio-zebra-indexdefs.xml => biblio-koha-indexdefs.xml} (100%) diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xml b/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml similarity index 100% rename from etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xml rename to etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml From 5ad048bb78b560ca821f4531e62c545d76999855 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 24 Apr 2013 11:40:18 -0300 Subject: [PATCH 06/15] Bug 10107 - opacbookbag shouldn't prevent from adding items to a list in the OPAC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug is present in master and (at least 3.8.x, where we spotted it). The patch makes adding items, to a list from the results page, not rely only on opacbookbag syspref but also 'virtualshelves'. Regards To+ PS: Thanks Graciela Galli for reporting. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Template only patch, works nicely. Test plan copied from bug report: - Disable the opacbookbag syspref - Login in the OPAC - Create a list (I tested a private one) - Search in your db for some biblios. - Choose some and add them to the created list - Go to your users's page, to the my lists tab - Your list is empty. Signed-off-by: Chris Cormack --- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bb8719d234..101a0272a0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -141,7 +141,7 @@ $(document).ready(function(){ $("span.clearall").html(""+_("Clear all")+"<\/a>"); $("span.checkall").html(""+_("Select all")+"<\/a>"); [% IF ( opacbookbag ) %]$("span.addto").html(param1);[% ELSE %][% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]$("span.addto").html(param1);[% END %][% END %][% END %] -[% IF ( opacbookbag ) %] +[% IF ( opacbookbag || virtualshelves ) %] [% IF ( virtualshelves ) %] $("#addto").change(function(){ cartList(); From 2d79c840351885f670432b6453d1734ac21fcd6c Mon Sep 17 00:00:00 2001 From: Stefano Bargioni Date: Fri, 26 Apr 2013 11:18:52 +0200 Subject: [PATCH 07/15] Bug 10093 - Typo in marc21_leader.tt fixed a typo in marc 21 leader builder about the value 'b', Serial component part Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Good catch. Template change only. Signed-off-by: Chris Cormack --- .../prog/en/modules/cataloguing/value_builder/marc21_leader.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt index c54478d470..62347f8351 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader.tt @@ -133,7 +133,7 @@ [% IF ( f7b ) %] [% ELSE %] - + [% END %] [% IF ( f7c ) %] From 2247bf6907ee6fb90e614c83e2932d018925a9a9 Mon Sep 17 00:00:00 2001 From: Edmund Balnaves Date: Mon, 15 Apr 2013 11:08:06 +1000 Subject: [PATCH 08/15] Bug 8264 - local cover images not working in IE8 [ prog ] [Patch submitted by David Cook] Edmund, rather than myself, was the author of this patch, so I'm not entirely sure about his code choices, but...it looks like IE must process images differently than other browsers. It seems to me that the images are not appearing in IE, because they're being regarded as incomplete or having 0/NULL natural width. This patch simply introduces a try/catch hack where it tries to add the image and remove any "no-image" elements even nwhen the image is considered incomplete/width of 0/NULL. It won't do this if it catches any errors, although I'm not sure that any errors would be caught with this set up anyway... It's certainly not the ideal solution, but it's a solution. To Test: Before applying the patch: 1) Use IE and FF/Chrome/other browser to view a record with local images attached 2) Note that the local images appear in FF/Chrome/other, but not in IE Apply patch. After applying the patch: 1) Repeat step 1 from above 2) Note that the local images now appear in all browsers as they should. -- As I mentioned before, this seems like a real suboptimal solution. Any ideas on why IE might be considering local images to be incomplete or having 0/NULL natural width? Signed-off-by: David Cook Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer I did a regression test using Chromium and Firefox in Ubuntu. I checked both prog and CCSR - covers displayed nicely. All tests and QA script pass. Signed-off-by: Jared Camins-Esakov Changed author of patch to reflect actual authorship. Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js | 7 +++++++ koha-tmpl/opac-tmpl/prog/en/js/localcovers.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js b/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js index 981af75e76..f044f62247 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js @@ -28,6 +28,13 @@ KOHA.LocalCover = { '/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) .load(function () { if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { + //IE HACK + try { + $(mydiv).append(img); + $(mydiv).children('.no-image').remove(); + } + catch(err){ + } } else { if (uselink) { var a = $("").attr('href', '/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=' + $(mydiv).attr("class")); diff --git a/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js b/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js index f2808ef6f9..6d247983bf 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js @@ -28,6 +28,13 @@ KOHA.LocalCover = { '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) .load(function () { if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { + //IE HACK + try { + $(mydiv).append(img); + $(mydiv).children('.no-image').remove(); + } + catch(err){ + }; } else { if (uselink) { var a = $("").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class")); From d1a845261c43188e5d8923b7635c3422f06b0fd8 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 10 Apr 2013 12:37:54 +0200 Subject: [PATCH 09/15] Bug 10022 - Multiple tags moderation doesn't work on translated page When using a translated intranet, tags moderation using checkboxes and a submit button doesn't work. You get a message "Unknown Operation on x Term(s)" (translated of course). This patch corrects by using name="op-[operation]" instead of name="op" in each submit input. Test plan : - Create a new tag on a record - Go to tags moderation in Tools => You should see your tag in pending terms - Click on checkbox - Click on Approve or Reject submit button at the bottom of the table => Without patch the tag is still pending => With patch operation is well performed, tag is not pending - Test "Check lists" form - Test Approve and Reject buttons from "Actions" column Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Passes all tests and QA script. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt | 6 +++--- tags/review.pl | 7 ++++++- 2 files changed, 9 insertions(+), 4 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 d53ee7e04e..f3322ef5e2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -249,8 +249,8 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% END %] [% IF ( tagloop ) %]
- - + +
[% END %] @@ -278,7 +278,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
Enter a word or phrase to check against approved/rejected lists:
-
+
[% IF ( test_term ) %] [% IF ( verdict_ok ) %] diff --git a/tags/review.pl b/tags/review.pl index 7517f4167e..01e29d8ea2 100755 --- a/tags/review.pl +++ b/tags/review.pl @@ -89,7 +89,12 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ }); my ($op, @errors, @tags); -$op = lc($input->param('op')) || 'none'; + +foreach (qw( approve reject test )) { + $op = $_ if ( $input->param("op-$_") ); +} +$op ||= 'none'; + @tags = $input->param('tags'); $borrowernumber == 0 and push @errors, {op_zero=>1}; From c529a16187b551e1fefb7bcee6cb7de4c1106d53 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 Apr 2013 14:20:49 -0400 Subject: [PATCH 10/15] Bug 9266 - Untranslated strings in tags moderation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are a couple of English strings in tags moderation JavaScript which are not properly enclosed in the _() function enabling translation. As a result, clicking a translated 'Approve' or 'Reject' button in the table of tags would change the button's neighbor's label to the English string. This patch corrects it. To test, apply the patch and regenerate a translation to test with. Go to Tools -> Tags and find a list of tags to moderate (pending, approved, or rejected). When you click on an 'Approve' or 'Reject' tag in the table of tags, the buttons in each Approve/Reject pair should retain their correct translated label. For instance, looking at approved tags in French: [ Approuvé ] [ Rejeter ] Clicking the "Rejetee" button should change the state to: [ Approuver ] [ Rejetée ] Clicking "Approuver" should return the buttons to the first state. Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 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 f3322ef5e2..182070fc74 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -106,7 +106,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } "data": {ok: $(event.target).attr("title"), CGISESSID: readCookie('CGISESSID')}, "success": count_approve // success_approve }); - $(event.target).next(".rej").removeAttr("disabled").attr("value","Reject").css("color","#000"); + $(event.target).next(".rej").removeAttr("disabled").attr("value",_("Reject")).css("color","#000"); $(event.target).attr( "value",_("Approved")).attr("disabled","disabled").css("color","#666"); return false; // cancel submit } @@ -115,7 +115,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } "data": {rej: $(event.target).attr("title"), CGISESSID: readCookie('CGISESSID')}, "success": count_reject // success_reject }); - $(event.target).prev(".ok").removeAttr("disabled").attr("value","Approve").css("color","#000"); + $(event.target).prev(".ok").removeAttr("disabled").attr("value",_("Approve")).css("color","#000"); $(event.target).attr( "value",_("Rejected")).attr("disabled","disabled").css("color","#666"); return false; // cancel submit } From 07c9a90aa3c15d6de522ca16158b1e932e3921b0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 30 Apr 2013 14:39:48 -0400 Subject: [PATCH 11/15] Bug 9957 - Missing cancel link on subfield editing page The subfield edit page has an edit bottom at the top of the page. Almost no other edit screens do this. It would be more consistent to put it at the bottom. Also missing is a "cancel" link. This patch fixes both issues. The patch also adds "Default" to the breadcrumbs when editing a subfield in the default framework. To test, apply the patch and edit a subfield: MARC frameworks -> MARC structure -> Subfields -> Edit. The "Save changes" button should appear at the bottom of the page alonside a "Cancel" link. Both should work correctly. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Template change only, improves consistency and works nicely. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- .../prog/en/modules/admin/marc_subfields_structure.tt | 8 +++++--- 1 file changed, 5 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 03fac60e86..7cdebd86d6 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 @@ -38,7 +38,7 @@ $(document).ready(function() { [% INCLUDE 'cat-search.inc' %] +
+ Cancel +
[% END %] From d2b017a0f6b7d1ec279a7f0eff77853a184c423e Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Fri, 12 Apr 2013 17:24:17 +0200 Subject: [PATCH 12/15] Bug 10033 - dangerous query in _koha_modify_item The SQL query build in C4::Items::_koha_modify_item performs an update on a row of items table identified by itemnumber. Actually the query is build using a hash of datas : for my $key ( keys %$item ) { $query.="$key=?,"; push @bind, $item->{$key}; } But this hash contains 'itemnumber' key, so you get an update including the primary key. It is actually harmless but may be dangerous. This patch simply skips itemnumber key in above loop. Test plan : Check you can create and modify items. Signed-off-by: Kyle M Hall Signed-off-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov (cherry picked from commit 598dfe27224f517fafa06df75521c623992ecbe0) Signed-off-by: Jared Camins-Esakov (cherry picked from commit ba8e383cf6835e204259063e6c18ac9c3892029b) Signed-off-by: Chris Cormack --- C4/Items.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Items.pm b/C4/Items.pm index 3483d69af9..e62dca961e 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2251,6 +2251,7 @@ sub _koha_modify_item { my $query = "UPDATE items SET "; my @bind; for my $key ( keys %$item ) { + next if ( $key eq 'itemnumber' ); $query.="$key=?,"; push @bind, $item->{$key}; } From 282c3b4fdb16e5e28193ac398c89c8d9c5353d5f Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 8 May 2013 18:00:29 +1000 Subject: [PATCH 13/15] Bug 10156 - Fix usr/bin/perl path for get_report_social_data.pl Currently, the perl path for get_report_social_data.pl is "#!/bin/perl" when it should be "#!/usr/bin/perl". While I'm not entirely sure how to test this, rangi did mention: 23:47 (it wouldnt work on my debian install) 23:48 zsh: no such file or directory: /bin/perl It's a pretty trivial change, so I'm not sure it needs much of a test plan. Signed-off-by: Magnus Enger Before the patch "grep -r '#!/bin/perl' in the misc dir shows one file with this line, and it is indeed get_report_social_data.pl. After the patch there are no occurrences left. Passed-QA-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov (cherry picked from commit 2e103a018cedc1c57d1c0db8acad6f93ab4ca428) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 36e06a151c718d7d905e4cb0b8d818c0b12f3b4d) Signed-off-by: Chris Cormack --- misc/cronjobs/social_data/get_report_social_data.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/social_data/get_report_social_data.pl b/misc/cronjobs/social_data/get_report_social_data.pl index 7069e24662..89d6b35061 100644 --- a/misc/cronjobs/social_data/get_report_social_data.pl +++ b/misc/cronjobs/social_data/get_report_social_data.pl @@ -1,4 +1,4 @@ -#!/bin/perl +#!/usr/bin/perl use Modern::Perl; use C4::SocialData; From 5b2815bc650176853ef7934e798cf7a1286ebb1b Mon Sep 17 00:00:00 2001 From: Christophe Croullebois Date: Thu, 18 Apr 2013 12:55:18 +0200 Subject: [PATCH 14/15] Bug 7228: can't add items in an order with Modify We have a message if we want to add items and we can't add, substract only. It's ok if we choose to create items on ordering, in this case koha can't add items, just substract and in this case we have to delete manually the items(s) in the catalog. But if via the syspref AcqCreateItem we choose to create items when receiving this limitation is not usefull The patch just checks if the syspref AcqCreateItem is on 'ordering' if not the message is not shown and we can add items Signed-off-by: Mathieu Saby Here is the test I made for signing off : after applying the patch - syspref AcqCreateItem : create items on RECEIVING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on CATALOGING - in a basket, create an order (quantity = 1) - save the order - reopen the order - change the quantity (2 instead of 1) - save the order => changing quantity was not possible before the patch - syspref AcqCreateItem : create items on ORDERING - in a basket, create an order (click on "add" to add an item => quantity = 1) - save the order - reopen the order - try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message) => the behavior is the same as before the patch Signed-off-by: Katrin Fischer Copied test plan from bug report. Template only change deactivating the Javascript that blocks you from changing the quantity when AcqCreateItem is set to something else than 'ordering'. Passes all tests and QA script. **Rebased for 3.8.x** Signed-off-by: Chris Cormack --- acqui/neworderempty.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 1d82152682..1a835fb61f 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -386,6 +386,7 @@ $template->param( # CHECKME: gst-stuff needs verifing, mason. gstrate => $bookseller->{'gstrate'} // C4::Context->preference("gist") // 0, gstreg => $bookseller->{'gstreg'}, + acqcreate => C4::Context->preference("AcqCreateItem") eq "ordering" ? 1 : "" ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index b59b2ee5ad..c9eda4f48f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -129,6 +129,7 @@ $(document).ready(function() //We apply the fonction only for modify option [% IF ( quantityrec ) %] + [% IF ( acqcreate ) %] $('#quantity').blur(function() { // if user decreases the quantity @@ -147,6 +148,7 @@ $(document).ready(function() } }); [% END %] + [% END %] //keep a copy of all budgets before removing the inactives disabledBudgetsCopy = $('#budget_id').html(); From c3cdfb0e4a8f36a7d6b0218dc34b94cecaf39cc2 Mon Sep 17 00:00:00 2001 From: Christophe Croullebois Date: Mon, 18 Mar 2013 18:46:03 +0100 Subject: [PATCH 15/15] Bug 9923 - correction of a bug due to bz 7129 See comments in the patch Signed-off-by: Mathieu Saby Signed-off-by: Paul Poulain **rebased for 3.8.x** Signed-off-by: Chris Cormack --- acqui/orderreceive.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 7203d2d613..a7c04b38c2 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -163,7 +163,6 @@ if ( $count == 1 ) { quantityreceived => @$results[0]->{'quantityreceived'}, rrp => @$results[0]->{'rrp'}, ecost => sprintf( "%.2f",$order->{'ecost'}), - unitprice => sprintf( "%.2f",$order->{'unitprice'}), memberfirstname => $member->{firstname} || "", membersurname => $member->{surname} || "", invoice => $invoice, @@ -174,6 +173,15 @@ if ( $count == 1 ) { surnamesuggestedby => $suggestion->{surnamesuggestedby}, firstnamesuggestedby => $suggestion->{firstnamesuggestedby}, ); + + # regardless of the content of 'unitprice' e.g 0 or '' or any string will return in these cases 0.00 + # and the 'IF' in the .tt will show 0.00 and not 'ecost' (see BZ 7129) + # So if 'unitprice' == 0 we don't create unitprice + if ( $order->{'unitprice'} != 0) { + $template->param( + unitprice => sprintf( "%.2f",$order->{'unitprice'}), + ); + } } else { my @loop;