From 2a7fa64bdfacec7411f06b6d35d30154c9f53d2a Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sat, 27 Apr 2013 09:25:31 +1200 Subject: [PATCH 01/59] Revert "Bug 9812 - Forbid access to several files through the browser" This reverts commit c0c8a46be7b61539cd920e1cf51791e38c99813b. Reverted at Authors 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 77e66cb814c5c203a3b94c303394bf0f37b3a94a Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 1 Mar 2013 13:22:33 +1100 Subject: [PATCH 02/59] Bug 9737 - Local Covers sometimes appear then disappear on OPAC Search Results/Lists The current problem: When the verify_images() function runs from amazonimages.js, it loops through every img element and selects the elements that come from Amazon sources. However, if the height/width is 1 (i.e. Amazon passes off a blank image) or if the img element's complete property is null or non-existent, then it searches for the parent node and re-writes the HTML with the "No Cover Image Available" (NO_AMAZON_IMAGE) text, even though that parent node might contain other img elements that have images available (from Google, local images, etc)! Proposed fix: Wrap the Amazon image in a span tag (as we do with the Google and local covers), so that it re-writes the HTML within that parent span, rather than the parent anchor which contains all the other images. To test: 1) Turn on the OPACAmazonCoverImages, GoogleJackets, and OPACLocalCoverImages system preferences 2) Replace the ISBN in one of your records with 9780615352435 3) Now load a local cover image for that record 4) Search for that record (but make sure you're vague enough to have multiple search results) 5) For a split second, you may notice the local cover image appears before being replaced by a "No Cover Image Available". Now apply this patch 6) Refresh your search results page 7) You should now see your local cover image, PLUS the "No Cover Image Available" for the Amazon image, and whatever other graphics/"no cover image available" "graphics" for the Google Jackets. To be comprehensive, try the same set of steps using the OPAC Lists rather than the OPAC Search Results Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 6 +++--- koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt | 6 +++--- 2 files changed, 6 insertions(+), 6 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 0b860c8cfd..a9263c3a74 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -636,15 +636,15 @@ $(document).ready(function(){ [% IF ( OPACLocalCoverImages ) %][% END %] - [% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %][% ELSE %]No cover image available[% END %][% END %] + [% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %][% ELSE %]No cover image available[% END %][% END %] [% IF ( SyndeticsEnabled ) %] [% IF ( SyndeticsCoverImages ) %] [% IF SEARCH_RESULT.normalized_isbn %] [% IF ( using_https ) %] - + [% ELSE %] - + [% END %] [% ELSE %] No cover image available diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt index 3ac0ab4942..be61dbaa8c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt @@ -433,12 +433,12 @@ $(function() { [% IF ( OPACLocalCoverImages ) %][% END %] - [% IF ( OPACAmazonCoverImages ) %][% IF ( itemsloo.normalized_isbn ) %][% ELSE %]No cover image available[% END %][% END %] + [% IF ( OPACAmazonCoverImages ) %][% IF ( itemsloo.normalized_isbn ) %][% ELSE %]No cover image available[% END %][% END %] [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %] - + [% ELSE %] - [% END %][% END %][% END %] + [% END %][% END %][% END %] [% IF ( GoogleJackets ) %][% IF ( itemsloo.normalized_isbn ) %]
[% ELSE %]No cover image available[% END %][% END %] [% IF OpenLibraryCovers %][% IF itemsloo.normalized_isbn %][% ELSE %]No cover image available[% END %][% END %] From 951092bc3137c63dcae5dac1facfa7a7eef5b233 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 13 Apr 2013 21:31:14 -0300 Subject: [PATCH 03/59] 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 c31ebb9a3383432ce460ac8f98e9e9b6e2f902dd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 10 Feb 2012 10:43:29 -0500 Subject: [PATCH 04/59] Bug 6898 - circulation librarians can't run overdues without reports permissions This patch adds a new user permission overdues_report for the circulation module, and requires this permission to run the overdue items report, rather than requiring full reports permissions. Test plan : With a user with permissions circulate_remaining_permissions : - Add overdues_report permission to user - Go to circulation home => you see "Overdues" link - Clik on it => you are allowed to access and use this page - Remove overdues_report permission to user - Go to circulation home => you do not see "Overdues" link - Edit URL : /cgi-bin/koha/circ/overdue.pl => you are not allowed to access this page - Go to main page => you don't have access to reports module Signed-off-by: Kyle M Hall Signed-off-by: Fridolyn SOMERS Signed-off-by: Jonathan Druart --- circ/overdue.pl | 2 +- installer/data/mysql/de-DE/mandatory/userpermissions.sql | 1 + installer/data/mysql/en/mandatory/userpermissions.sql | 1 + installer/data/mysql/es-ES/mandatory/userpermissions.sql | 1 + .../data/mysql/fr-FR/1-Obligatoire/userpermissions.sql | 1 + installer/data/mysql/it-IT/necessari/userpermissions.sql | 1 + .../data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql | 1 + installer/data/mysql/pl-PL/mandatory/userpermissions.sql | 1 + .../mysql/ru-RU/mandatory/permissions_and_user_flags.sql | 1 + .../mysql/uk-UA/mandatory/permissions_and_user_flags.sql | 1 + installer/data/mysql/updatedatabase.pl | 6 ++++++ .../intranet-tmpl/prog/en/modules/circ/circulation-home.tt | 2 +- 12 files changed, 17 insertions(+), 2 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index e44e792f0a..1c8d8655f9 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -60,7 +60,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { reports => 1, circulate => "circulate_remaining_permissions" }, + flagsrequired => { circulate => "overdues_report" }, debug => 1, } ); diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql index ec5a22af07..f203a8d3f0 100644 --- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql +++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql @@ -1,6 +1,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Übrige Ausleihberechtigungen'), ( 1, 'override_renewals', 'Gesperrte Verlängerungen überschreiben'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Übrige Administrationsberechtigungen'), ( 3, 'manage_circ_rules', 'Ausleihkonditionen verwalten'), ( 6, 'place_holds', 'Vormerkungen für Benutzer setzen'), diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index 070e8f595e..8577ef231e 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -1,6 +1,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), diff --git a/installer/data/mysql/es-ES/mandatory/userpermissions.sql b/installer/data/mysql/es-ES/mandatory/userpermissions.sql index 070e8f595e..8577ef231e 100644 --- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql +++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql @@ -1,6 +1,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql index 3147bed115..3c57a81e60 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql @@ -1,6 +1,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'), ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'), + ( 1, 'overdues_report', 'Executer le rapport de retards'), ( 3, 'parameters_remaining_permissions', 'Paramètres du système restants'), ( 3, 'manage_circ_rules', 'Gestion des règles de circulation'), ( 6, 'place_holds', 'Réserver pour des adhérents'), diff --git a/installer/data/mysql/it-IT/necessari/userpermissions.sql b/installer/data/mysql/it-IT/necessari/userpermissions.sql index cf5424e5ff..31e6e18c29 100644 --- a/installer/data/mysql/it-IT/necessari/userpermissions.sql +++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql @@ -3,6 +3,7 @@ SET FOREIGN_KEY_CHECKS=0; INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Permessi rimanenti per la circolazione'), ( 1, 'override_renewals', 'Sblocca i rinnovi bloccati'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Permessi rimanenti'), ( 3, 'manage_circ_rules', 'Gestisci regole circolazione'), ( 6, 'place_holds', 'Fai prenotazioni per gli utenti'), diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql index 36c03f374b..79778656de 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql @@ -21,6 +21,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Øvrige rettigheter for sirkulasjon'), ( 1, 'override_renewals', 'Overstyre blokkerte fornyinger'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Øvrige rettigheter knyttet til systempreferanser'), ( 3, 'manage_circ_rules', 'Endre sirkulasjonsregler'), ( 6, 'place_holds', 'Foreta reservering for lånere'), diff --git a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql index 1165af141f..02b25517b2 100644 --- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql +++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql @@ -1,6 +1,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), diff --git a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql index 00d6538045..868c3c03d2 100644 --- a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql +++ b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql @@ -25,6 +25,7 @@ TRUNCATE permissions; INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), diff --git a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql index 188a146643..8d0126b399 100644 --- a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql +++ b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql @@ -25,6 +25,7 @@ TRUNCATE permissions; INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 1, 'overdues_report', 'Execute overdue items report'), ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8e2f4e2538..1922828b67 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6221,6 +6221,12 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"); print "Upgrade to $DBversion done (Bug 7241: Fix on circulation logs)\n"; print "WARNING about bug 7241: to partially correct the broken logs, the log history is filled with the first found item for each biblio.\n"; +} + +$DBversion = "3.10.05.002"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("INSERT INTO permissions ( module_bit, code, description ) VALUES ( '1', 'overdues_report', 'Execute overdue items report' )"); + print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n"; SetVersion($DBversion); } 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 631158fb1c..cb0662a2de 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 @@ -40,7 +40,7 @@
  • Holds awaiting pickup
  • Hold ratios
  • Transfers to receive
  • - [% IF ( CAN_user_reports_execute_reports ) %]
  • Overdues + [% IF ( CAN_user_circulate_overdues_report ) %]
  • Overdues - Warning: This report is very resource intensive on systems with large numbers of overdue items.
  • [% END %]
  • Overdues with fines - Limited to your library. See report help for other details.
  • From 7afc07bfaae3b508a043ec426f161bbe0cd87f8d Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Thu, 7 Mar 2013 12:17:33 -0500 Subject: [PATCH 05/59] Bug 6898 - circulation librarians can't run overdues without reports permissions followup Better update database. Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- installer/data/mysql/updatedatabase.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1922828b67..0ae796c40c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6225,7 +6225,19 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { $DBversion = "3.10.05.002"; if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { - $dbh->do("INSERT INTO permissions ( module_bit, code, description ) VALUES ( '1', 'overdues_report', 'Execute overdue items report' )"); + $dbh->do(q{ + INSERT INTO permissions ( module_bit, code, description ) + VALUES ( '1', 'overdues_report', 'Execute overdue items report' ) + }); + # add new permission for users with all report permissions and circulation remaining permission + my $sth = $dbh->prepare(q{ + INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT user_permissions.borrowernumber, 1, 'overdues_report' + FROM user_permissions + LEFT JOIN borrowers USING(borrowernumber) + WHERE borrowers.flags & (1 << 16) + AND user_permissions.code = 'circulate_remaining_permissions' + }); print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n"; SetVersion($DBversion); } From c7a722ea068c993c7cb351d77d0f8d0103030062 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 8 Apr 2013 10:26:06 -0400 Subject: [PATCH 06/59] Bug 10000 - Little typo in intranet-tmpl/prog/en/modules/help/tools/letter.tt: sliip This patch removes the extra i in "sliip." To test, go to Tools -> Notices & Slips and view the help file. The last bulleted item on the page should contain no typo. Signed-off-by: Bernardo Gonzalez Kriegel Comment: Can't resist to sign Bug 10000!! Work as described. No errors. Signed-off-by: Galen Charlton Signed-off-by: Katrin Fischer Can't resist to QA - All tests and QA script pass. Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt index cf81c5eb23..a9c6bc3ec2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt @@ -152,11 +152,11 @@
  • TRANSFERSLIP
    • Used to print a transfer slip
    • -
    • The transfer sliip is printed when you confirm a transfer from one branch to another in your system
    • +
    • The transfer slip is printed when you confirm a transfer from one library to another in your system
  • See the full documentation for Notices in the manual (online).

    -[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'help-bottom.inc' %] From aee438607062ea89e708644433990094954b0f06 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Apr 2013 15:44:45 -0400 Subject: [PATCH 07/59] Bug 10002 - Don't include line breaks in strings that are translated Several JS alert messages contain "\n" which is problematic for translation. This patch removes those instances (a line break is not strictly necessary anyway). Also corrected: two instances of "holds(s)" To test, place a hold on a title with items. From the biblio detail page choose Edit -> Delete all items and Edit -> Delete record. In each case you should see error messages with no line breaks and no misspellings. Delete all items attached to the record with holds from the item edit page. Go back to the detail page and choose Edit -> Delete record. You should see an error message about existing hold(s) with no line breaks or misspellings. Signed-off-by: Chris Cormack Harmless change, fixes misspellings and makes translations easier Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 d4dca877c7..e31f25134c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -35,10 +35,10 @@ var count = [% count %]; var holdcount = [% holdcount %]; var is_confirmed; - if (count > 0){ - is_confirmed = alert( count + " " +_("item(s) are attached to this record.\nYou must delete all items before deleting this record.") ); + if (count > 0){ + is_confirmed = alert( count + " " +_("item(s) are attached to this record. You must delete all items before deleting this record.") ); } else if ( holdcount > 0 ) { - is_confirmed = confirm( holdcount + " " + _("holds(s) for this record \n Are you sure you want to delete this record?.")); + is_confirmed = confirm( holdcount + " " + _("hold(s) on this record. Are you sure you want to delete this record?.")); } else { is_confirmed = confirm(_("Are you sure you want to delete this record?")); } @@ -61,7 +61,7 @@ var holdcount = [% holdcount %]; if ( holdcount > 0 ) { - alert( holdcount + " " + _("holds(s) for this record \n You must delete all holds before deleting all items.") ); + alert( holdcount + " " + _("hold(s) on this record. You must delete all holds before deleting all items.") ); } else if ( count > 0 ) { if( confirm( _("Are you sure you want to delete the") + " " + count + " " + _("attached items?") ) ) { window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]"; From 6da83232d242da58a3cee9ce50f11a50611e1f9b Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Mon, 15 Apr 2013 21:56:53 +0200 Subject: [PATCH 08/59] Bug 10058 - Fix unapi for NORMARC This patch uses a lot of MARC21 XSLT to transform NORMARC records to desired formats. Since NORMARC is mostly a subset of MARC21, I think this should give passable results. And better results than no unapi-support at all for NORMARC! To reproduce: - Make sure you have marcflavour = NORMARC - Visit /cgi-bin/koha/unapi in a browser - Observe the empty element To test: - Apply the patch - Visit /cgi-bin/koha/unapi in a browser - Observe the the list of formats in the element - Import the provided sample NORMARC record and make a note of its biblionumber - View the record at /cgi-bin/koha/unapi?id=koha:biblionumber:x&format=y where x = the biblionumber of the sample record and y = one of the formats marcxml, marcxml-full, mods, mods-full, mods3, mods3-full, oai_dc, rdfdc, rss2, rss2-full and srw_dc - Check that the transformed records make some kind of superficial sense Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- opac/unapi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/opac/unapi b/opac/unapi index 0f97eced35..6d8aec79ce 100755 --- a/opac/unapi +++ b/opac/unapi @@ -75,6 +75,19 @@ my $format_to_stylesheet_map = { 'rss2-full' => 'MARC21slim2RSS2.xsl', 'srw_dc' => 'MARC21slim2SRWDC.xsl', }, + 'NORMARC' => { + 'marcxml' => 'identity.xsl', + 'marcxml-full' => 'identity.xsl', + 'mods' => 'MARC21slim2MODS.xsl', + 'mods-full' => 'MARC21slim2MODS.xsl', + 'mods3' => 'MARC21slim2MODS3-1.xsl', + 'mods3-full' => 'MARC21slim2MODS3-1.xsl', + 'oai_dc' => 'MARC21slim2OAIDC.xsl', + 'rdfdc', => 'MARC21slim2RDFDC.xsl', + 'rss2' => 'MARC21slim2RSS2.xsl', + 'rss2-full' => 'MARC21slim2RSS2.xsl', + 'srw_dc' => 'MARC21slim2SRWDC.xsl', + }, 'UNIMARC' => { 'marcxml' => 'identity.xsl', 'marcxml-full' => 'identity.xsl', From 74b4355cfda5008578e9b787e8f37171c4b28526 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 17 Apr 2013 14:07:55 -0400 Subject: [PATCH 09/59] Bug 10072 - "my suggestions" always says "There are no pending purchase suggestions." Test Plan: 1) Switch off the IndependantBranches syspref 2) Log into the OPAC 3) Place a suggestions 4) Instead of seeing your suggestion, you will see "There are no pending purchase suggestions." 5) Apply this patch 6) Reload the page 7) You should now see your suggestions Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- C4/Suggestions.pm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index eedfcbd8b0..60cb1b7d8d 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -138,10 +138,6 @@ sub SearchSuggestion { push @sql_params, $suggestion->{branchcode}; push @query, qq{ AND suggestions.branchcode=? }; } - } else { - push @query, qq{ - AND (suggestions.branchcode='' OR suggestions.branchcode IS NULL) - }; } } From 49e363a4c571a22eb487082f5f1dbda01321525f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 8 Apr 2013 10:13:11 -0400 Subject: [PATCH 10/59] Bug 9860 [Alternate] Incorrect box heading 'Cannot check in' when a late document is returned The fix for Bug 9397 moved the "cannot check in" heading from within the one conditional where it should have been displayed to the top of all check-in errors/messages. "Cannot check in" is still only valid if the item is withdrawn and BlockReturnOfWithdrawnItems is ON. In order to accomplish the goal of Bug 9397 while fixing Bug 9860 this patch puts "cannot check in" back into the correct conditional and adds a generic heading to check in messages for accessibility purposes. To test, check in items which will trigger a variety of errors including: - item must be returned to home library - item is lost - item is withdrawn (wtih BlockReturnOfWithdrawnItems on and off) - item is overdue ...as well as items which should check in normally. Messages should display correctly. Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 1e19667e93..fcee4c22b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -317,7 +317,7 @@ $(document).ready(function () { [% IF ( errmsgloop ) %]
    -
    Cannot check in
    +

    Check in message

    [% FOREACH errmsgloo IN errmsgloop %] [% IF ( errmsgloo.badbarcode ) %]

    No item with barcode: [% errmsgloo.msg %]

    @@ -336,6 +336,7 @@ $(document).ready(function () { [% END %] [% IF ( errmsgloo.withdrawn ) %] [% IF BlockReturnOfWithdrawnItems %] +
    Cannot check in

    Item is withdrawn. NOT CHECKED IN

    [% ELSE %]

    Item is withdrawn.

    From 4a83dde8bf4b1f5110671c978b6cb4da38104cce Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Thu, 14 Feb 2013 14:23:30 +0100 Subject: [PATCH 11/59] 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 75334ca55de4f15484cc524ad827d5862aa99ccd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 27 Mar 2013 13:57:01 -0400 Subject: [PATCH 12/59] Bug 9839 - when importing MARC records, item record not created even when set to "always add" Test Plan: 1) Catalog a new record with an ISBN 2) Add some items to the record 3) Download the record as MARCXML 4) Delete the itemnumbers from the 952 fields in the record, Change the barcode fields to unused barcodes 5) Use xml2marc to save as a standard MARC file 6) Import the record using the 'Stage MARC for import' tool Use the settings: Record matching rule: ISBN Action if matching record found: ignore Action if no match found: ignore Item processing: always_add Check for embedded item record data?: Yes How to process items: Always add items 7) Import, note the bib is ignored, and the items are not processed 8) Undo import into catalog 8) Apply this patch 9) Import this batch into the catalog 10) Note the items were processed and are now added to the matching record Signed-off-by: Mathieu Saby Tested with UNIMARC record. I followed the test plan, just changing 952 by 995 Signed-off-by: Mason James Signed-off-by: Chris Cormack --- C4/ImportBatch.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 5f466134e2..61857606be 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -652,6 +652,7 @@ sub BatchCommitRecords { SetImportRecordStatus($rowref->{'import_record_id'}, 'imported'); } elsif ($record_result eq 'ignore') { $num_ignored++; + $recordid = $record_match; if ($record_type eq 'biblio' and defined $recordid and $item_result eq 'create_new') { my ($bib_items_added, $bib_items_errored) = BatchCommitItems($rowref->{'import_record_id'}, $recordid); $num_items_added += $bib_items_added; From 9e2b58b582531859fbdede3b327c18b5f7db8e6e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 7 Feb 2013 09:57:47 -0500 Subject: [PATCH 13/59] Bug 9523: importing staged bib records hangs if a matched bib has been deleted Test Plan: 1) Stage a MARC record file that will have matches with existing records 2) Delete the bib from Koha that was matched on 3) Attempt to import the records into Koha, the import will hang 4) Apply the patch 5) Reload manage-marc-import.pl and attempt to import again, this time it should succeed. Signed-off-by: Galen Charlton Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- C4/ImportBatch.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 61857606be..a5befe69da 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1036,6 +1036,7 @@ sub GetBestRecordMatch { my $dbh = C4::Context->dbh; my $sth = $dbh->prepare("SELECT candidate_match_id FROM import_record_matches + JOIN biblio ON ( candidate_match_id = biblionumber ) WHERE import_record_id = ? ORDER BY score DESC, candidate_match_id DESC"); $sth->execute($import_record_id); From 61d82360beae443b21ca439b97fe033bb5920173 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Fri, 19 Apr 2013 22:52:07 -0400 Subject: [PATCH 14/59] Bug 10085: unapi does not function under Plack The following errors appear when trying to use unapi under Plack (among others): Variable "$cgi" is not available at /home/jcamins/kohaclone/opac/unapi line 160. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 173. Variable "$format_info" is not available at /home/jcamins/kohaclone/opac/unapi line 174. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 185. To test: 1) Try to view /cgi-bin/koha/unapi under Plack 2) There is no step 2. Plack crashes. 3) Apply patch. 4) Try to view /cgi-bin/koha/unapi again, and note that it doesn't crash Signed-off-by: Chris Cormack I'm puzzled how this ever worked anyway, accidentally i'm guessing, this tidies up some lazy coding Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- opac/unapi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opac/unapi b/opac/unapi index 6d8aec79ce..a07434500a 100755 --- a/opac/unapi +++ b/opac/unapi @@ -120,7 +120,7 @@ my $id = $cgi->param('id'); my $format = $cgi->param('format'); if (not defined $format) { - emit_formats($id); + emit_formats($id, $format_to_stylesheet_map, $format_info, $cgi); } elsif ($id) { # koha:biblionumber:0152018484 @@ -136,7 +136,7 @@ if (not defined $format) { exit 0; } - my $transformer = get_transformer($format); + my $transformer = get_transformer($format, $format_to_stylesheet_map, $format_info); unless (defined $transformer) { print $cgi->header( -status => '406 invalid format requested' ); exit 0; @@ -167,7 +167,7 @@ if (not defined $format) { exit 0; sub emit_formats { - my $id = shift; + my ($id, $format_to_stylesheet_map, $format_info, $cgi) = @_; if (defined $id) { print $cgi->header( -type =>'application/xml', -status => '300 multiple choices' ); @@ -192,7 +192,8 @@ sub emit_formats { sub get_transformer { - my $format = lc shift; + my ($format, $format_to_stylesheet_map, $format_info) = @_; + $format = lc $format; my $marcflavour = uc(C4::Context->preference('marcflavour')); return unless $format_to_stylesheet_map->{$marcflavour}->{$format}; From 652f01bdb32e2bff665add37c6d4863c679ec96a Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 14 Apr 2013 19:29:13 +0200 Subject: [PATCH 15/59] Bug 8294: Fix display of serial enumeration for OPAC holds It turns out that this was not a missing but a broken feature. This patch corrects the template variables to make enumchron show up on the item table for item level holds in the OPAC. To test: Try to place item level holds on 1) a record where at least one item 2) a record where none of the items has items.enumchron information. The column with enumchron should only show for 1), but not for 2). Signed-off-by: David Cook Works as described. Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt | 4 ++-- 1 file 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 2b6942f52c..d07351e5d4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt @@ -429,7 +429,7 @@ Last location [% END %] Call number - [% IF ( bibitemloo.itemdata_enumchron ) %] + [% IF ( itemdata_enumchron ) %] Vol info [% END %] Information @@ -460,7 +460,7 @@ [% itemLoo.holdingBranchName %] [% END %] [% itemLoo.callNumber %] - [% IF ( itemLoo.itemdata_enumchron ) %] + [% IF ( itemdata_enumchron ) %] [% itemLoo.enumchron %] [% END %] From 575f8ed4425a7de45765ef10866569ff52645e6b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 10 Apr 2013 14:24:16 -0400 Subject: [PATCH 16/59] Bug 10026 - OPAC cart not showing location anymore When Bug 7570 added availability information to the cart it switched which subroutine was used to get item information, and thus changed how the information was being returned. This patch makes accommodations for this change by adding processing of item location information to the script in a way that will match the existing template variables. To test, add items to the cart in the OPAC some of which include shelving location information. When you view the cart you should see the shelving location displayed. Signed-off-by: Chris Cormack Signed-off-by: Chris Cormack --- opac/opac-basket.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index cf75eb7a7b..7b3a90afa4 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -78,6 +78,7 @@ foreach my $biblionumber ( @bibs ) { $hasauthors = 1; } my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac'); + my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac'); # COinS format FIXME: for books Only my $coins_format; @@ -92,6 +93,9 @@ foreach my $biblionumber ( @bibs ) { my $branches = GetBranches(); for my $itm (@items) { + if ($itm->{'location'}){ + $itm->{'location_opac'} = $shelflocations->{$itm->{'location'} }; + } my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber}); if ( defined( $transfertwhen ) && $transfertwhen ne '' ) { $itm->{transfertwhen} = $transfertwhen; From 958e7626f16d46c9e1e8c81e8c9614364966deec Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Mon, 15 Apr 2013 20:24:08 +0200 Subject: [PATCH 17/59] 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 042012cfe2d87cea0b569dad37dba6f12c1107d7 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 15 Apr 2013 06:21:55 +0200 Subject: [PATCH 18/59] Bug 9818: Fixing capitalization and remove dollar sign Overdue Fines Cap ($) > Overdue fines cap (amount) To test: Go to administration > circulation and fine rules Check column label Overdue fines cap now follows capitalization rules and has no dollar sign. Signed-off-by: Owen Leonard Signed-off-by: Chris Cormack Signed-off-by: Jonathan Druart Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index a025fe16c5..fe8e1e34f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -72,7 +72,7 @@ for="tobranch">Clone these rules to: "+_("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 f06fff86051e9ab15048382185e6379cb17d0396 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 25 Apr 2013 13:54:31 +0200 Subject: [PATCH 21/59] Bug 10110: Problems with diacritics in saved SQL reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds decoding for cgi params (for completeness). Apparently, the NAME attribute of DBI statement handle has a UTF8 bug. Fixing this by decoding the returned column names. Did this in a shared routine. http://bugs.koha-community.org/show_bug.cgi?id=10110 Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Copying test plan from bug report: Example SQL: select branchname as "Bibliothek (üöä)", branchname "Bibiothek (üäa)", branchname from branches where branchcode = <> 1) Create report with given example SQL or your own including some diacritics in the columnnames 2) Save the report and run it 3) Verify column names are broken before patch, but fixed after.. All tests and QA script pass. Signed-off-by: Chris Cormack --- reports/guided_reports.pl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index de18072937..05d1dffde7 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -20,7 +20,7 @@ use strict; use warnings; -use CGI; +use CGI qw/-utf8/; use Text::CSV; use URI::Escape; use C4::Reports::Guided; @@ -644,9 +644,8 @@ elsif ($phase eq 'Run this report'){ unless ($sth) { die "execute_query failed to return sth for report $report_id: $sql"; } else { - my $headref = $sth->{NAME} || []; - my @headers = map { +{ cell => $_ } } @$headref; - $template->param(header_row => \@headers); + my $headers= header_cell_loop($sth); + $template->param(header_row => $headers); while (my $row = $sth->fetchrow_arrayref()) { my @cells = map { +{ cell => $_ } } @$row; push @rows, { cells => \@cells }; @@ -763,7 +762,13 @@ elsif ($phase eq 'Save Compound'){ # pass $sth, get back an array of names for the column headers sub header_cell_values { my $sth = shift or return (); - return @{$sth->{NAME}}; + my @cols; + foreach my $c (@{$sth->{NAME}}) { + #FIXME apparently DBI still needs a utf8 fix for this? + utf8::decode($c); + push @cols, $c; + } + return @cols; } # pass $sth, get back a TMPL_LOOP-able set of names for the column headers From 0159cab8767bec0f48d5a43dc11da9ef22315203 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 25 Apr 2013 14:48:03 +0200 Subject: [PATCH 22/59] Bug 10110 Followup for Acquisition.pm Adding a FIXE at a line that uses $sth->{NAME} for possible utf8 problems. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Adds a comment, no danger from that. Signed-off-by: Chris Cormack --- C4/Acquisition.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index accce26f2c..6ead364f3c 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1133,6 +1133,9 @@ sub ModOrder { my $sth = $dbh->prepare("SELECT * FROM aqorders LIMIT 1;"); $sth->execute; my $colnames = $sth->{NAME}; + #FIXME Be careful. If aqorders would have columns with diacritics, + #you should need to decode what you get back from NAME. + #See report 10110 and guided_reports.pl my $query = "UPDATE aqorders SET "; foreach my $orderinfokey (grep(!/ordernumber/, keys %$orderinfo)){ From 70f32c0d3f0883167359242a9d54492e612f3f49 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Fri, 26 Apr 2013 17:11:37 +0100 Subject: [PATCH 23/59] Bug 9684 : Correct path to compact.xsl When try to display card view of retrieved record error occurred as compact.xsl could not be found script was constructing path as though it was opac Also added fallback to en version if no xsl file found under current lang as done in opac-showmarc.pl Signed-off-by: Nicole C. Engard Test plan: * Set sys pref to use CCSR * Do a Z39.50 Search * Click 'card' on one of the results * confirm that there is no error. All test pass Signed-off-by: Katrin Fischer I am astonished that opacthemes affects Z39.50 search in staff so this might be fixing a bigger problem. Checked that clicking on Card works for both themes now correctly after I confirmed the bug. Also all views in OPAC were checked for both themes. All tests and QA script pass. Signed-off-by: Chris Cormack --- catalogue/showmarc.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index 1c453c4d13..0ee70c5fea 100755 --- a/catalogue/showmarc.pl +++ b/catalogue/showmarc.pl @@ -52,10 +52,13 @@ else { } if($view eq 'card') { - my $themelang = '/' . C4::Context->preference("opacthemes") . '/' . C4::Templates::_current_language(); + my $themelang = '/' . C4::Templates::_current_language(); my $xmlrecord= $importid? $record->as_xml(): GetXmlBiblio($biblionumber); my $xslfile = - C4::Context->config('intrahtdocs') . $themelang . "/xslt/compact.xsl"; + C4::Context->config('intrahtdocs') . '/prog' . $themelang . "/xslt/compact.xsl"; + if ( ! -f $xslfile && $themelang ne '/en' ) { + $xslfile=~s#$themelang#/en#; + } my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $source = $parser->parse_string($xmlrecord); From 64f8eeb86585f7951e15d7476c7fe0acbae14335 Mon Sep 17 00:00:00 2001 From: Stefano Bargioni Date: Fri, 26 Apr 2013 11:18:52 +0200 Subject: [PATCH 24/59] 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 13fe27eaa15696900cebdd1899f005956231b1cc Mon Sep 17 00:00:00 2001 From: "Kristina D.C. Hoeppner" Date: Fri, 29 Mar 2013 15:04:42 +1300 Subject: [PATCH 25/59] Bug 2046 - Suggestions: Title Field too small Increase both on staff and OPAC interface from 80 to 255 characters to be saved in the database. Shown will be 80 characters. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Clean patch, workes as described. To test: - Apply patch and run database update - Check that the column in the database is now varchar(255) - Enter a new suggestion in the OPAC - Edit this suggestion in staff - Confirm form has the new max value set --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/suggestion/suggestion.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 4a6de3b3a6..25867aeafd 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1978,7 +1978,7 @@ CREATE TABLE `suggestions` ( -- purchase suggestions `STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) `note` mediumtext, -- note entered on the suggestion `author` varchar(80) default NULL, -- author of the suggested item - `title` varchar(80) default NULL, -- title of the suggested item + `title` varchar(255) default NULL, -- title of the suggested item `copyrightdate` smallint(6) default NULL, -- copyright date of the suggested item `publishercode` varchar(255) default NULL, -- publisher of the suggested item `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time the suggestion was updated diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0ae796c40c..bfcf6ecc1f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6242,6 +6242,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.10.05.003"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q{ALTER TABLE suggestions CHANGE COLUMN title title VARCHAR(255) DEFAULT NULL;}); + print "Upgrade to $DBversion done (Bug 2046 - increasing title column length for suggestions)\n"; + SetVersion ($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index d32e2bde8d..5818fc5372 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -267,7 +267,7 @@ $(document).ready(function() { calcNewsuggTotal(); });

    Enter a new purchase suggestion

    [% END %]
    Bibliographic information
      -
    1. +
    2. 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 cbf7aafdad..02ab5a85fb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt @@ -103,7 +103,7 @@ $.tablesorter.addParser({

      Only the title is required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.

        -
      1. +
      2. From ed918e3248bf2a93759905189d9a0b90cb757665 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sun, 28 Apr 2013 10:21:17 +1200 Subject: [PATCH 26/59] Bumping database version number --- kohaversion.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kohaversion.pl b/kohaversion.pl index 1c0531b913..c0e33f4b94 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.10.05.000'; + our $VERSION = '3.10.05.003'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install From 09a227e7e9a6cb19dd1909acbe4b7b19d95c1a7e Mon Sep 17 00:00:00 2001 From: Edmund Balnaves Date: Mon, 15 Apr 2013 11:08:06 +1000 Subject: [PATCH 27/59] 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 ed0298ec0c610214e6fe311d4b6bfe5d50a33375 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 29 Apr 2013 12:34:10 -0400 Subject: [PATCH 28/59] Bug 10153 - Patron header search form is too wide The patron header search form is now too wide to display correctly on screens smaller than about 1110px. This patch groups the previously shown-by-default choices with the hidden additional search parameters. To test, apply the patch and view any page which includes the patron header search include, for example members/members-home.pl. Additional search options should be hidden by default. Clicking "[+]" should show all additional options: Search fields, search type, order by, library, and category. Signed-off-by: Nicole C. Engard Works for me. Signed-off-by: Katrin Fischer Passes all tests and QA script. I like this change. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- .../prog/en/includes/patron-search.inc | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 5023ba5b7d..fba263e6f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -5,47 +5,48 @@

        Enter patron card number or partial name:

        - [% IF ( branchloop ) %]
        [-] [+] - [% END %] - - - - - - - - [% IF ( branchloop ) %] -

        - -

        - [% END %] + +
        +

        +

        +

        +

        + +

        +

        + [% IF ( branchloop ) %]

        + [% END %] + [% IF ( categories ) %] +

        + [% END %] +
    From bdf07b45f9b1593caaf0c65190a3a51c669e51f1 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Mon, 29 Apr 2013 12:32:48 -0400 Subject: [PATCH 29/59] Bug 10152: Default sorting wrong in parcels.pl When you are receiving an order, the list of existing invoices should appear in reverse chronological order. Unfortunately, right now it appears in regular chronological order. To test: 1) Make sure you have multiple invoices that have varying shipment dates for a vendor. We will assume this vendor is called "Example Vendor." 2) Choose the "Receive shipments" button on the Example Vendor page. 3) Note that the invoices are sorted by regular chronological order. 4) Apply patch. 5) Refresh "Receive shipment" page. Note that invoices are now sorted in reverse chronological order. 6) Sign off. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Works as described. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- acqui/parcels.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/parcels.pl b/acqui/parcels.pl index 4f2849d43f..3f4e2e86c8 100755 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -79,7 +79,7 @@ use C4::Budgets; my $input = CGI->new; my $booksellerid = $input->param('booksellerid'); -my $order = $input->param('orderby') || 'datereceived desc'; +my $order = $input->param('orderby') || 'shipmentdate desc'; my $startfrom = $input->param('startfrom'); my $code = $input->param('filter'); my $datefrom = $input->param('datefrom'); From ea3005fa49ffc4699e697d925e6828ed8f602101 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 10 Apr 2013 12:37:54 +0200 Subject: [PATCH 30/59] 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 e4af5b0fb9..906f085254 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 25f4322fc12d27f3a7dbea62494f3658c68378c3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 25 Apr 2013 09:34:17 -0400 Subject: [PATCH 31/59] Bug 10111 - Layout on basket summary page a bit inconsistent Some details in the summary of basket information were not marked up consistently with others on the page. This patch makes the markup consistent for a consistent appearance. To test, view a basket in Acquisitions which is part of a basketgroup. Information should be displayed consistently for baksets in both open and closed basket groups. Signed-off-by: Mirko Tietgen Works as expected Signed-off-by: Katrin Fischer Template change only, works nicely. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- .../prog/en/modules/acqui/basket.tt | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) 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 386d699723..cd4321d0c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -232,13 +232,14 @@ [% IF ( closedate ) %]
    -

    - +

      +
    1. + Basket group: [% IF basketgroup.closed %] [% basketgroup.name %] (closed) [% ELSE %] -

      -

      +

    2. +
    3. - [% END %] -

      - - [% UNLESS basketgroup.closed %] -

      -

      - [% END %] + [% END %] +
    4. + [% IF ( basketgroupdeliveryplace ) %]
    5. Basket group delivery place: [% basketgroupdeliveryplace %]
    6. [% END %] + [% IF ( basketgroupbillingplace ) %]
    7. Basket group billing place: [% basketgroupbillingplace %]
    8. [% END %] +
    - [% IF ( basketgroupdeliveryplace ) %]

    Basket group delivery place: [% basketgroupdeliveryplace %]

    [% END %] - [% IF ( basketgroupbillingplace ) %]

    Basket group billing place: [% basketgroupbillingplace %]

    [% END %]
    [% END %]
    From e552ecd0d1e1eae2c18f908b48df17a1acc33939 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 Apr 2013 14:20:49 -0400 Subject: [PATCH 32/59] 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 906f085254..381486ce58 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 242df9da930e0eff72fa71221cc1d21e5c2ef25b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 30 Apr 2013 14:39:48 -0400 Subject: [PATCH 33/59] 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 a0177db727..18d1c3074e 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 dadd6c8bba1d2bef001238d768d36b3ec1eb8381 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 23 Apr 2013 12:58:19 +1000 Subject: [PATCH 34/59] Bug 10097 - Hide framework selection when importing staged authority records Currently, when importing authority records using the "Manage staged MARC records" tool, it will show the text "Add new bibliographic records into this framework:" followed by a drop-down menu of possible frameworks. Since these are bibliographic frameworks and we're importing authority records which do not use them, we have no need to show this information. I'm proposing just a little patch to display this info only for bibliographic records. From my tests, everything seems to work fine without this text and the drop-down, although I've only uploaded one MARC21 authority record at a time. -- Test Plan: Before applying patch... 1) Find yourself an authority record. I recommend downloading your favourite author from: http://authorities.loc.gov/ 2) Stage MARC for import. Choose "Authority" as your record type. 3) Go to "Manage staged records" 4) Underneath the button "Import this batch into the catalog", you should see the text "Add new bibliographic records into this framework:" followed by a drop-down of the available frameworks. Optionally) You can also try this for bibliographic records. You'll find the same. After applying the patch... 5) Repeat steps 2 and 3. 6) Underneath the button "Import this batch into the catalog", you should just see a table listing your MARC record(s). 7) Stage MARC for import. Choose "Bibliographic" as your record type. 8) Go to "Manage staged records". 9) You should find step 4 still to be true (i.e. the "Add new bibliographic..." text should still be there). Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Small template change, passes all tests. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- .../intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt | 2 ++ 1 file changed, 2 insertions(+) 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 e0325bb8b3..b81ffea178 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 @@ -191,6 +191,7 @@ $(document).ready(function(){

    + [% IF ( record_type != 'auth' ) %] Add new bibliographic records into this framework: + [% END %]
    Job progress:
    0%
    From bdc0d295eb200d1d31a0c5cf06e2b1f931e6dd7a Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Mon, 15 Apr 2013 19:50:19 +0200 Subject: [PATCH 35/59] Bug 7055 - NORMARC: Fix 008 position 15-17 and 35-37 This patch does several things: - Set the default for 008/15-17 to "no " (yes, there is space at the end) - Link from 008/15-17 in the value builder to NORMARC country codes - Set the default for 008/35-37 to "nor" (by setting the DefaultLanguageField008 syspref) - Link from 008/35-37 in the value builder to NORMARC language codes - Fix a missing around field 35-37 To reproduce: - Run through the Web-installer in Norwegian and choose NORMARC as the MARC flavour - Go to Home > Cataloging > Add MARC record and add a new record - Click in the field for 008. The default should look like: 130415t xxu||||| |||| 00| 0 eng d ^^^ ^^^ - Reload the page and open the value builder for 008. Problems: - The text for 15-17 links to MARC21 country codes - The default for 15-17 is xxu - The text for 35-37 links to MARC21 language codes - The default for 35-37 is eng - If you choose e.g. "Monografier" in the top dropdown then click on "OK" the window does not close To test: - Apply the patch and run through the Web-installer again, selecting Norwegian and NORMARC - Go to Home > Cataloging > Add MARC record and add a new record - Click in the field for 008. The default should look like: 130415t no ||||| |||| 00| 0 nor d ^^^ ^^^ - Reload the page and open the value builder for 008. - Check that... - The default for 15-17 is "no " (with a space at the end) - The link goes to NORMARC country codes - The default for 35-37 is "nor" - The link goes to NORMARC language codes - Select something from the top dropdown and click "OK". Check that the window closes and that the values that are entered into the 008 field matches what you chose in the popup window. Signed-off-by: Chris Cormack Trusing Magnus is right, so testing for any regressions mainly, all good Signed-off-by: Katrin Fischer Only changes NORMARC specific plugin and system preferences files. Changes all seem logical to me. Signed-off-by: Jared Camins-Esakov Conflicts: installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql Signed-off-by: Chris Cormack --- cataloguing/value_builder/normarc_field_008.pl | 4 ++-- .../data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql | 2 ++ .../modules/cataloguing/value_builder/normarc_field_008.tt | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cataloguing/value_builder/normarc_field_008.pl b/cataloguing/value_builder/normarc_field_008.pl index 5efe9a8ee7..98ca163273 100755 --- a/cataloguing/value_builder/normarc_field_008.pl +++ b/cataloguing/value_builder/normarc_field_008.pl @@ -58,7 +58,7 @@ function Focus$function_name(subfield_managed) { if ( document.getElementById(\"$field_number\").value ) { } else { - document.getElementById(\"$field_number\").value='$dateentered' + 't xxu||||| |||| 00| 0 $lang d'; + document.getElementById(\"$field_number\").value='$dateentered' + 't no ||||| |||| 00| 0 $lang d'; } return 1; } @@ -101,7 +101,7 @@ sub plugin { ); # $result = " t xxu 00 0 eng d" unless $result; - $result = "$dateentered" . "t xxu||||| |||| 00| 0 $lang d" unless $result; + $result = "$dateentered" . "t no ||||| |||| 00| 0 $lang d" unless $result; my $f1 = substr($result, 0, 6); my $f6 = substr($result, 6, 1); my $f710 = substr($result, 7, 4); diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql index 518c7cfb8f..eeedc86367 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql @@ -27,3 +27,5 @@ UPDATE systempreferences SET value = '

    Velkommen til Koha...


    ' WHERE UPDATE systempreferences SET value = '

    Viktige lenker kan plasseres her

    ' WHERE variable = 'OpacNav'; UPDATE systempreferences SET value = '
  • Andre bibliotek (WorldCat)
  • Andre databaser (Google Scholar)
  • Nettbutikker (Bookfinder.com)
  • ' WHERE variable = 'OPACSearchForTitleIn'; UPDATE systempreferences SET value = 'Monday' WHERE variable = 'CalendarFirstDayOfWeek'; +UPDATE systempreferences SET value = 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Æ Ø Å' WHERE variable = 'alphabet'; +UPDATE systempreferences SET value = 'nor' WHERE variable = 'DefaultLanguageField008'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt index cfdba9c5c2..14101b1f0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/normarc_field_008.tt @@ -128,9 +128,9 @@ - See MARC Code List for Countries + (Se NORMARC-koder for land) - + @@ -139,7 +139,8 @@ - See MARC Code List for Languages + + (Se NORMARC-koder for språk) From 74ea9cf2f5207e4188c6eab87e84a90f2010ac72 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Mon, 15 Apr 2013 19:02:46 +0200 Subject: [PATCH 36/59] Bug 7054 - NORMARC: Fix default for 000 position 17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Someone at the library education in Oslo told me that it would be better to have the default for 000/17 set to 1, instead of 2 as it is today. To reproduce: - Run through the Web-installer in Norwegian and choose NORMARC as the MARC dialect - Go to Home > Cataloging > Add MARC record and start to add a new record - Click in the 000 field and it should be filled with: " nam a22 2 4500" - Reload the page, then open the value builder for 000 and click on OK - 000 should get filled with the same string as above To test: - Apply the patch and repeat the steps from above. The default value for 000 should now be: " nam a22 1 4500" (Don't be confused by the 1s and the 2s. A value of 1 in position 17 means "level 2", and a value of 2 means "level 1" - that is how it is defined in the "standard": 1 = Nivå 2, iflg. Katalogiseringsregler 2 = Nivå 1, iflg. Katalogiseringsregler) Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Small changes. Didn't test in a NORMARC installaton, but trusting Magnus with this and seeing no reason why it shouldn't work. Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov (cherry picked from commit 064fc8b5223b19a57c658e7ca3444df7c017a444) Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- cataloguing/value_builder/normarc_leader.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/value_builder/normarc_leader.pl b/cataloguing/value_builder/normarc_leader.pl index fd29d60fe0..260d34658c 100755 --- a/cataloguing/value_builder/normarc_leader.pl +++ b/cataloguing/value_builder/normarc_leader.pl @@ -45,7 +45,7 @@ my $res=" function Focus$function_name(subfield_managed) { if(!document.getElementById(\"$field_number\").value){ - document.getElementById(\"$field_number\").value = ' nam a22 2 4500'; + document.getElementById(\"$field_number\").value = ' nam a22 1 4500'; } return 1; } @@ -81,7 +81,7 @@ my ($template, $loggedinuser, $cookie) flagsrequired => {editcatalogue => 1}, debug => 1, }); - $result = " nam a22 2 4500" unless $result; + $result = " nam a22 1 4500" unless $result; my $f5 = substr($result,5,1); my $f6 = substr($result,6,1); my $f7 = substr($result,7,1); From 700af3fb2131ea540a800978146493db24fb8725 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 15 Apr 2013 08:39:26 -0400 Subject: [PATCH 37/59] Bug 8419 - Suspended holds appear on the daily holds queue This bug was reintroduced by the patch for bu 5911: Transport Cost Matrix Test Plan: 1) Place a hold on a record 2) Run build_holds_queue.pl 3) Verify the hold is showing in the holds queue 4) Suspend the hold 5) Re-run build_holds_queue.pl 6) Note the hold is still in the holds queue 7) Apply patch 8) Re-run build_holds_queue.pl 9) Note the hold is no longer in the holds queue Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Passes test plan and QA script. Signed-off-by: Jared Camins-Esakov (cherry picked from commit d098a7c298437b2fd6ced6a8237f98f3221b810f) Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- C4/HoldsQueue.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 655269b396..dc43113f0b 100755 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -222,7 +222,9 @@ sub GetBibsWithPendingHoldRequests { FROM reserves WHERE found IS NULL AND priority > 0 - AND reservedate <= CURRENT_DATE()"; + AND reservedate <= CURRENT_DATE() + AND suspend = 0 + "; my $sth = $dbh->prepare($bib_query); $sth->execute(); @@ -265,6 +267,7 @@ sub GetPendingHoldRequestsForBib { AND found IS NULL AND priority > 0 AND reservedate <= CURRENT_DATE() + AND suspend = 0 ORDER BY priority"; my $sth = $dbh->prepare($request_query); $sth->execute($biblionumber); From 60465fc463618be1bb07e948ab79aaee71e14e9c Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Fri, 12 Apr 2013 17:24:17 +0200 Subject: [PATCH 38/59] 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 cbccb61c0e..741d42a2da 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2254,6 +2254,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 eeca0831442fa47ba5447f1cdc8a7298becad3aa Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 29 Apr 2013 11:54:27 -0300 Subject: [PATCH 39/59] Bug 10149 - koha-restart-zebra error handling (rewording) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit koha-restart-zebra now - Checks the instance exists. - Checks the instance is enabled. - Checks if the zebra daemon is already running. Regards To+ Edit: - changed some wording problems. - fixed an error in parameter validation Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit cee6909c8a5c10cc534a1ebe35ec5b8cda522eab) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 6ee0d799bb9e1f08625503a1e5b4505791985d3d) Signed-off-by: Chris Cormack --- debian/scripts/koha-restart-zebra | 158 +++++++++++++++++++++++++++--- 1 file changed, 142 insertions(+), 16 deletions(-) diff --git a/debian/scripts/koha-restart-zebra b/debian/scripts/koha-restart-zebra index 6b5c0cadb4..7464d6db38 100755 --- a/debian/scripts/koha-restart-zebra +++ b/debian/scripts/koha-restart-zebra @@ -1,6 +1,6 @@ #!/bin/sh # -# koha-restart-zebra -- Restart Zebra for named Koha instandes +# koha-restart-zebra - Restart Zebra for named Koha instances # Copyright 2010 Catalyst IT, Ltd # # This program is free software: you can redistribute it and/or modify @@ -18,21 +18,147 @@ set -e +die() +{ + echo "$@" 1>&2 + exit 1 +} + +warn() +{ + echo "$@" 1>&2 +} + +is_enabled() +{ + local instancename=$1 + + if ! is_instance $instancename; then + return 1 + fi + + if grep -q '^[[:space:]]*Include /etc/koha/apache-shared-disable.conf' \ + "/etc/apache2/sites-available/$instancename" ; then + return 1 + else + return 0 + fi +} + +is_instance() +{ + local instancename=$1 + + if find /etc/koha/sites -mindepth 1 -maxdepth 1 \ + -type d -printf '%f\n'\ + | grep -q -x $instancename ; then + return 0 + else + return 1 + fi +} + +is_zebra_running() +{ + local instancename=$1 + + if daemon --name="$instancename-koha-zebra" \ + --user="$instancename-koha.$instancename-koha" \ + --running ; then + return 0 + else + return 1 + fi +} + +restart_zebra_instance() +{ + local instancename=$1 + + if is_zebra_running $instancename; then + echo "Restarting Zebra server for $instancename" + daemon \ + --name="$instancename-koha-zebra" \ + --errlog="/var/log/koha/$instancename/zebra-error.log" \ + --stdout="/var/log/koha/$instancename/zebra.log" \ + --output="/var/log/koha/$instancename/zebra-output.log" \ + --verbose=1 \ + --respawn \ + --delay=30 \ + --user="$instancename-koha.$instancename-koha" \ + --restart \ + -- \ + zebrasrv \ + -v none,fatal,warn \ + -f "/etc/koha/sites/$instancename/koha-conf.xml" && \ + return 0 + else + return 1 + fi +} + +start_zebra_instance() +{ + local instancename=$1 + + if is_enabled $instancename; then + echo "Starting Zebra server for $instancename" + daemon \ + --name="$instancename-koha-zebra" \ + --errlog="/var/log/koha/$instancename/zebra-error.log" \ + --stdout="/var/log/koha/$instancename/zebra.log" \ + --output="/var/log/koha/$instancename/zebra-output.log" \ + --verbose=1 \ + --respawn \ + --delay=30 \ + --user="$instancename-koha.$instancename-koha" \ + -- \ + zebrasrv \ + -v none,fatal,warn \ + -f "/etc/koha/sites/$instancename/koha-conf.xml" && \ + return 0 + else + return 1 + fi +} + +usage() +{ + local scriptname=$0 + cat < Date: Mon, 29 Apr 2013 10:30:08 -0300 Subject: [PATCH 40/59] Bug 10144 - koha-start-zebra error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit koha-start-zebra now - Checks the instance exists. - Checks the instance is enabled. - Checks if the zebra daemon is already running. Regards To+ Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit 98bde26d2571b43ecee07e017e36f45e1aa6e680) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 6f40e7ebd667fbaf850046b8b4c3246e2dd3e170) Signed-off-by: Chris Cormack --- debian/scripts/koha-start-zebra | 126 ++++++++++++++++++++++++++++---- 1 file changed, 111 insertions(+), 15 deletions(-) diff --git a/debian/scripts/koha-start-zebra b/debian/scripts/koha-start-zebra index 52c604198c..b5e7c6ca75 100755 --- a/debian/scripts/koha-start-zebra +++ b/debian/scripts/koha-start-zebra @@ -1,6 +1,6 @@ #!/bin/sh # -# koha-start-zebra -- Start Zebra for named Koha instandes +# koha-start-zebra - Start Zebra for named Koha instances # Copyright 2010 Catalyst IT, Ltd # # This program is free software: you can redistribute it and/or modify @@ -18,20 +18,116 @@ set -e +die() +{ + echo "$@" 1>&2 + exit 1 +} + +warn() +{ + echo "$@" 1>&2 +} + +is_enabled() +{ + local instancename=$1 + + if ! is_instance $instancename; then + return 1 + fi + + if grep -q '^[[:space:]]*Include /etc/koha/apache-shared-disable.conf' \ + "/etc/apache2/sites-available/$instancename" ; then + return 1 + else + return 0 + fi +} + +is_instance() +{ + local instancename=$1 + + if find /etc/koha/sites -mindepth 1 -maxdepth 1 \ + -type d -printf '%f\n'\ + | grep -q -x $instancename ; then + return 0 + else + return 1 + fi +} + +is_zebra_running() +{ + local instancename=$1 + + if daemon --name="$instancename-koha-zebra" \ + --user="$instancename-koha.$instancename-koha" \ + --running ; then + return 0 + else + return 1 + fi +} + +start_zebra_instance() +{ + local instancename=$1 + + if is_enabled $instancename; then + echo "Starting Zebra server for $instancename" + daemon \ + --name="$instancename-koha-zebra" \ + --errlog="/var/log/koha/$instancename/zebra-error.log" \ + --stdout="/var/log/koha/$instancename/zebra.log" \ + --output="/var/log/koha/$instancename/zebra-output.log" \ + --verbose=1 \ + --respawn \ + --delay=30 \ + --user="$instancename-koha.$instancename-koha" \ + -- \ + zebrasrv \ + -v none,fatal,warn \ + -f "/etc/koha/sites/$instancename/koha-conf.xml" && \ + return 0 + else + return 1 + fi +} + +usage() +{ + local scriptname=$0 + cat < Date: Tue, 23 Apr 2013 13:29:02 -0300 Subject: [PATCH 41/59] Bug 10104 - make koha-disable more robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit koha-disable now: - checks for the existence of the instance before any actions on it. - checks if the instance is already disabled before touching anything (warns otherwise) - only reloads apache if needed - handles more than one instance name. - changed the docs to acknowledge the previous item. To test: - Apply the patch, build your package - Run koha-disable on - Non existent instance (try names that are prefix and suffix of a valid one too please) - Already disabled instance name. - Enabled instance name. It should work as expected and warn the user on the expected wrong cases. Regards To+ Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit b055f7d86c7772cf52c4a20d04a7e1cb0c8c19c9) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 3f03c2699062d399f3f7392acfd3e32b50cdf81a) Signed-off-by: Chris Cormack --- debian/docs/koha-disable.xml | 6 +-- debian/scripts/koha-disable | 71 +++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 9 deletions(-) diff --git a/debian/docs/koha-disable.xml b/debian/docs/koha-disable.xml index 1bc9ca3372..593a6a5d90 100644 --- a/debian/docs/koha-disable.xml +++ b/debian/docs/koha-disable.xml @@ -17,18 +17,18 @@ koha-disable - Disable a Koha instance. + Disable Koha instances. UNIX/Linux - koha-disable instancename + koha-disable instancename Description - Disable a Koha instance. + Disable Koha instances. See also diff --git a/debian/scripts/koha-disable b/debian/scripts/koha-disable index 5d7aa3661d..50785efd89 100755 --- a/debian/scripts/koha-disable +++ b/debian/scripts/koha-disable @@ -1,6 +1,6 @@ #!/bin/sh # -# koha-disable -- disable a Koha instance. +# koha-disable -- disable Koha instances. # Copyright 2010 Catalyst IT, Ltd # # This program is free software: you can redistribute it and/or modify @@ -20,20 +20,79 @@ set -e -die() { +die() +{ echo "$@" 1>&2 exit 1 } +warn() +{ + echo "$@" 1>&2 +} + +is_enabled() +{ + local instancename=$1 + + if ! is_instance $instancename; then + return 1 + fi + + if grep -q '^[[:space:]]*Include /etc/koha/apache-shared-disable.conf' \ + "/etc/apache2/sites-available/$instancename" ; then + return 1 + else + return 0 + fi +} + +is_instance() +{ + local instancename=$1 + + if find /etc/koha/sites -mindepth 1 -maxdepth 1 \ + -type d -printf '%f\n'\ + | grep -q -x $instancename ; then + return 0 + else + return 1 + fi +} + +disable_instance() +{ + local instancename=$1 + + if is_enabled $instancename; then + sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-disable.conf\)$:\1:' \ + "/etc/apache2/sites-available/$instancename" + return 0 + else + return 1 + fi +} # Parse command line. -[ "$#" = 1 ] || die "Usage: $0 instancename..." +[ "$#" > 1 ] || die "Usage: $0 instancename..." +restart_apache="no" for name in "$@" do - sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-disable.conf\)$:\1:' \ - "/etc/apache2/sites-available/$name" + if is_instance $name ; then + if disable_instance $name; then + restart_apache="yes" + else + warn "Instance $name already disabled." + fi + else + warn "Unknown instance $name." + fi done -/etc/init.d/apache2 restart +if [ "$restart_apache" = "yes" ]; then + /etc/init.d/apache2 restart +fi + +exit 0 From 5d450fe315e1ab1e406abcf4c6ac4c0c6f097964 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 29 Apr 2013 15:22:09 -0300 Subject: [PATCH 42/59] Bug 10104 - Followup: fix param check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As noted by Mason on bug 10101, the check was not working for zero arguments. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit ca118d57db383f5efebc4d53cba11ccc8af5c9a9) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 605d0a99b7d0fa91ed321c72c27111b1af7ceef4) Signed-off-by: Chris Cormack --- debian/scripts/koha-disable | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/scripts/koha-disable b/debian/scripts/koha-disable index 50785efd89..75e3997058 100755 --- a/debian/scripts/koha-disable +++ b/debian/scripts/koha-disable @@ -1,6 +1,6 @@ #!/bin/sh # -# koha-disable -- disable Koha instances. +# koha-disable - disable Koha instances. # Copyright 2010 Catalyst IT, Ltd # # This program is free software: you can redistribute it and/or modify @@ -73,8 +73,19 @@ disable_instance() fi } +usage() +{ + local scriptname=$0 + cat < 1 ] || die "Usage: $0 instancename..." +[ $# -ge 1 ] || ( usage ; die "Missing instance name..." ) restart_apache="no" From 9110f1c1ff3ce0f363a34be0cb8b9ed474fa1ba7 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 23 Apr 2013 11:03:44 -0300 Subject: [PATCH 43/59] Bug 10101 - make koha-enable more robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit koha-enable now: - checks for the existence of the instance before any other action on it. - checks if the instance is already enabled before changing stuff in the config files. - only reloads apache if it is needed! - handles more than one instance name as parameter (the code was there, a check for the cardinality of the args prevented it from working). - documents this behaviour change in the docs - doesn't break if the provided (invalid) instance name is a prefix/suffix of a real one (added -x to the relevant grep command). To test: - Aplpy the patch, build your packages - Run koha-enable on - Non existent instance (try using a prefix or a suffix of an already created one too). - Already enabled existent instance name. - Disabled instance. Regards To+ Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit 3bca90eb0c0fc91f64f3e479ac6ab25e54d4f1aa) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 97bf5b40c9da1ba4bca114185fb0770edfaf65f1) Signed-off-by: Chris Cormack --- debian/docs/koha-enable.xml | 6 ++-- debian/scripts/koha-enable | 68 ++++++++++++++++++++++++++++++++++--- 2 files changed, 66 insertions(+), 8 deletions(-) diff --git a/debian/docs/koha-enable.xml b/debian/docs/koha-enable.xml index db45daa9af..87f29badf6 100644 --- a/debian/docs/koha-enable.xml +++ b/debian/docs/koha-enable.xml @@ -17,18 +17,18 @@ koha-enable - Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + Enable one or more Koha instances. New instances are enabled by default. You only need this command if you have previously disabled an instance with koha-disable. UNIX/Linux - koha-enable instancename + koha-enable instancename Description - Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable. + Enable one or more Koha instances. New instances are enabled by default. You only need this command if you have previously disabled am instance with koha-disable. See also diff --git a/debian/scripts/koha-enable b/debian/scripts/koha-enable index 3ceef2ed12..01c2a859aa 100755 --- a/debian/scripts/koha-enable +++ b/debian/scripts/koha-enable @@ -20,20 +20,78 @@ set -e -die() { +die() +{ echo "$@" 1>&2 exit 1 } +warn() +{ + echo "$@" 1>&2 +} +is_enabled() +{ + local instancename=$1 + + if ! is_instance $instancename; then + return 1 + fi + + if grep -q '^[[:space:]]*Include /etc/koha/apache-shared-disable.conf' \ + "/etc/apache2/sites-available/$instancename" ; then + return 1 + else + return 0 + fi +} + +is_instance() +{ + local instancename=$1 + + if find /etc/koha/sites -mindepth 1 -maxdepth 1 \ + -type d -printf '%f\n'\ + | grep -q -x $instancename ; then + return 0 + else + return 1 + fi +} + +enable_instance() +{ + local instancename=$1 + + if ! is_enabled $instancename; then + sed -i 's:^\(\s*Include /etc/koha/apache-shared-disable.conf\)$:#\1:' \ + "/etc/apache2/sites-available/$instancename" + return 0 + else + return 1 + fi +} # Parse command line. -[ "$#" = 1 ] || die "Usage: $0 instancename..." +[ "$#" > 1 ] || die "Usage: $0 instancename..." +restart_apache="no" for name in "$@" do - sed -i 's:^\(\s*Include /etc/koha/apache-shared-disable.conf\)$:#\1:' \ - "/etc/apache2/sites-available/$name" + if is_instance $name ; then + if enable_instance $name; then + restart_apache="yes" + else + warn "Instance $name already enabled." + fi + else + warn "Unknown instance $name." + fi done -/etc/init.d/apache2 restart +if [ "$restart_apache" = "yes" ]; then + /etc/init.d/apache2 restart +fi + +exit 0 From c4c8642a69cfa6629d87503714ca65f1a5cfd1ee Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 29 Apr 2013 15:18:17 -0300 Subject: [PATCH 44/59] Bug 10101 - Follwup: fix param check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As Mason noted, there was an error on that line. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit 7d09198659c92eda7046dee0f93e4caf2ec37096) Signed-off-by: Jared Camins-Esakov (cherry picked from commit a4a270be68b7047ec6359847c1a462b7a82f6b67) Signed-off-by: Chris Cormack --- debian/scripts/koha-enable | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/scripts/koha-enable b/debian/scripts/koha-enable index 01c2a859aa..c0bbfa2627 100755 --- a/debian/scripts/koha-enable +++ b/debian/scripts/koha-enable @@ -72,8 +72,20 @@ enable_instance() return 1 fi } + +usage() +{ + local scriptname=$0 + cat < 1 ] || die "Usage: $0 instancename..." +[ $# -ge 1 ] || ( usage ; die "Missing instance name..." ) restart_apache="no" From db418b2011ce6091c79129e47c8dc354de45474b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 13 Apr 2013 21:10:33 -0300 Subject: [PATCH 45/59] Bug 10041 - Provide a koha-translate script to aid package users on installing translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until we have solved the packaging of koha template translations, provide a command that manages the installed translations in a proper way. To test, build a Debian package of current master+the patches from this bug :-D and try the many options running koha-translate --help provide. The command itself can be grabbed from a git checkout with this patch applied to test the script's funcionality. If it (and its docs) fits the package building stuff, I'll test on monday when I can be back on my workstation. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Bernardo Gonzalez Kriegel Comment: Good adition. Work as described. No errors. Copied to /usr/local/bin. No errors on install, update, remove, list and check. Passed-QA-by: Mason James Signed-off-by: Jared Camins-Esakov (cherry picked from commit 2cd5afa9741ef432a9f3ecac939c98e20d5ebfc5) Signed-off-by: Jared Camins-Esakov (cherry picked from commit cb321e5b10fc944d65d5b274e97e3506bd034396) Signed-off-by: Chris Cormack --- debian/docs/koha-translate.xml | 79 ++++++++++ debian/koha-common.install | 1 + debian/scripts/koha-translate | 256 +++++++++++++++++++++++++++++++++ 3 files changed, 336 insertions(+) create mode 100644 debian/docs/koha-translate.xml create mode 100755 debian/scripts/koha-translate diff --git a/debian/docs/koha-translate.xml b/debian/docs/koha-translate.xml new file mode 100644 index 0000000000..e06dede21f --- /dev/null +++ b/debian/docs/koha-translate.xml @@ -0,0 +1,79 @@ +
    +koha-translate + +Koha is the first free software library automation package. + + The Koha Community + http://koha-community.org/ + + + + + + + koha-translate + 8 + + + + koha-translate + Manage Koha templates translations + UNIX/Linux + + + + + koha-translate | | | | lang_code + koha-translate | | + + + + Options + + + + + (For use with --list) List the available language translations. + + + + + + Check if all the .PO files are present for the specified language. + + + + + + Install the specified lang_code language translation. + + + + + + List the installed or available (combined with -a) language translations. + + + + + + Remove the specified lang_code language translation. + + + + + + Update the specified lang_code language translation. + + + + + + + Description + Manage Koha templates translations. + + + + +
    diff --git a/debian/koha-common.install b/debian/koha-common.install index 2a5573e604..44f1ae0c97 100644 --- a/debian/koha-common.install +++ b/debian/koha-common.install @@ -27,6 +27,7 @@ debian/scripts/koha-run-backups usr/sbin debian/scripts/koha-shell usr/sbin debian/scripts/koha-start-zebra usr/sbin debian/scripts/koha-stop-zebra usr/sbin +debian/scripts/koha-translate usr/sbin debian/scripts/koha-upgrade-schema usr/sbin debian/scripts/koha-upgrade-to-3.4 usr/sbin debian/tmp_docbook/*.8 usr/share/man/man8 diff --git a/debian/scripts/koha-translate b/debian/scripts/koha-translate new file mode 100755 index 0000000000..0c731cf3e4 --- /dev/null +++ b/debian/scripts/koha-translate @@ -0,0 +1,256 @@ +#!/bin/sh +# +# koha-translate -- Manage Koha translations. +# Copyright 2013 Tomás Cohen Arazi +# Universidad Nacional de Córdoba +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +set -e + +usage() +{ + local scriptname=$(basename $0) + + cat <&2 + exit 1 +} + +list() +{ + all=$1 + + if [ "$all" != "" ]; then + print_available + else + print_installed + fi +} + +print_available() +{ + # Loop over only one opac theme + for i in $( ls $PO_DIR | grep opac-t-prog ); do + echo `basename $i -i-opac-t-prog-v-3006000.po` + done +} + +print_installed() +{ + ls $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/prog/ | \ + grep -v -e images -e itemtypeimg +} + +install_lang() +{ + lang=$1 + + if [ "$lang" != "" ]; then + + if [ "$lang" = "en" ]; then + die "Error: the default language (en) is already installed." + fi + + if print_available | grep -q $lang; then + if print_installed | grep -q $lang; then + die "Error: the selected language is already installed. Try --update if you want to re-install it." + else + # Check po files are present + check_lang_po_files $lang + env PERL5LIB="$KOHA_LIB_DIR:$TRANSLATE_DIR" KOHA_CONF="$KOHA_CONF_FILE"\ + $PERL_CMD $TRANSLATE_DIR/translate install $lang + fi + else + die "Error: the selected language is not currently available." + fi + + else + die "Error: no language code supplied." + fi +} + +update_lang() +{ + lang=$1 + + if [ "$lang" != "" ]; then + + if [ "$lang" = "en" ]; then + die "Error: the default language (en) cannot be updated." + fi + + if print_installed | grep -q $lang; then + # Check po files are present + check_lang_po_files $lang + remove_lang $lang + install_lang $lang + else + die "Error: the selected language is not currently installed. Try --install." + fi + else + die "Error: no language code supplied." + fi +} + +remove_lang() +{ + lang=$1 + + if [ "$lang" != "" ]; then + + if [ "$lang" = "en" ]; then + die "Error: the default language (en) cannot be removed." + fi + + if print_installed | grep -q $lang; then + rm -rf $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/prog/$lang + rm -rf $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/ccsr/$lang + rm -rf $KOHA_INSTALL_DIR/intranet/htdocs/intranet-tmpl/prog/$lang + else + die "Error: the selected language is not already installed." + fi + else + die "Error: no language code supplied." + fi +} + +check_lang_po_files() +{ + lang=$1 + + po_files="$PO_DIR/$lang-i-opac-t-prog-v-3006000.po + $PO_DIR/$lang-opac-ccsr.po + $PO_DIR/$lang-i-staff-t-prog-v-3006000.po + $PO_DIR/$lang-pref.po" + + if [ "$lang" != "" ]; then + + for po_file in $po_files; do + if [ ! -f $po_file ]; then + die "Error: $po_file not found." + fi + done + else + die "Error: no language code supplied." + fi +} + +set_action() +{ + if [ "$op" = "" ]; then + op=$1 + else + die "Error: only one action can be specified." + fi +} + +# Global PATH variables +KOHA_INSTALL_DIR="/usr/share/koha" +KOHA_LIB_DIR="/usr/share/koha/lib" +KOHA_CONF_FILE="/etc/koha/koha-conf-site.xml.in" +TRANSLATE_DIR="$KOHA_INSTALL_DIR/misc/translator" +PO_DIR="$TRANSLATE_DIR/po" +PERL_CMD=`which perl` + +# Control variables +list_all="" +op="" +language="" + +# We accept at most 2 parameters +[ $# -ge 1 ] && [ $# -le 3 ] || ( usage ; die "Error: wrong parameters" ) + +# Read parameters +while [ $# -gt 0 ]; do + + case "$1" in + -h|--help) + op="help" + break ;; + -c|--check) + set_action "check" + shift ;; + -i|--install) + set_action "install" + shift ;; + -u|--update) + set_action "update" + shift ;; + -r|--remove) + set_action "remove" + shift ;; + -l|--list) + set_action "list" + shift ;; + -a|--available) + list_all=1 + shift ;; + -*) + usage + die "Error: unknown parameter $1." ;; + *) + language=$1 + shift ;; + esac + +done + +# Process the requested actions +case $op in + "help") + usage ;; + "list") + list $list_all ;; + "install") + install_lang $language ;; + "update") + update_lang $language ;; + "remove") + remove_lang $language ;; + "check") + check_lang_po_files $language ;; + *) + usage + die "Error: wrong parameters..." ;; +esac + +exit 0 From 6f9b6a0c8e3518e57467de4dc6f4d36472e6f557 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Mon, 10 Dec 2012 18:57:04 +1300 Subject: [PATCH 46/59] Bug 9250 - [SIGNED-OFF] provide commands to manage the SIP server This adds commands required to control the SIP server. These commands are: * koha-enable-sip - copies the SIP config to the sites directory * koha-start-sip - starts the SIP server processes * koha-stop-sip - stops the SIP server processes It also calls these as appropriate from the koha-common init script. To use: 1) sudo koha-enable-sip instancename 2) sudo vim /etc/koha/sites/instancename/SIPconfig.xml Do whatever is needed for your site's SIP configuration 3) sudo koha-start-sip instancename To test: 1) Build packages with this patch 2) Ensure that sudo koha-start-sip instancename doesn't do anything 3) Run sudo koha-enable-sip instancename 4) Edit /etc/koha/sites/instancename/SIPconfig.xml if needed (probably not required for testing) 5) Run sudo koha-start-sip instancename 6) Note that the sip processes are now running 7) Run sudo koha-stop-sip instancename 8) Note that the sip processes have gone 9) Reboot your Koha server 10) Note that the sip processes are back Sponsored-By: Waitaki District Council Libraries Sponsored-By: South Taranaki District Council Libraries Sponsored-By: Horowhenua District Council Libraries Sponsored-By: Rangitikei District Council Libraries Signed-off-by: Magnus Enger Works as advertised. koha-start-sip without a prior koha-enable-sip does nothing. koha-enable-sip copies the SIP config file to the instance directory. After koha-enable-sip, koha-start-sip and koha-stop-sip works as expected. After a reboot, the SIP processes are still running. I have not actually tested the SIP servers after they have been started, but assume they work the same as always. The man pages look good. The new commands should also have been added to the man page for koha-common. I'll do a followup for that. Signed-off-by: Jared Camins-Esakov (cherry picked from commit 3dc22e7fb27162b3a461477bc40f5c38a1739516) Signed-off-by: Jared Camins-Esakov (cherry picked from commit c70fb0fcd625701d0f3d01f0c8faa17468bba54c) Signed-off-by: Chris Cormack --- debian/docs/koha-enable-sip.xml | 57 +++++++++++++++++++++++++++++++++ debian/docs/koha-start-sip.xml | 53 ++++++++++++++++++++++++++++++ debian/docs/koha-stop-sip.xml | 52 ++++++++++++++++++++++++++++++ debian/koha-common.init | 4 +++ debian/koha-common.install | 3 ++ debian/scripts/koha-enable-sip | 38 ++++++++++++++++++++++ debian/scripts/koha-start-sip | 49 ++++++++++++++++++++++++++++ debian/scripts/koha-stop-sip | 52 ++++++++++++++++++++++++++++++ 8 files changed, 308 insertions(+) create mode 100644 debian/docs/koha-enable-sip.xml create mode 100644 debian/docs/koha-start-sip.xml create mode 100644 debian/docs/koha-stop-sip.xml create mode 100755 debian/scripts/koha-enable-sip create mode 100755 debian/scripts/koha-start-sip create mode 100755 debian/scripts/koha-stop-sip diff --git a/debian/docs/koha-enable-sip.xml b/debian/docs/koha-enable-sip.xml new file mode 100644 index 0000000000..3ce3b09b30 --- /dev/null +++ b/debian/docs/koha-enable-sip.xml @@ -0,0 +1,57 @@ +
    +koha-enable-sip + + Koha is the first free software library automation package. + + + Robin + Sheat + + + Catalyst IT + http://www.catalyst.net.nz + + Author + + + + + + + koha-enable-sip + 8 + + + + koha-enable-sip + Copies the SIP configuration file to allow SIP to be controlled by init scripts. + UNIX/Linux + + + + + koha-enable-sip + instancename + + + + Description + This copies the default SIP configuration file /etc/koha/SIPconfig.xml to the + /etc/koha/sites/instancename directory. This allows it to be started by + koha-start-sip(8), and koha-stop-sip. In turn, + this means that it will be started on boot and stopped on shutdown. + After running this, you will need to edit the newly created file to configure it + for your site. + To disable SIP again, delete or rename the configuration file. + + + See also + + koha-start-sip(8) + koha-stop-sip(8) + + + + + +
    diff --git a/debian/docs/koha-start-sip.xml b/debian/docs/koha-start-sip.xml new file mode 100644 index 0000000000..b6a18dd848 --- /dev/null +++ b/debian/docs/koha-start-sip.xml @@ -0,0 +1,53 @@ +
    +koha-start-sip + + Koha is the first free software library automation package. + + + Robin + Sheat + + + Catalyst IT + http://www.catalyst.net.nz + + Author + + + + + + + koha-start-sip + 8 + + + + koha-start-sip + Starts the SIP daemon for the specified Koha instances. + UNIX/Linux + + + + + koha-start-sip + instancename + + + + Description + This will start the SIP daemon for the Koha instance specified by instancename. + If the SIP configuration is not present for the supplied instance, it will be silently skipped. + To enable SIP support for an instance, refer to koha-enable-sip(8). + + + See also + + koha-stop-sip(8) + koha-enable-sip(8) + + + + + +
    diff --git a/debian/docs/koha-stop-sip.xml b/debian/docs/koha-stop-sip.xml new file mode 100644 index 0000000000..3e5a1793fa --- /dev/null +++ b/debian/docs/koha-stop-sip.xml @@ -0,0 +1,52 @@ +
    +koha-stop-sip + + Koha is the first free software library automation package. + + + Robin + Sheat + + + Catalyst IT + http://www.catalyst.net.nz + + Author + + + + + + + koha-stop-sip + 8 + + + + koha-stop-sip + Stops the SIP daemon for the specified Koha instances. + UNIX/Linux + + + + + koha-stop-sip + instancename + + + + Description + This will stop the SIP daemon for the Koha instance specified by instancename. + If it's not running, an note will be displayed. + + + See also + + koha-start-sip(8) + koha-enable-sip(8) + + + + + +
    diff --git a/debian/koha-common.init b/debian/koha-common.init index 5be77d36b9..9a285a36ac 100755 --- a/debian/koha-common.init +++ b/debian/koha-common.init @@ -45,6 +45,7 @@ do_start() # We insure all required directories exist, including disabled ones. koha-create-dirs $(koha-list) koha-start-zebra $(koha-list --enabled) + koha-start-sip $(koha-list --enabled) } # @@ -54,6 +55,7 @@ do_stop() { # We stop everything, including disabled ones. koha-stop-zebra $(koha-list) || true + koha-stop-sip $(koha-list) || true } # @@ -61,6 +63,8 @@ do_stop() # do_reload() { koha-restart-zebra $(koha-list --enabled) + koha-stop-sip $(koha-list) || true + koha-start-sip $(koha-list --enabled) } case "$1" in diff --git a/debian/koha-common.install b/debian/koha-common.install index 44f1ae0c97..e1b2e2bf9a 100644 --- a/debian/koha-common.install +++ b/debian/koha-common.install @@ -30,4 +30,7 @@ debian/scripts/koha-stop-zebra usr/sbin debian/scripts/koha-translate usr/sbin debian/scripts/koha-upgrade-schema usr/sbin debian/scripts/koha-upgrade-to-3.4 usr/sbin +debian/scripts/koha-start-sip usr/sbin +debian/scripts/koha-stop-sip usr/sbin +debian/scripts/koha-enable-sip usr/sbin debian/tmp_docbook/*.8 usr/share/man/man8 diff --git a/debian/scripts/koha-enable-sip b/debian/scripts/koha-enable-sip new file mode 100755 index 0000000000..1bcdd97571 --- /dev/null +++ b/debian/scripts/koha-enable-sip @@ -0,0 +1,38 @@ +#!/bin/sh +# +# koha-enable-sip -- Set up the config files to allow SIP to run +# Copyright 2012 Catalyst IT, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set -e + +for name in "$@" +do + if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; + then + echo "No such instance: ${name}" > /dev/stderr + continue; + fi + sipfile=/etc/koha/sites/${name}/SIPconfig.xml + if [ -e ${sipfile} ] + then + echo "SIP already enabled for $name" + else + echo "Enabling SIP for $name - edit ${sipfile} to configure" + cp -v /etc/koha/SIPconfig.xml ${sipfile} + chown ${name}-koha:${name}-koha ${sipfile} + chmod 600 ${sipfile} + fi +done diff --git a/debian/scripts/koha-start-sip b/debian/scripts/koha-start-sip new file mode 100755 index 0000000000..791c6d3502 --- /dev/null +++ b/debian/scripts/koha-start-sip @@ -0,0 +1,49 @@ +#!/bin/sh +# +# koha-start-sip -- Start SIP server for named Koha instance +# Copyright 2012 Catalyst IT, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set -e + +for name in "$@" +do + if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; + then + echo "No such instance: ${name}" > /dev/stderr + continue; + fi + [ -e /etc/koha/sites/${name}/SIPconfig.xml ] || continue + echo "Starting SIP server for $name" + mkdir -p /var/run/koha/${name} + chown "${name}-koha:${name}-koha" /var/run/koha/${name} + export KOHA_CONF PERL5LIB + KOHA_CONF=/etc/koha/sites/${name}/koha-conf.xml + PERL5LIB="/usr/share/koha/lib:/usr/share/koha/lib/C4/SIP" + daemon \ + --name="$name-koha-sip" \ + --errlog="/var/log/koha/$name/sip-error.log" \ + --stdout="/var/log/koha/$name/sip.log" \ + --output="/var/log/koha/$name/sip-output.log" \ + --verbose=1 \ + --respawn \ + --delay=30 \ + --pidfiles="/var/run/koha/${name}" \ + --user="$name-koha.$name-koha" \ + -- \ + perl \ + "/usr/share/koha/lib/C4/SIP/SIPServer.pm" \ + "/etc/koha/sites/${name}/SIPconfig.xml" +done diff --git a/debian/scripts/koha-stop-sip b/debian/scripts/koha-stop-sip new file mode 100755 index 0000000000..b0cbbe9614 --- /dev/null +++ b/debian/scripts/koha-stop-sip @@ -0,0 +1,52 @@ +#!/bin/sh +# +# koha-stop-sip -- Stop SIP server for named Koha instance +# Copyright 2012 Catalyst IT, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set -e + +for name in "$@" +do + if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; + then + echo "No such instance: ${name}" > /dev/stderr + continue; + fi + if [ ! -e /var/run/koha/${name}/${name}-koha-sip.pid ] ; + then + echo "SIP server for ${name} not running." + continue; + fi + echo "Stopping SIP server for $name" + KOHA_CONF=/etc/koha/sites/${name}/koha-conf.xml + PERL5LIB=/usr/share/koha/lib + export KOHA_CONF PERL5LIB + daemon \ + --name="$name-koha-sip" \ + --errlog="/var/log/koha/$name/sip-error.log" \ + --stdout="/var/log/koha/$name/sip.log" \ + --output="/var/log/koha/$name/sip-output.log" \ + --verbose=1 \ + --respawn \ + --delay=30 \ + --pidfiles="/var/run/koha/${name}" \ + --user="$name-koha.$name-koha" \ + --stop \ + -- \ + perl \ + "/usr/share/koha/lib/C4/SIP/SIPServer.pm" \ + "/etc/koha/sites/${name}/SIPconfig.xml" +done From 8f95f166b4b0f8591222403933e09aa38a459622 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 5 Mar 2013 13:49:11 +0100 Subject: [PATCH 47/59] Bug 9250 - Followup to add koha-*-sip commands to koha-common.xml The original patch for Bug 9250 did not add the new commands to debian/docs/koha-common.xml, which functions as a sort of table of contents for the real commands. This patch adds them. Signed-off-by: Robin Sheat Simple documentation patch Signed-off-by: Jared Camins-Esakov (cherry picked from commit 38b1fd99c4e3a2ae3a944c5ba0b17189da3feef5) Signed-off-by: Jared Camins-Esakov (cherry picked from commit cdfca5bb6b6a25619216e579f2cdf5bdaa14f990) Signed-off-by: Chris Cormack --- debian/docs/koha-common.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/debian/docs/koha-common.xml b/debian/docs/koha-common.xml index 39da872491..d602aa9f66 100644 --- a/debian/docs/koha-common.xml +++ b/debian/docs/koha-common.xml @@ -167,6 +167,32 @@ + SIP2-related + + + + + + Copies the SIP configuration file to allow SIP to be controlled by init scripts. + + + + + + + Starts the SIP daemon for the specified Koha instances. + + + + + + + Stops the SIP daemon for the specified Koha instances. + + + + + Misc From b9b573badc1e2652021a88a4f35d677090e6c367 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 26 Apr 2013 13:59:18 +0200 Subject: [PATCH 48/59] Bug 10044: Remove duplicate pagination on the pending orders page. Test plan: Check that there is just one pagination on the pending orders page. Signed-off-by: Mathieu Saby Signed-off-by: Katrin Fischer Works and deletes the old pagination that was replaced by datatables. Signed-off-by: Jared Camins-Esakov (cherry picked from commit 7b0b6e32d1462fab10257769c417f014b0819135) Signed-off-by: Jared Camins-Esakov (cherry picked from commit e61c1e0810528cdaf1db99a4ec70bd96e607021a) Signed-off-by: Chris Cormack --- acqui/parcel.pl | 40 +------------------ .../prog/en/modules/acqui/parcel.tt | 19 +-------- 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 15578a912f..8e82283279 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -136,10 +136,6 @@ my $datereceived = C4::Dates->new(); my $code = $input->param('code'); my @rcv_err = $input->param('error'); my @rcv_err_barcode = $input->param('error_bc'); -my $startfrom=$input->param('startfrom'); -my $resultsperpage = $input->param('resultsperpage'); -$resultsperpage = 20 unless ($resultsperpage); -$startfrom=0 unless ($startfrom); @@ -281,40 +277,7 @@ if(!defined $invoice->{closedate}) { my $budget = GetBudget( $line{budget_id} ); $line{budget_name} = $budget->{'budget_name'}; - push @loop_orders, \%line if ($i >= $startfrom and $i < $startfrom + $resultsperpage); - } - - my $count = $countpendings; - - if ($count>$resultsperpage){ - my $displaynext=0; - my $displayprev=$startfrom; - if(($count - ($startfrom+$resultsperpage)) > 0 ) { - $displaynext = 1; - } - - my @numbers = (); - for (my $i=1; $i<$count/$resultsperpage+1; $i++) { - my $highlight=0; - ($startfrom/$resultsperpage==($i-1)) && ($highlight=1); - push @numbers, { number => $i, - highlight => $highlight , - startfrom => ($i-1)*$resultsperpage}; - } - - my $from = $startfrom*$resultsperpage+1; - my $to; - if($count < (($startfrom+1)*$resultsperpage)){ - $to = $count; - } else { - $to = (($startfrom+1)*$resultsperpage); - } - $template->param(numbers=>\@numbers, - displaynext=>$displaynext, - displayprev=>$displayprev, - nextstartfrom=>(($startfrom+$resultsperpage<$count)?$startfrom+$resultsperpage:$count), - prevstartfrom=>(($startfrom-$resultsperpage>0)?$startfrom-$resultsperpage:0) - ); + push @loop_orders, \%line; } $template->param( @@ -337,7 +300,6 @@ $template->param( book_foot_loop => \@book_foot_loop, totalprice => sprintf($cfstr, $totalprice), totalquantity => $totalquantity, - resultsperpage => $resultsperpage, (uc(C4::Context->preference("marcflavour"))) => 1, total_quantity => $total_quantity, total_gste => sprintf( "%.2f", $total_gste ), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index bed581eb98..46057909bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -275,23 +275,8 @@ [% END %] - [% ELSE %]There are no pending orders.[% END %] -
    - - [% IF ( displayprev ) %] - << Previous - [% END %] - [% FOREACH number IN numbers %] - [% IF ( number.highlight ) %] - [% number.number %] - [% ELSE %] - [% number.number %] - [% END %] - [% END %] - [% IF ( displaynext ) %] - Next >> - [% END %] -
    + + [% ELSE %]There are no pending orders.[% END %]
    [% ELSE %]

    From f729aa573775269ba88e903ca23ed985cc102a2f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 29 Apr 2013 12:29:40 -0300 Subject: [PATCH 49/59] Bug 10150 - koha-email-disable error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit koha-email-disable now - Checks the instance exists. - Checks if email is already disabled. Regards To+ Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack Signed-off-by: Mason James Signed-off-by: Galen Charlton (cherry picked from commit 31b43ac1fe6830426c80988b93bc15d0fa88e79a) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 72961866afc155327dee10d1a2c4dfbac9075159) Signed-off-by: Chris Cormack --- debian/docs/koha-email-disable.xml | 4 +- debian/scripts/koha-email-disable | 81 +++++++++++++++++++++++++----- 2 files changed, 71 insertions(+), 14 deletions(-) diff --git a/debian/docs/koha-email-disable.xml b/debian/docs/koha-email-disable.xml index 81834f2f86..d901123874 100644 --- a/debian/docs/koha-email-disable.xml +++ b/debian/docs/koha-email-disable.xml @@ -17,7 +17,7 @@ koha-email-disable - Turn off the email for a Koha instance. + Turn off the email for Koha instances. UNIX/Linux @@ -28,7 +28,7 @@ Description - Turn off the email for a Koha instance. + Turn off the email for Koha instances. See also diff --git a/debian/scripts/koha-email-disable b/debian/scripts/koha-email-disable index 5d381cb3d9..615f4f472f 100755 --- a/debian/scripts/koha-email-disable +++ b/debian/scripts/koha-email-disable @@ -1,6 +1,6 @@ #!/bin/sh # -# koha-email-disable -- turn off the email for a Koha instance +# koha-email-disable - turn off the email for Koha instances # Copyright 2010 Catalyst IT, Ltd # # This program is free software: you can redistribute it and/or modify @@ -18,19 +18,76 @@ set -e -if [ "$#" = 0 ] -then - echo "Disables the email for a koha instance." 1>&2 - echo "Usage: $0 instancename..." 1>&2 +die() +{ + echo "$@" 1>&2 exit 1 -fi -libdir=/var/lib/koha +} + +warn() +{ + echo "$@" 1>&2 +} + +is_instance() +{ + local instancename=$1 + + if find /etc/koha/sites -mindepth 1 -maxdepth 1 \ + -type d -printf '%f\n'\ + | grep -q -x $instancename ; then + return 0 + else + return 1 + fi +} + +is_email_enabled() +{ + local instancename=$1 + + if [ -e /var/lib/koha/$instancename/email.enabled ]; then + return 0 + else + return 1 + fi +} + +disable_email() +{ + local instancename=$1 + local libdir="/var/lib/koha" + + rm -f $libdir/$instancename/email.enabled + + echo "Disabled email for instance $instancename." +} + +usage() +{ + local scriptname=$0 + cat <&2 - continue + if is_instance $name; then + if is_email_enabled $name; then + disable_email $name + else + warn "Email already disabled for instance $name." + fi + else + warn "Unknown instance $name." fi - rm -f $libdir/$name/email.enabled done + +exit 0 From f180615b0f2f75fb195fa40ce215806c65da904c Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Mon, 7 Jan 2013 19:10:56 -0300 Subject: [PATCH 50/59] Bug 9358 - Fixed field plugins for MARC21 should be updated for MARC21 update #15 This patch, together with 9357, fix plugins for leader, 006, 007 and 008 MARC21 fields Leader18 c and i is fixed on Bug 9357 Added missing/renamed fields on 007 Options 'o' and 'q' already present on 006 and 008, fixing spaces and removing unnecessary descriptions. To test: 1) Catalog/edit a record 2) On 007 value builder, check missing values on 008, BKS, check for example 33- Literary form, i- Letters has a description 3) Apply the patch 4) Clean your browser cache 5) On 007 value builder, new values are present On 008/6 descriptions are absent Signed-off-by: Galen Charlton Signed-off-by: Katrin Fischer Works as described. Signed-off-by: Jared Camins-Esakov (cherry picked from commit 67dae3abd4bbd5394c62eaeccfa67d9c0220a627) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 75b662028ae825bb2db4801132bb23707af7db53) Signed-off-by: Chris Cormack --- .../value_builder/marc21_field_006.xml | 198 ++++++------ .../value_builder/marc21_field_007.tt | 301 +++++++++++++++++- .../value_builder/marc21_field_008.xml | 292 ++++++++--------- 3 files changed, 544 insertions(+), 247 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml index e6cf2f55d7..8613a3c1c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml @@ -1,5 +1,5 @@ - + a @@ -51,25 +51,25 @@ # - 2 + 2 5 6 - a + a b c - d + d e f g - i + i j k - l - m - n - o + l + m + n + o p - q + q r s t @@ -77,14 +77,14 @@ v w y - z + z | # a c - f + f i l m @@ -117,9 +117,9 @@ e f h - i - j - m + i + j + m p s u @@ -136,7 +136,7 @@ - m + m @@ -158,10 +158,10 @@ | - + a b - c + c d e f @@ -179,7 +179,7 @@ # a c - f + f i l m @@ -197,7 +197,7 @@ f - # + # a b c @@ -207,14 +207,14 @@ g i j - k + k m z |||| ## - aa + aa ab ac ad @@ -226,49 +226,49 @@ ap au az - ba + ba bb bc bd - be - bf - bg + be + bf + bg bh - bi - bj + bi + bj bk bl bo - br + br bs bu bz ca - cb + cb cc ce cp cu cz - da - db - dc + da + db + dc dd de - df - dg + df + dg dh - dl + dl zz | a - b - c + b + c d - e + e f g u @@ -280,7 +280,7 @@ # a c - f + f i l m @@ -296,11 +296,11 @@ b c d - f - o - q + f + o + q r - s + s | @@ -335,12 +335,12 @@ an bd bg - bl - bt + bl + bt ca cb cc - cg + cg ch cl cn @@ -356,13 +356,13 @@ fg fl fm - ft + ft gm hy jz mc md - mi + mi mo mp mr @@ -372,7 +372,7 @@ nc nn op - or + or ov pg pm @@ -382,18 +382,18 @@ ps pt pv - rc + rc rd rg - ri + ri rp - rq + rq sd sg - sn + sn sp st - su + su sy tc tl @@ -449,11 +449,11 @@ b c d - f - o - q + f + o + q r - s + s | @@ -473,12 +473,12 @@ z | - + # a b c - d + d e f g @@ -511,7 +511,7 @@ - s + s # @@ -537,7 +537,7 @@ n - r + r u x | @@ -560,10 +560,10 @@ c d e - f - o + f + o q - s + s | @@ -572,28 +572,28 @@ b c d - f - o + f + o q r - s + s | # 5 6 - a + a b c - d + d e f g h - i + i k - l + l m n o @@ -602,7 +602,7 @@ r s t - u + u v w y @@ -613,17 +613,17 @@ # 5 6 - a + a b c - d + d e f g h - i + i k - l + l m n o @@ -642,7 +642,7 @@ # a c - f + f i l m @@ -659,7 +659,7 @@ - # + # a b c @@ -668,18 +668,18 @@ f g h - i - j + i + j k - l + l u z | - 0 - 1 - 2 + 0 + 1 + 2 | @@ -690,7 +690,7 @@ o r - + 000 001-999 nnn @@ -715,7 +715,7 @@ # a c - f + f i l m @@ -731,19 +731,19 @@ b c d - f - o - q + f + o + q r - s + s | - a - b + a + b c - d + d f g i @@ -754,7 +754,7 @@ o p q - r + r s t v @@ -783,11 +783,11 @@ b c d - f - o + f + o q r - s + s | diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt index 62377885dd..b5d22fa413 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt @@ -362,6 +362,15 @@ function RedrawChoices(typ){ _("g- Textiles") + ' \ [% END %] \ + [% IF ( f4i ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f4j ) %] \ \ [% END %] \ + [% IF ( f4l ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f4n ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f4p ) %] \ \ [% END %] \ + [% IF ( f4v ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f4w ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f4y ) %] \ \ [% END %] \ + [% IF ( f1d ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f1e ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f1f ) %] \ \ [% END %] \ + [% IF ( f1k ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f1m ) %] \ \ [% END %] \ + [% IF ( f4i ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f4l ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f4n ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f4p ) %] \ \ [% END %] \ + [% IF ( f4v ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f4w ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f4z ) %] \ \ [% ELSE %] \ \ [% END %] \ [% IF ( f1o ) %] \ @@ -3456,6 +3573,24 @@ function RedrawChoices(typ){ _("g- Microopaque") + ' \ [% END %] \ + [% IF ( f1h ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ + [% IF ( f1j ) %] \ + \ + [% ELSE %] \ + \ + [% END %] \ [% IF ( f1u ) %] \ "; + strInnerHTML += ""; } nodeValue = nodeValue.nextSibling; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml index 8613a3c1c6..6167be6ebf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml @@ -1,795 +1,795 @@ - - - a - t + Books + Form of material + Language material + Manuscript language material - - # - a - b - c - d - e - f - g - h - i - j - k - l - m - o - p - | + IllustrationsUp to four (4) one-character alphabetic codes (recorded in alphabetical order) that indicate the presence of types of illustrations in the item. If fewer than four alphabetic codes are assigned, the codes are left justified and unused positions contain blanks (#) + No illustrations + Illustrations + Maps + Portraits + Charts + Plans + Plates + Music + Facsimiles + Coats of arms + Genealogical tables + Forms + Samples + Phonodisc, phonowire, etc + Photographs + Illuminations + No attempt to code - - # - a - b - c - d - e - f - g - j - | + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne character alphabetic code that specifies the form of material for the item + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - # - 2 - 5 - 6 - a - b - c - d - e - f - g - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - y - z - | + Nature of contentsUp to four one-character codes that indicate whether a significant part of the item is or contains certain types of material. If fewer than four codes are assigned, the codes are left justified and unused positions contain blanks (#) + No specified nature of contents + Offprints + Calendars + Comics/graphic novels + Abstracts/summaries + Bibliographies + Catalogs + Dictionaries + Encyclopedias + Handbooks + Legal articles + Indexes + Patent document + Discographies + Legislation + Theses + Surveys of literature in a subject area + Reviews + Programmed texts + Filmographies + Directories + Statistics + Technical reports + Standars/specifications + Legal cases and case notes + Law reports and digests + Yearbooks + Treaties + No attempt to code - - # - a - c - f - i - l - m - o - s - u - z - | + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - 0 - 1 - | + Conference publicationOne-character code that indicates whether the item consists of the proceedings, reports, or summaries of a conference. + Not a conference publication + Conference + No attempt to code - - 0 - 1 - | + FestschriftOne-character code that indicates whether the item is a festschrift + Not a festschrift + Festschrift + No attempt to code - - 0 - 1 - | + IndexOne-character numeric code that indicates whether the item includes an index to its own contents + No index + Index present + No attempt to code - - - 0 - 1 - d - e - f - h - i - j - m - p - s - u - | + UndefinedContains a blank (#) or a fill character (|). + Literary formOne-character code used to indicate the literary form of an item. Numeric codes 0 and 1 provide a generic identification of whether or not the item is a work of fiction. Alphabetic codes may be used to identify specific literary forms. + Not fiction (not further specified) + Fiction (not further specified) + Dramas + Essays + Novels + Humor, satires, etc. + Letters + Short stories + Mixed forms + Poetry + Speeches + Unknown + No attempt to code - - # - a - b - c - d - | + BiographyOne-character alphabetic code that indicates whether or not an item contains biographical material, and if so, what the biographical characteristics are. + No biographical material + Autobiography + Individual biography + Collective biography + Contains biographical information + No attempt to code - - - m + Computer Files + Form of material + Computer file/Electronic resource - - - # - a - b - c - d - e - f - g - j - | + UndefinedEach one contains a blank (#) or a fill character (|) + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - # - o - q - | + Form of itemOne-character alphabetic code that specifies the form of material for the item + Unknown or not specified + Online + Direct electronic + No attempt to code - - - a - b - c - d - e - f - g - h - i - j - m - u - z - | + UndefinedTwo undefined character positions; each contains a blank (#) or a fill character (|). + Type of computer fileOne-character alphabetic code that indicates the type of computer file described in the bibliographic record + Numeric data + Computer program + Representational + Document + Bibliographic data + Font + Game + Sound + Interactive multimedia + Online system or service + Combination + Unknown + Other + No attempt to code - - - # - a - c - f - i - l - m - o - s - u - z - | + UndefinedOne-character code that contains a blank (#) or a fill character (|). + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - + UndefinedSix undefined character positions; each contains a blank (#) or a fill character (|). - - - e - f + Maps + Form of material + Cartographic material + Manuscript cartographic material - - # - a - b - c - d - e - f - g - i - j - k - m - z - |||| + ReliefUp to four one-character alphabetic codes that indicate the relief type specified on the item. Codes are recorded in order of their importance to the described item. If fewer than four codes are assigned, the codes are left justified and each unused position contains a blank (#). + No relief shown + Contours + Shading + Gradient and bathymetric tints + Hachures + Bathymetry/soundings + Form lines + Spot heights + Pictorially + Land forms + Bathymetry/isolines + Rock drawings + Other + No attempt to code - - ## - aa - ab - ac - ad - ae - af - ag - am - an - ap - au - az - ba - bb - bc - bd - be - bf - bg - bh - bi - bj - bk - bl - bo - br - bs - bu - bz - ca - cb - cc - ce - cp - cu - cz - da - db - dc - dd - de - df - dg - dh - dl - zz - | + ProjectionTwo-character alphabetic code that indicates the projection used in producing the item. + Projection not specified + Aitoff + Gnomic + Lambert's azimuthal equal area + Orthographic + Azimuthal equidistant + Stereographic + General vertical near-sided + Modified stereographic for Alaska + Chamberlin trimetric + Polar stereographic + Azimuthal, specific type unknown + Azimutal, other + Gall + Goode's homolographic + Lambert's cylindrical equal area + Mercator + Miller + Mollweide + Sinusoidal + Transverse Mercator + Gauss-Kruger + Equirectangular + Krovak + Cassini-Soldner + Oblique Mercator + Robinson + Space oblique Mercator + Cylindrical, specific type unknown + Cylindrical, other + Albers equal area + Bonne + Lambert's conformal conic + Equidistant conic + Polyconic + Conic, specific type unknown + Conic, other + Armadillo + Butterfly + Eckert + Goode's homolosine + Miller's bipolar oblique conformal conic + Van Der Grinten + Dimaxión + Cordiform + Lambert conformal + Other + No attempt to code - - - a - b - c - d - e - f - g - u - z - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Type of cartographic materialOne-character alphabetic code that indicates the type of cartographic item described. + Single map + Map Series + Map serial + Globe + Atlas + Separate supplement to another work + Bound as part of another work + Unknown + Other + No attempt to code - - - # - a - c - f - i - l - m - o - s - u - z - | + UndefinedEach contains a blank (#) or a fill character (|) + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that indicates the form of material for the item. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - - 0 - 1 - | + UndefinedContains a blank (#) or a fill character (|). + IndexOne-character numeric code that indicates whether the item or accompanying material includes a location index or gazetteer. + No index + Index present + No attempt to code - - - # - e - j - k - l - n - o - p - r - z - | + UndefinedContains a blank (#) or a fill character (|). + Special format characteristicsUp to two one-character alphabetic codes that indicate the special format characteristics of the map. Codes are recorded in order of their importance to the described item. If only one code is assigned, it is left justified and the unused position contains a blank (#). + No specified special format characteristics + Manuscript + Picture card, post card + Calendar + Puzzle + Game + Wall map + Playing cards + Loose-leaf + Other + No attempt to code - - - c - d - i - j + Music + Form of material + Notated music + Manuscript notated music + Nonmusical sound recording + Musical sound recording - - an - bd - bg - bl - bt - ca - cb - cc - cg - ch - cl - cn - co - cp - cr - cs - ct - cy - cz - df - dv - fg - fl - fm - ft - gm - hy - jz - mc - md - mi - mo - mp - mr - ms - mu - mz - nc - nn - op - or - ov - pg - pm - po - pp - pr - ps - pt - pv - rc - rd - rg - ri - rp - rq - sd - sg - sn - sp - st - su - sy - tc - tl - ts - uu - vi - vr - wz - za - zz - || + Form of composition + Anthems + Ballads + Bluegrass music + Blues + Ballets + Chaconnes + Chants, Other religions + Chants, Christian + Concerti grossi + Chorales + Chorale preludes + Canons and rounds + Concertos + Chansons, polyphonic + Carols + Chance compositions + Cantatas + Country music + Canzonas + Dance forms + Divertimentos, serenades, cassations, divertissements, and notturni + Fugues + Flamenco + Folk music + Fantasias + Gospel music + Hymns + Jazz + Musical revues and comedies + Madrigals + Minuets + Motets + Motion picture music + Marches + Masses + Multiple forms + Mazurkas + Nocturnes + Not applicable + Operas + Oratorios + Overtures + Program music + Passion music + Polonaises + Popular music + Preludes + Passacaglias + Part-songs + Pavans + Rock music + Rondos + Ragtime music + Ricercars + Rhapsodies + Requiems + Square dance music + Songs + Sonatas + Symphonic poems + Studies and exercises + Suites + Symphonies + Toccatas + Teatro lirico + Trio-sonatas + Unknown + Villacincos + Variations + Waltzers + Zarzuelas + Other + No attempt to code - - a - b - c - d - e - g - h - i - j - m - n - u - z - | + Format of musicOne-character code that indicates the format of a musical composition (e.g., piano-conductor score). + Full score + Full score, miniature or study size + Accompaniment reduced for keyboard + Voice score + Condensed score or piano-conductor score + Close score + Chorus score + Condensed score + Performer-conductor part + Multiple score formats + Not applicable + Unknown + Other + No attempt to code - - # - d - e - f - n - u - | + Music Parts + No parts in hand or not specified + Instrumental and vocal parts + Instrumental parts + Vocal parts + Not applicable + Unknown + No attempt to code - - # - a - b - c - d - e - f - g - j - | + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that indicates the form of material for the item. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - # - a - b - c - d - e - f - g - h - i - k - r - s - z - | + Accompanying matterUp to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#). + No accompanying matter + Discography + Bibliography + Thematic indez + Libretto or text + Bibliography of composer or autor + Biography of performer or history of ensemble + Technical and/or historical information on instruments + Technical information on music + Historical information + Ethnological information + Instrutional materials + Music + Other + No attempt to code - - # - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - r - s - t - z - | + Literary text for sound recordingsUp to two one-character codes (recorded in the order of the following list) that indicate the type of literary text contained in a nonmusical sound recording. If only one code is assigned, it is left justified and the unused position contains a blank (#). + Item is a music sound recording + Autobiography + Biography + Conference proceedings + Drama + Essays + Fiction + Reporting + History + Instruction + Language instruction + Comedy + Lectures, speeches + Memoirs + Not applicable + Folktales + Poetry + Rehearsals + Sounds + Interviews + Other + No attempt to code - - - # - a - b - c - n - u - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Transposition and arrangementWhether all or part of the item being cataloged is a transposition and/or arrangement of another work. + Not arrangement or transposition or not specified + Transposition + Arragement + Both transposed and arranged + Not applicable + Unknown + No attempt to code - + UndefinedUndefined; contains a blank (#) or a fill character (|). - - - s + Continuing Resources + Form of material + Serial/Integrating resource - - # - a - b - c - d - e - f - g - h - i - j - k - m - q - s - t - u - w - z - | + FrequencyOne-character alphabetic code that indicates the frequency of an item; used in conjunction with 008/19 (Regularity). + No determinable frequency + Annual + Bimonthly + Semiweekly + Daily + Biweekly + Semiannual + Biennial + Triennial + Three times a week + Three times a month + Continuously updated + Monthly + Quarterly + Semimonthly + Three times a year + Unknown + Weekly + Other + No attempt to code - - n - r - u - x - | + RegularityOne-character alphabetic code that indicates the intended regularity of an item; used in conjunction with 008/18 (Frequency). + Normalized irregular + Regular + Unknown + Completely irregular + No attempt to code - - - # - d - l - m - n - p - w - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Type of continuing resourceOne-character alphabetic code that indicates the type of continuing resource. + None of the following + Updating database + Updating loose-leaf + Monographic series + Newspaper + Periodical + Updating web site + No attempt to code - - # - a - b - c - d - e - f - o - q - s - | + Form of original itemOne-character alphabetic code that indicates the form of material in which an item was originally published. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Newspaper format + Braille + Online + Direct electronic + Electronic + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that specifies the form of material for the item being described + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - # - 5 - 6 - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - q - r - s - t - u - v - w - y - z - | + Nature of entire work + Not specified + Calendars + Comics/graphic novels + Abstracts/summaries + Bibliographies + Catalogs + Dictionaries + Encyclopedias + Handbooks + Legal articles + Biography + Indexes + Discographies + Legislation + Theses + Survey of literature in a subject area + Reviews + Programmed texts + Filmographies + Directories + Statistics + Technical reports + Standards/specifications + Legal cases and case notes + Law reports and digests + Yearbooks + Treaties + No attempt to code - - # - 5 - 6 - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - q - r - s - t - u - v - w - z - ||| + Nature of contents + Not specified + Calendars + Comics/graphic novels + Abstracts/summaries + Bibliographies + Catalogs + Dictionaries + Encyclopedias + Handbooks + Legal articles + Biography + Indexes + Discographies + Legislation + Theses + Survey of literature in a subject area + Reviews + Programmed texts + Filmographies + Directories + Statistics + Technical reports + Standars/specifications + Legal cases and case notes + Law reports and digests + Treaties + No attempt to code - - # - a - c - f - i - l - m - o - s - u - z - | + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - 0 - 1 - | + Conference publicationOne-character numeric code that indicates whether an item consists of the proceedings, reports, or summaries of a conference. + Not a conference publication + Conference publication + No attempt to code - - - # - a - b - c - d - e - f - g - h - i - j - k - l - u - z - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Original alphabet or script of titleOne-character alphabetic code that indicates the original alphabet or script of the language of the title on the source item upon which the key title (field 222) is based. + No alphabet or script given/No key title + Basic Roman + Extended Roman + Cyrillic + Japanese + Chinese + Arabic + Greek + Hebrew + Thai + Devanagari + Korean + Tamil + Unknown + Other + No attempt to code - - 0 - 1 - 2 - | + Entry conventionOne-character numeric code that indicates whether the item was cataloged according to successive entry, latest entry, or integrated entry cataloging conventions. + Succesive entry + Latest entry + Integrated entry + No attempt to code - - - g - k - o - r + Visual Materials + Form of material + Projected medium + Two-dimensional nonprojectable graphic + Kit + Tree- dimensional artifact or naturally occurring object - - 000 - 001-999 - nnn - ||| -                         --- + Running time for motion pictures and videorecordingsThree-digit number that indicates the total running time of the motion picture or videorecording. The number is right justified and each unused position contains a zero. + Running time exceeds three characters + Running time + Not applicable + No attempt to code + Unknown - - - # - a - b - c - d - e - f - g - j - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - - # - a - c - f - i - l - m - o - s - u - z - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that indicates the form of material for the item. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - - a - b - c - d - f - g - i - k - l - m - n - o - p - q - r - s - t - v - w - z - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Type of visual materialOne-character alphabetic code that indicates the type of visual material being described. + Art original + Kit + Art reproduction + Diorama + Filmstrip + Game + Picture + Graphic + Technical drawing + Motion picture + Chart + Flash card + Microscope slide + Model + Realia + Slide + Transparency + Videorecording + Toy + Other + No attempt to code - - a - c - l - n - u - z - | + TechniqueOne-character alphabetic code that indicates the technique used in creating motion in motion pictures or videorecordings. + Animation + Animation and live action + Live action + Not applicable + Unknown + Other + No attempt to code - - - p + Mixed Materials + Form of material + Mixed material - - - # - a - b - c - d - f - o - q - r - s - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Form of itemOne-character alphabetic code that specifies the form of material for the item being described + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - + UndefinedUndefined; each contains a blank (#) or a fill character (|). diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml index a32320847a..ec3328ab10 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml @@ -1,1300 +1,1300 @@ - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Books + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - # - a - b - c - d - e - f - g - h - i - j - k - l - m - o - p - | + IllustrationsUp to four (4) one-character alphabetic codes (recorded in alphabetical order) that indicate the presence of types of illustrations in the item. If fewer than four alphabetic codes are assigned, the codes are left justified and unused positions contain blanks (#) + No illustrations + Illustrations + Maps + Portraits + Charts + Plans + Plates + Music + Facsimiles + Coats of arms + Genealogical tables + Forms + Samples + Phonodisc, phonowire, etc + Photographs + Illuminations + No attempt to code - - # - a - b - c - d - e - f - g - j - | + Target audienceOne-character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that specifies the form of material for the item + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - # - 2 - 5 - 6 - a - b - c - d - e - f - g - i - j - k - l - m - n - o - p - q - r - s - t - u - v - w - y - z - | + Nature of contentsUp to four one-character codes that indicate whether a significant part of the item is or contains certain types of material. If fewer than four codes are assigned, the codes are left justified and unused positions contain blanks (#) + No specified nature of contents + Offprints + Calendars + Comics/graphic novels + Abstracts/summaries + Bibliographies + Catalogs + Dictionaries + Encyclopedias + Handbooks + Legal articles + Indexes + Patent document + Discographies + Legislation + Theses + Surveys of literature in a subject area + Reviews + Programmed texts + Filmographies + Directories + Statistics + Technical reports + Standars/specifications + Legal cases and case notes + Law reports and digests + Yearbooks + Treaties + No attempt to code - - # - a - c - f - i - l - m - o - s - u - z - | + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - 0 - 1 - | + Conference publicationOne-character code that indicates whether the item consists of the proceedings, reports, or summaries of a conference. + Not a conference publication + Conference + No attempt to code - - 0 - 1 - | + FestschriftOne-character code that indicates whether the item is a festschrift + Not a festschrift + Festschrift + No attempt to code - - 0 - 1 - | + IndexOne-character numeric code that indicates whether the item includes an index to its own contents + No index + Index present + No attempt to code - - - 0 - 1 - d - e - f - h - i - j - m - p - s - u - | + UndefinedContains a blank (#) or a fill character (|). + Literary formOne-character code used to indicate the literary form of an item. Numeric codes 0 and 1 provide a generic identification of whether or not the item is a work of fiction. Alphabetic codes may be used to identify specific literary forms. + Not fiction (not further specified) + Fiction (not further specified) + Dramas + Essays + Novels + Humor, satires, etc. + Letters + Short stories + Mixed forms + Poetry + Speeches + Unknown + No attempt to code - - # - a - b - c - d - | + BiographyOne-character alphabetic code that indicates whether or not an item contains biographical material, and if so, what the biographical characteristics are. + No biographical material + Autobiography + Individual biography + Collective biography + Contains biographical information + No attempt to code - - ### - mul - sgn - und - zxx - [aaa] + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Computer Files + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - - # - a - b - c - d - e - f - g - j - | + UndefinedEach one contains a blank (#) or a fill character (|) + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - # - o - q - | + Form of itemOne-character alphabetic code that specifies the form of material for the item + Unknown or not specified + Online + Direct electronic + No attempt to code - - - a - b - c - d - e - f - g - h - i - j - m - u - z - | + UndefinedTwo undefined character positions; each contains a blank (#) or a fill character (|). + Type of computer fileOne-character alphabetic code that indicates the type of computer file described in the bibliographic record + Numeric data + Computer program + Representational + Document + Bibliographic data + Font + Game + Sound + Interactive multimedia + Online system or service + Combination + Unknown + Other + No attempt to code - - - # - a - c - f - i - l - m - o - s - u - z - | + UndefinedOne-character code that contains a blank (#) or a fill character (|) + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - - ### - mul - sgn - und - zxx - [aaa] + UndefinedSix undefined character positions; each contains a blank (#) or a fill character (|). + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Maps + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - # - a - b - c - d - e - f - g - i - j - k - m - z - |||| + ReliefUp to four one-character alphabetic codes that indicate the relief type specified on the item. Codes are recorded in order of their importance to the described item. If fewer than four codes are assigned, the codes are left justified and each unused position contains a blank (#). + No relief shown + Contours + Shading + Gradient and bathymetric tints + Hachures + Bathymetry/soundings + Form lines + Spot heights + Pictorially + Land forms + Bathymetry/isolines + Rock drawings + Other + No attempt to code - - ## - aa - ab - ac - ad - ae - af - ag - am - an - ap - au - az - ba - bb - bc - bd - be - bf - bg - bh - bi - bj - bk - bl - bo - br - bs - bu - bz - ca - cb - cc - ce - cp - cu - cz - da - db - dc - dd - de - df - dg - dh - dl - zz - || + ProjectionTwo-character alphabetic code that indicates the projection used in producing the item. + Projection not specified + Aitoff + Gnomic + Lambert's azimuthal equal area + Orthographic + Azimuthal equidistant + Stereographic + General vertical near-sided + Modified stereographic for Alaska + Chamberlin trimetric + Polar stereographic + Azimuthal, specific type unknown + Azimutal, other + Gall + Goode's homolographic + Lambert's cylindrical equal area + Mercator + Miller + Mollweide + Sinusoidal + Transverse Mercator + Gauss-Kruger + Equirectangular + Krovak + Cassini-Soldner + Oblique Mercator + Robinson + Space oblique Mercator + Cylindrical, specific type unknown + Cylindrical, other + Albers equal area + Bonne + Lambert's conformal conic + Equidistant conic + Polyconic + Conic, specific type unknown + Conic, other + Armadillo + Butterfly + Eckert + Goode's homolosine + Miller's bipolar oblique conformal conic + Van Der Grinten + Dimaxión + Cordiform + Lambert conformal + Other + No attempt to code - - - a - b - c - d - e - f - g - u - z - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Type of cartographic materialOne-character alphabetic code that indicates the type of cartographic item described. + Single map + Map Series + Map serial + Globe + Atlas + Separate supplement to another work + Bound as part of another work + Unknown + Other + No attempt to code - - - # - a - c - f - i - l - m - o - s - u - z - | + UndefinedEach contains a blank (#) or a fill character (|) + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that indicates the form of material for the item. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - - 0 - 1 - | + UndefinedContains a blank (#) or a fill character (|). + IndexOne-character numeric code that indicates whether the item or accompanying material includes a location index or gazetteer. + No index + Index present + No attempt to code - - - # - e - j - k - l - n - o - p - r - z - || + UndefinedContains a blank (#) or a fill character (|). + Special format characteristicsUp to two one-character alphabetic codes that indicate the special format characteristics of the map. Codes are recorded in order of their importance to the described item. If only one code is assigned, it is left justified and the unused position contains a blank (#). + No specified special format characteristics + Manuscript + Picture card, post card + Calendar + Puzzle + Game + Wall map + Playing cards + Loose-leaf + Other + No attempt to code - - ### - mul - sgn - und - zxx - [aaa] + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Music + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - an - bd - bg - bl - bt - ca - cb - cc - cg - ch - cl - cn - co - cp - cr - cs - ct - cy - cz - df - dv - fg - fl - fm - ft - gm - hy - jz - mc - md - mi - mo - mp - mr - ms - mu - mz - nc - nn - op - or - ov - pg - pm - po - pp - pr - ps - pt - pv - rc - rd - rg - ri - rp - rq - sd - sg - sn - sp - st - su - sy - tc - tl - ts - uu - vi - vr - wz - za - zz - || + Form of composition + Anthems + Ballads + Bluegrass music + Blues + Ballets + Chaconnes + Chants, Other religions + Chants, Christian + Concerti grossi + Chorales + Chorale preludes + Canons and rounds + Concertos + Chansons, polyphonic + Carols + Chance compositions + Cantatas + Country music + Canzonas + Dance forms + Divertimentos, serenades, cassations, divertissements, and notturni + Fugues + Flamenco + Folk music + Fantasias + Gospel music + Hymns + Jazz + Musical revues and comedies + Madrigals + Minuets + Motets + Motion picture music + Marches + Masses + Multiple forms + Mazurkas + Nocturnes + Not applicable + Operas + Oratorios + Overtures + Program music + Passion music + Polonaises + Popular music + Preludes + Passacaglias + Part-songs + Pavans + Rock music + Rondos + Ragtime music + Ricercars + Rhapsodies + Requiems + Square dance music + Songs + Sonatas + Symphonic poems + Studies and exercises + Suites + Symphonies + Toccatas + Teatro lirico + Trio-sonatas + Unknown + Villacincos + Variations + Waltzers + Zarzuelas + Other + No attempt to code - - a - b - c - d - e - g - h - i - j - k - m - n - u - z - | + Format of musicOne-character code that indicates the format of a musical composition (e.g., piano-conductor score). + Full score + Full score, miniature or study size + Accompaniment reduced for keyboard + Voice score with accompaniment omitted + Condensed score or piano-conductor score + Close score + Chorus score + Condensed score + Performer-conductor part + Vocal score + Multiple score formats + Not applicable + Unknown + Other + No attempt to code - - # - d - e - f - n - u - | + Music Parts + No parts in hand or not specified + Instrumental and vocal parts + Instrumental parts + Vocal parts + Not applicable + Unknown + No attempt to code - - # - a - b - c - d - e - f - g - j - | + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that indicates the form of material for the item. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - # - a - b - c - d - e - f - g - h - i - k - r - s - z - | + Accompanying matterUp to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#). + No accompanying matter + Discography + Bibliography + Thematic indez + Libretto or text + Bibliography of composer or autor + Biography of performer or history of ensemble + Technical and/or historical information on instruments + Technical information on music + Historical information + Ethnological information + Instrutional materials + Music + Other + No attempt to code - - # - a - b - c - d - e - f - g - h - i - j - k - l - m - n - o - p - r - s - t - z - | + Literary text for sound recordingsUp to two one-character codes (recorded in the order of the following list) that indicate the type of literary text contained in a nonmusical sound recording. If only one code is assigned, it is left justified and the unused position contains a blank (#). + Item is a music sound recording + Autobiography + Biography + Conference proceedings + Drama + Essays + Fiction + Reporting + History + Instruction + Language instruction + Comedy + Lectures, speeches + Memoirs + Not applicable + Folktales + Poetry + Rehearsals + Sounds + Interviews + Other + No attempt to code - - - # - a - b - c - n - u - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Transposition and arrangementWhether all or part of the item being cataloged is a transposition and/or arrangement of another work. + Not arrangement or transposition or not specified + Transposition + Arragement + Both transposed and arranged + Not applicable + Unknown + No attempt to code - - - ### - mul - sgn - und - zxx - [aaa] + UndefinedUndefined; contains a blank (#) or a fill character (|). + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Continuing Resources + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - # - a - b - c - d - e - f - g - h - i - j - k - m - q - s - t - u - w - z - | + FrequencyOne-character alphabetic code that indicates the frequency of an item; used in conjunction with 008/19 (Regularity). + No determinable frequency + Annual + Bimonthly + Semiweekly + Daily + Biweekly + Semiannual + Biennial + Triennial + Three times a week + Three times a month + Continuously updated + Monthly + Quarterly + Semimonthly + Three times a year + Unknown + Weekly + Other + No attempt to code - - n - r - u - x - | + RegularityOne-character alphabetic code that indicates the intended regularity of an item; used in conjunction with 008/18 (Frequency). + Normalized irregular + Regular + Unknown + Completely irregular + No attempt to code - - - # - d - l - m - n - p - w - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Type of continuing resourceOne-character alphabetic code that indicates the type of continuing resource. + None of the following + Updating database + Updating loose-leaf + Monographic series + Newspaper + Periodical + Updating web site + No attempt to code - - # - a - b - c - d - e - f - o - q - s - | + Form of original itemOne-character alphabetic code that indicates the form of material in which an item was originally published. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Newspaper format + Braille + Online + Direct electronic + Electronic + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that specifies the form of material for the item being described + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - # - 5 - 6 - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - q - r - s - t - u - v - w - y - z - | + Nature of entire workOne-character alphabetic code that indicates the nature of an item if it consists entirely of a certain type of material + Not specified + Calendars + Comics/graphic novels + Abstracts/summaries + Bibliographies + Catalogs + Dictionaries + Encyclopedias + Handbooks + Legal articles + Biography + Indexes + Discographies + Legislation + Theses + Survey of literature in a subject area + Reviews + Programmed texts + Filmographies + Directories + Statistics + Technical reports + Standards/specifications + Legal cases and case notes + Law reorts and digests + Yearbooks + Teatries + No attempt to code - - # - 5 - 6 - a - b - c - d - e - f - g - h - i - k - l - m - n - o - p - q - r - s - t - u - v - w - y - z - ||| + Nature of contentsUp to three one-character alphabetic codes (recorded in alphabetical order) that indicate that a work contains certain types of materials + Not specified + Calendars + Comics/graphic novels + Abstracts/summaries + Bibliographies + Catalogs + Dictionaries. Also used for a glossary or a gazetteer. + Encyclopedias + Handbooks + Legal articles + Biography + Indexes + Discographies + Legislation + Theses + Survey of literature in a subject area + Reviews + Programmed texts + Filmographies + Directories + Statistics + Technical reports + Standars/specifications + Legal cases and case notes + Law reports and digests + Yearbooks + Treaties + No attempt to code - - # - a - c - f - i - l - m - o - s - u - z - | + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - 0 - 1 - | + Conference publicationOne-character numeric code that indicates whether an item consists of the proceedings, reports, or summaries of a conference. + Not a conference publication + Conference publication + No attempt to code - - - # - a - b - c - d - e - f - g - h - i - j - k - l - u - z - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Original alphabet or script of titleOne-character alphabetic code that indicates the original alphabet or script of the language of the title on the source item upon which the key title (field 222) is based. + No alphabet or script given/No key title + Basic Roman + Extended Roman + Cyrillic + Japanese + Chinese + Arabic + Greek + Hebrew + Thai + Devanagari + Korean + Tamil + Unknown + Other + No attempt to code - - 0 - 1 - 2 - | + Entry conventionOne-character numeric code that indicates whether the item was cataloged according to successive entry, latest entry, or integrated entry cataloging conventions. + Succesive entry + Latest entry + Integrated entry + No attempt to code - - ### - mul - sgn - und - zxx - [aaa] + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Visual Materials + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - 000 - 001-999 - nnn - ||| - --- + Running time for motion pictures and videorecordingsThree-digit number that indicates the total running time of the motion picture or videorecording. The number is right justified and each unused position contains a zero. + Running time exceeds three characters + Running time + Not applicable + No attempt to code + Unknown - - - # - a - b - c - d - e - f - g - j - | + UndefinedUndefined; contains a blank (#) or a fill character (|). + Target audienceOne- character alphabetic code that describes the intellectual level of the target audience for which the material is intended + Unknown or not specified + Preschool + Primary + Pre-adolescent + Adolescent + Adult + Specialized + General + Juvenile + No attempt to code - - - # - a - c - f - i - l - m - o - s - u - z - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Government publicationOne-character code that indicates whether or not the item is published or produced by or for an international, national, state, provincial, or local government agency, or by any subdivision of such a body + Not a government publication + Autonomous or semi-autonomous component + Multilocal + Federal/National + International intergovernmental + Local + Multistate + Government publication-level undetermined + State, provincial, territorial, dependent, etc. + Unknown if item is government publication + Other + No attempt to code - - # - a - b - c - d - f - o - q - r - s - | + Form of itemOne-character alphabetic code that indicates the form of material for the item. + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - - a - b - c - d - f - g - i - k - l - m - n - o - p - q - r - s - t - v - w - z - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Type of visual materialOne-character alphabetic code that indicates the type of visual material being described. + Art original + Kit + Art reproduction + Diorama + Filmstrip + Game + Picture + Graphic + Technical drawing + Motion picture + Chart + Flash card + Microscope slide + Model + Realia + Slide + Transparency + Videorecording + Toy + Other + No attempt to code - - a - c - l - n - u - z - | + TechniqueOne-character alphabetic code that indicates the technique used in creating motion in motion pictures or videorecordings. + Animation + Animation and live action + Live action + Not applicable + Unknown + Other + No attempt to code - - ### - mul - sgn - und - zxx - [aaa] + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code - - - - b - c - d - e - i - k - m - n - p - q - r - s - t - u - | + Mixed Materials + Date entered on file + Type of date/Publication status + No dates given; B.C. date involved + Continuing resource currently published + Continuing resource ceased publication + Detailed date + Inclusive dates of colletion + Range of years of bulk of collection + Multiple dates + Dates unknown + Date of distribution/release/issue and production/recording session when different + Questionable date + Reprint/reissue date and original date + Single know date/probable date + Publication date and copyright date + Continuings resource status unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 1A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - # - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - u - |||| + Date 2A date specified by the code in 008/06 (Type of date/Publication status) + Date element is not applicable + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date digit + Date element is totally or partially unknown + No attempt to code - - vp# - xx# - [aa#] - [aaa] + MARC Code List for CountriesPlace of publication, production, or execution + Various places + No place, unknown, or undetermined + Two-character alphabetic code + Three-character alphabetic code - - - # - a - b - c - d - f - o - q - r - s - | + UndefinedUndefined; each contains a blank (#) or a fill character (|). + Form of itemOne-character alphabetic code that specifies the form of material for the item being described + None of the following + Microfilm + Microfiche + Microopaque + Large print + Braille + Online + Direct electronic + Regular print reproduction + Electronic + No attempt to code - - - ### - mul - sgn - und - zxx - [aaa] + UndefinedUndefined; each contains a blank (#) or a fill character (|). + MARC Code List for LanguagesLanguage + No information provided + Multiple languages + Sign languages + Undetermined + No linguistic content + Tree-character alphabetic code - - # - d - o - r - s - x - | + Modified recordOne-character code that indicates whether any data in a bibliographic record is a modification of information that appeared on the item being cataloged or that was intended to be included in the MARC record. + No modified + Dashed-on information omitted + Completely romanized/printed cards romanized + Completely romanized/printed cards in script + Shortened + Missing characters + No attempt to code - - # - c - d - u - | + Cataloging source + National bibliographic agency + Cooperative cataloging program + Other + Unknown + No attempt to code diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd index 1048eb6a0c..3398ba8d40 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd @@ -30,11 +30,11 @@ - + + + - - @@ -54,13 +54,13 @@ - + + + + + - - - - @@ -73,11 +73,11 @@ - - - - - + + + + + From b0d198070ce05d8c4f54051444b9c30e7682dee2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 19 Apr 2013 15:14:17 -0300 Subject: [PATCH 54/59] Bug 10084 - YUI path wrong in CCSR theme with packages Bug 9052 fixed this for prog, CCSR was left aline in the dark (it's friday). Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack Worked fine in my test package, good work Tomas Signed-off-by: Mason James Signed-off-by: Galen Charlton (cherry picked from commit be1770ffccdff54f3140f3af7f7f1d026c46e05a) Signed-off-by: Jared Camins-Esakov (cherry picked from commit 7d37655afb3c22884eb3139940e2e7261c23da4d) Signed-off-by: Chris Cormack --- debian/rules | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/rules b/debian/rules index 5980ebbdb4..551cf22ba8 100755 --- a/debian/rules +++ b/debian/rules @@ -23,12 +23,6 @@ override_dh_auto_install: rm $(TMP)/etc/koha/searchengine/solr/config.yaml rm $(TMP)/etc/koha/searchengine/solr/indexes.yaml rm $(TMP)/etc/koha/solr/indexes.yaml -# rm $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js -# ln -s /usr/share/javascript/jquery/jquery.js \ -# $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js -# rm $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js -# ln -s /usr/share/javascript/jquery/jquery.js \ -# $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js rm -r \ $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce mkdir -p $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce/jscripts @@ -60,6 +54,9 @@ override_dh_auto_install: install -m 0644 koha-tmpl/opac-tmpl/lib/yui/skin.css \ koha-tmpl/opac-tmpl/lib/yui/reset-fonts-grids.css \ $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css + install -m 0644 koha-tmpl/opac-tmpl/lib/yui/skin.css \ + koha-tmpl/opac-tmpl/lib/yui/reset-fonts-grids.css \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/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 \ @@ -94,8 +91,11 @@ override_dh_auto_install: $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css sed -i -e 's:url(.*/reset-fonts-grids.css.*):url("/opac-tmpl/lib/yui/reset-fonts-grids/reset-fonts-grids.css"):' \ -e 's:url(.*/skin.css.*):url("/opac-tmpl/lib/yui/assets/skins/sam/skin.css"):' \ - $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \ - $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/*/en/css/opac.css \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/*/en/css/sco.css + sed -i -e 's:href="/opac-tmpl/lib/yui/reset-fonts-grids.css":href="/opac-tmpl/lib/yui/reset-fonts-grids/reset-fonts-grids.css":' \ + -e 's:href="/opac-tmpl/lib/yui/skin.css":href="/opac-tmpl/lib/yui/assets/skins/sam/skin.css":' \ + $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/en/includes/doc-head-close.inc 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/intranet/htdocs/intranet-tmpl/prog/en/css/staff-global*.css From f3ea66e80d6f6e733866f60a657f28ce57ad086d Mon Sep 17 00:00:00 2001 From: Christophe Croullebois Date: Mon, 18 Mar 2013 18:46:03 +0100 Subject: [PATCH 55/59] 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 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 17c2d5ea73..2dcf9b445b 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -214,7 +214,6 @@ if ( $count == 1 ) { quantityreceived => $order->{'quantityreceived'}, rrp => sprintf( "%.2f", $rrp ), ecost => sprintf( "%.2f", $ecost ), - unitprice => sprintf( "%.2f", $unitprice), memberfirstname => $member->{firstname} || "", membersurname => $member->{surname} || "", invoiceid => $invoice->{invoiceid}, @@ -226,6 +225,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 ( $unitprice != 0) { + $template->param( + unitprice => sprintf( "%.2f", $unitprice), + ); + } } else { my @loop; From 5000709e138318fc7143949e95c47666e2448839 Mon Sep 17 00:00:00 2001 From: Karam Qubsi Date: Sat, 4 May 2013 23:44:57 +0300 Subject: [PATCH 56/59] Bug 10176: Solve the Invalid URLs in 'Refine Search Results' when it uses UNICODE symbols I just add use utf8; to the Search.pm and the problem was solved . Test plan : 1- Add bib records with non-latin characters 2- search for some of these records 3- try to refine your search using Subject / Author Signed-off-by: Bernardo Gonzalez Kriegel Comment: Work fixing URLs in facets. Now they work correctly. No errors. Signed-off-by: Katrin Fischer Passes all tests and QA script. I tested facets with the 22 Arabic records provided on bug 9579 successfully. Before the patch the links are not correct, after applying the patch the links work as expected. Signed-off-by: Jared Camins-Esakov (cherry picked from commit 2d29440c5ade462bf6939f2ab32b5ec9c2c1b377) Signed-off-by: Jared Camins-Esakov (cherry picked from commit ff7dc4ec4a7e7034ccab5f31e3a7de7f686475ba) Signed-off-by: Chris Cormack use utf8; Does not do what most people think it does, all it does is utf8 - Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source code IE allow Search.pm to contain utf8 chars. It does not affect any thing else From the Man Page The use utf8 pragma tells the Perl parser to allow UTF-8 in the program text in the current lexical scope (allow UTF-EBCDIC on EBCDIC based platforms). The no utf8 pragma tells Perl to switch back to treating the source text as literal bytes in the current lexical scope. Do not use this pragma for anything else than telling Perl that your script is written in UTF-8. The utility functions described below are directly usable without use utf8; . --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index ce6129da02..7541a7b36c 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -36,7 +36,7 @@ use URI::Escape; use Business::ISBN; use MARC::Record; use MARC::Field; - +use utf8; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); # set the version for version checking From ca21fa1454c6f97b6f07c594fdc9428cbd6f2075 Mon Sep 17 00:00:00 2001 From: Lyon3 Team Date: Mon, 8 Apr 2013 11:14:09 +0200 Subject: [PATCH 57/59] Bug 8896: Delete serials no more missing from missinglist When manual history is disabled in subscription history section if a serial has been previously set as missing and is received or set as expected, late or claimed, it will be deleted from missinglist Signed-off-by: Marcel de Rooy Regex needs a followup. More comments on Bugzilla. Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov (cherry picked from commit ccc7f535cb585352b2e933c1e5694e1d6e06d38b) Signed-off-by: Jared Camins-Esakov (cherry picked from commit e5d5129541625ce5cdb16a14089895b245ebe57d) Signed-off-by: Chris Cormack --- C4/Serials.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index cedbcfff86..d5a0b25fd2 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1118,7 +1118,10 @@ sub ModSerialStatus { $recievedlist .= "; $serialseq" unless ( index( "$recievedlist", "$serialseq" ) >= 0 ); } - + # in case serial has been previously marked as missing + if (grep /$status/, (1,2,3,7)) { + $missinglist =~ s/[,;]?\s?$serialseq//g; + } # warn "missinglist : $missinglist serialseq :$serialseq, ".index("$missinglist","$serialseq"); $missinglist .= "; $serialseq" if ( $status == 4 From 9619fde3e9f9c9547ad2240edafccfdc30ddfd8d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 11 Apr 2013 12:48:26 +0200 Subject: [PATCH 58/59] Bug 8896 QA Followup for regex Making sure that the regex does not kill more than it should. Amended: does now only look at separating colons(;) not commas(,). Amended: two index expressions in direct context replaced by same regex for consistency. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov (cherry picked from commit e5b467e81f494857a0831fe0d4f9ad94127a91bb) Signed-off-by: Jared Camins-Esakov (cherry picked from commit cb9af9d0e667dcdebfdc89e77bdb8fdc2598493d) Signed-off-by: Chris Cormack --- C4/Serials.pm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index d5a0b25fd2..03d287d42f 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1114,21 +1114,18 @@ sub ModSerialStatus { $sth->execute($subscriptionid); my ( $missinglist, $recievedlist ) = $sth->fetchrow; if ( $status == 2 ) { - $recievedlist .= "; $serialseq" - unless ( index( "$recievedlist", "$serialseq" ) >= 0 ); + if $recievedlist!~/(^|;)\s*$serialseq(?=;|$)/; } # in case serial has been previously marked as missing if (grep /$status/, (1,2,3,7)) { - $missinglist =~ s/[,;]?\s?$serialseq//g; + $missinglist=~ s/(^|;)\s*$serialseq(?=;|$)//g; } - # warn "missinglist : $missinglist serialseq :$serialseq, ".index("$missinglist","$serialseq"); $missinglist .= "; $serialseq" - if ( $status == 4 - and not index( "$missinglist", "$serialseq" ) >= 0 ); + if $status==4 && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; $missinglist .= "; not issued $serialseq" - if ( $status == 5 - and index( "$missinglist", "$serialseq" ) >= 0 ); + if $status==5 && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; + $query = "UPDATE subscriptionhistory SET recievedlist=?, missinglist=? WHERE subscriptionid=?"; $sth = $dbh->prepare($query); $recievedlist =~ s/^; //; From baa2d7f049760b9ad147e6b9bbe3f2ec64fc687a Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 8 May 2013 18:00:29 +1000 Subject: [PATCH 59/59] 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;