From d082b28ba7d23e659b338f762a7d7d89ec5174ba Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 14 Jul 2010 16:32:42 +1200 Subject: [PATCH 01/10] Bug 2505: Quieting warns in acqui/z3950_search.pl Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- acqui/z3950_search.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 7f04754d12..015aac6b23 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -2,6 +2,7 @@ # This is a completely new Z3950 clients search using async ZOOM -TG 02/11/06 # Copyright 2000-2002 Katipo Communications +# Copyright 2010 Catalyst IT # # This file is part of Koha. # @@ -89,12 +90,12 @@ my $DEBUG = 0; # if set to 1, many debug message are send on syslog. my $frameworks = getframeworks; my @frameworkcodeloop; foreach my $thisframeworkcode ( keys %$frameworks ) { - my $row = { + my %row = { value => $thisframeworkcode, frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, }; - if ( $row->{'value'} eq $frameworkcode){ - $row->{'active'} = 'true'; + if ( $row{'value'} eq $frameworkcode){ + $row{'active'} = 'true'; } push @frameworkcodeloop, $row; } From cb06075e77d76d4ac6cd455a60b95e0e11951264 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 14 Jul 2010 16:32:44 +1200 Subject: [PATCH 02/10] wr72054 fixing the z3950 search for acquisitions Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- acqui/z3950_search.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 015aac6b23..1238e16ae2 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -90,10 +90,10 @@ my $DEBUG = 0; # if set to 1, many debug message are send on syslog. my $frameworks = getframeworks; my @frameworkcodeloop; foreach my $thisframeworkcode ( keys %$frameworks ) { - my %row = { + my %row = ( value => $thisframeworkcode, frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, - }; + ); if ( $row{'value'} eq $frameworkcode){ $row{'active'} = 'true'; } @@ -247,8 +247,8 @@ sub displayresults { # In rel2_2 i am not sure what encoding is so no character conversion is done here ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); - $oldbiblio->{isbn} =~ s/ |-|\.//g, - $oldbiblio->{issn} =~ s/ |-|\.//g, + $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid @@ -284,14 +284,13 @@ sub displayresults { server => $servername[$k], numberpending => $numberpending, ); - output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0; # print $template->output if $firstresult !=1; $firstresult++; } displayresults(); -if ( --$nremaining > 0 ) { +while ( --$nremaining > 0 ) { displayresults(); } } ## if op=search From 9a085653942df5e5eb3f46105079438c4e99912f Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 15 Jul 2010 16:59:17 +0100 Subject: [PATCH 03/10] Bug 5011 install debian graphicsmagick not imagemagick Scripts in install-misc were installing Image Magick not Graphics::Magick the actual Koha dependency Signed-off-by: Galen Charlton --- install_misc/apt-get-debian-lenny.sh | 2 +- install_misc/debian.packages | 2 +- install_misc/install_koha_on_fresh_debian | 2 +- install_misc/ubuntu.packages | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install_misc/apt-get-debian-lenny.sh b/install_misc/apt-get-debian-lenny.sh index eb3aa70a84..48c53e4291 100755 --- a/install_misc/apt-get-debian-lenny.sh +++ b/install_misc/apt-get-debian-lenny.sh @@ -52,7 +52,7 @@ libidzebra-2.0-mod-grs-regx \ libidzebra-2.0-mod-grs-xml \ libidzebra-2.0-mod-text \ libidzebra-2.0-modules \ -libimage-magick-perl \ +libgraphics-magick-perl \ libjson-perl \ libjson-xs-perl \ liblingua-ispell-perl \ diff --git a/install_misc/debian.packages b/install_misc/debian.packages index 11dfeb4b30..5ff782fd1f 100644 --- a/install_misc/debian.packages +++ b/install_misc/debian.packages @@ -38,7 +38,7 @@ libidzebra-2.0-mod-grs-regx install libidzebra-2.0-mod-grs-xml install libidzebra-2.0-mod-text install libidzebra-2.0-modules install -libimage-magick-perl install +libgraphics-magick-perl install libjson-perl install liblingua-ispell-perl install liblingua-stem-perl install diff --git a/install_misc/install_koha_on_fresh_debian b/install_misc/install_koha_on_fresh_debian index 3595bf5e50..f20127bc05 100644 --- a/install_misc/install_koha_on_fresh_debian +++ b/install_misc/install_koha_on_fresh_debian @@ -467,7 +467,7 @@ libxslt1-dev libyaml-syck-perl libhtml-template-pro-perl libdbd-mysql-perl/testing -libimage-magick-perl +libgraphics-magick-perl liblist-moreutils-perl libtext-iconv-perl/testing libalgorithm-checkdigits-perl diff --git a/install_misc/ubuntu.packages b/install_misc/ubuntu.packages index 818358ad02..56430bfc32 100644 --- a/install_misc/ubuntu.packages +++ b/install_misc/ubuntu.packages @@ -14,7 +14,7 @@ libdate-calc-perl install libdate-manip-perl install libdate-ical-perl install libdatetime-format-mail-perl install -libimage-magick-perl install +libgraphics-magick-perl install libmail-sendmail-perl install liblingua-ispell-perl install liblingua-stem-perl install From 3452d0f2673ef7c110829329c5ff29848d0c7e81 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 15 Jul 2010 12:32:12 -0400 Subject: [PATCH 04/10] Fix for Bug 5013 "New patron" menu button broken on patron select screen Signed-off-by: Galen Charlton --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc | 2 +- members/members-home.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc index d7c87c4822..c508af0cd3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc @@ -23,7 +23,7 @@ var newmenu = [ - + { text: "", url: "/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=" }, diff --git a/members/members-home.pl b/members/members-home.pl index e497f4adaf..04fc557045 100755 --- a/members/members-home.pl +++ b/members/members-home.pl @@ -54,7 +54,7 @@ if($quicksearch){ my @categories=C4::Category->all; $template->param( branchloop=>(defined $branch?GetBranchesLoop($branch):GetBranchesLoop()), - categoryloop=>\@categories, + categories=>\@categories, ); $template->param( "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1", From 141313666f0eadcd133b91ad2e3920f0107264a9 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Tue, 13 Jul 2010 09:18:50 +1200 Subject: [PATCH 05/10] Bug 3756: Adding the ability to have localuse systempreferences Squashed commit of the following: commit d42198bfadff20f40c38b3d9bc7f210ecc372e7c Author: Chris Nighswonger Date: Mon Jul 12 16:48:16 2010 -0400 Bug 3756 [4/?] new sys prefs - no way to add a new local use preference Fixing Global Administration link commit 060a52bc8d9da1d83387455967ca05292e5987b9 Author: Chris Nighswonger Date: Mon Jul 12 16:45:07 2010 -0400 Bug 3756 [3/?] new sys prefs - no way to add a new local use preference Hiding non-local sysprefs commit d63858e13037fa91f18bc248ab770d757e31153c Author: Chris Nighswonger Date: Mon Jul 12 16:44:40 2010 -0400 Bug 3756 [2/?]new sys prefs - no way to add a new local use preference Fixing a typo commit 5b23a615018e049b1e11dbc10b131ecb30dfc6ab Author: Chris Nighswonger Date: Mon Jul 12 15:52:04 2010 -0400 Bug 3756 new sys prefs - no way to add a new local use preference A quick and dirty fix Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- admin/systempreferences.pl | 31 +++++++++++++++++++ .../prog/en/includes/prefs-menu.inc | 2 +- .../prog/en/includes/sysprefs-menu.inc | 30 +++++++++--------- .../prog/en/modules/admin/admin-home.tmpl | 2 +- 4 files changed, 48 insertions(+), 17 deletions(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 9e90d617ce..9191ecf450 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -95,8 +95,39 @@ $tabsysprefs{Intranet_includes} = "Admin"; $tabsysprefs{AutoLocation} = "Admin"; $tabsysprefs{DebugLevel} = "Admin"; $tabsysprefs{SessionStorage} = "Admin"; + +# This script is depricated so all of these prefs are lumped here to avoid their being displayed in the local use prefs tab + $tabsysprefs{noItemTypeImages} = "Admin"; $tabsysprefs{OPACBaseURL} = "Admin"; +$tabsysprefs{AnonymousPatron} = "Admin"; +$tabsysprefs{casAuthentication} = "Admin"; +$tabsysprefs{casLogout} = "Admin"; +$tabsysprefs{casServerUrl} = "Admin"; +$tabsysprefs{Disable_Dictionary} = "Admin"; +$tabsysprefs{EnableOpacSearchHistory} = "Admin"; +$tabsysprefs{'ILS-DI:AuthorizedIPs'} = "Admin"; +$tabsysprefs{Intranetbookbag} = "Admin"; +$tabsysprefs{maxitemsinSearchResults} = "Admin"; +$tabsysprefs{noOPACUserLogin} = "Admin"; +$tabsysprefs{'OAI-PMH:ConfFile'} = "Admin"; +$tabsysprefs{OpacAddMastheadLibraryPulldown} = "Admin"; +$tabsysprefs{opaclargeimage} = "Admin"; +$tabsysprefs{OpacPrivacy} = "Admin"; +$tabsysprefs{OPACXSLTDetailsDisplay} = "Admin"; +$tabsysprefs{OPACXSLTResultsDisplay} = "Admin"; +$tabsysprefs{PDFFontType} = "Admin"; +$tabsysprefs{PINESISBN} = "Admin"; +$tabsysprefs{PrintNoticesMaxLines} = "Admin"; +$tabsysprefs{ReservesControlBranch} = "Admin"; +$tabsysprefs{ResultsDisplay} = "Admin"; +$tabsysprefs{NoReturnSetLost} = "Admin"; +$tabsysprefs{SearchURL} = "Admin"; +$tabsysprefs{ShowPictures} = "Admin"; +$tabsysprefs{soundon} = "Admin"; +$tabsysprefs{SpineLabelShowPrintOnBibDetails} = "Admin"; +$tabsysprefs{WebBasedSelfCheckHeader} = "Admin"; +$tabsysprefs{WebBasedSelfCheckTimeout} = "Admin"; # Authorities $tabsysprefs{authoritysep} = "Authorities"; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc index 2716ec876c..b72e305ee5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc @@ -8,7 +8,7 @@
  • Creators
  • Enhanced Content
  • I18N/L10N
  • -
  • Local Use
  • +
  • Local Use
  • Logs
  • OPAC
  • Patrons
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc index 6e535a5ac1..3b2fea47b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc @@ -1,20 +1,20 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl index 05ca4e4433..afa2a35801 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl @@ -18,7 +18,7 @@
    -

    Global system preferences

    +

    Global system preferences

    Manage global system preferences like MARC flavor, date format, administrator email, and templates.

    " /> From 4dc85d2f0a7b8fb682fb0f492cc06c8f1a16bc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 13 Jul 2010 20:49:25 +0200 Subject: [PATCH 06/10] Bug 3756 Difference between original and local sysprefs Amend Chris N. patch in order to display local sysprefs as the difference between DB sysprefs and .pref files sysprefs. As a side effect, local sysprefs editor displays also deprecated sysprefs which is a feature from my point of view. For example, GranularPermissions is displayed as a local syspref because it has been removed recently from admin.pref but hasn't been yet removed from DB (could be done later with a DB update). Signed-off-by: Galen Charlton --- admin/systempreferences.pl | 90 +++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 5 deletions(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 9191ecf450..24d83d9cd6 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -52,6 +52,8 @@ use C4::Languages qw(getTranslatedLanguages); use C4::ClassSource; use C4::Log; use C4::Output; +use YAML::Syck qw( Dump LoadFile ); + # use Smart::Comments; @@ -458,12 +460,14 @@ sub StringSearch { ORDER BY VARIABLE" ); $sth->execute( "%$searchstring%", "%$searchstring%" ); } else { - my $strsth = "Select variable,value,explanation,type,options from systempreferences where variable not in ("; - foreach my $syspref ( keys %tabsysprefs ) { - $strsth .= $dbh->quote($syspref) . ","; + my $strsth = "Select variable,value,explanation,type,options from systempreferences where variable in ("; + my $first = 1; + for my $name ( get_local_prefs() ) { + $strsth .= ',' unless $first; + $strsth .= "'$name'"; + $first = 0; } - $strsth =~ s/,$/) /; - $strsth .= " order by variable"; + $strsth .= ") order by variable"; $sth = $dbh->prepare($strsth); $sth->execute(); } @@ -810,3 +814,79 @@ if ( $op eq 'add_form' ) { $template->param( tab => $tab, ); } #---- END $OP eq DEFAULT output_html_with_http_headers $input, $cookie, $template->output; + + +# Return an array containing all preferences defined in current Koha instance +# .pref files. + +sub get_prefs_from_files { + my $context = C4::Context->new(); + my $path_pref_en = $context->config('intrahtdocs') . + '/prog/en/modules/admin/preferences'; + # Get all .pref file names + opendir ( my $fh, $path_pref_en ); + my @pref_files = grep { /.pref/ } readdir($fh); + close $fh; + + my @names = (); + my $append = sub { + my $prefs = shift; + for my $pref ( @$prefs ) { + for my $element ( @$pref ) { + if ( ref( $element) eq 'HASH' ) { + my $name = $element->{pref}; + next unless $name; + push @names, $name; + last; + } + } + } + }; + for my $file (@pref_files) { + my $pref = LoadFile( "$path_pref_en/$file" ); + for my $tab ( keys %$pref ) { + my $content = $pref->{$tab}; + if ( ref($content) eq 'ARRAY' ) { + $append->($content); + next; + } + for my $section ( keys %$content ) { + my $syspref = $content->{$section}; + $append->($syspref); + } + } + } + return @names; +} + + +# Return an array containg all preferences defined in DB + +sub get_prefs_from_db { + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare("SELECT variable FROM systempreferences"); + $sth->execute; + my @names = (); + while ( (my $name) = $sth->fetchrow_array ) { + push @names, $name if $name; + } + return @names; +} + + +# Return an array containing all local preferences: those which are defined in +# DB and not defined in Koha .pref files. + +sub get_local_prefs { + my @prefs_file = get_prefs_from_files(); + my @prefs_db = get_prefs_from_db(); + + my %prefs_file = map { $_ => 1 } @prefs_file; + my @names = (); + foreach my $name (@prefs_db) { + push @names, $name unless $prefs_file{$name}; + } + + return @names; +} + From df49cace363652c8a55a8f52f8e1b238e0b19139 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 14 Jul 2010 13:57:01 -0400 Subject: [PATCH 07/10] Markup corrections - Changing input "button" to "submit" so that confirmation dialog redirects the user as expected - Changing non-standard message box styles to standard ones Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/classsources.tmpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl index 2460c9207c..569d87515c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tmpl @@ -225,7 +225,7 @@ $(document).ready(function() { remove it from all classification source definitions before trying again.

    " method="get"> - +
    @@ -240,13 +240,13 @@ $(document).ready(function() {

    Classification Sources

    -Added classification source +
    Added classification source
    -Modified classification source +
    Modified classification source
    -Deleted classification source +
    Deleted classification source
    @@ -279,13 +279,13 @@ $(document).ready(function() {

    Classification Filing Rules

    -Added filing rule +
    Added filing rule
    -Modified filing rule +
    Modified filing rule
    -Deleted filing rule +
    Deleted filing rule
    From 5bd02c5b9b6c71f6da3b67d4cda4994126fc9371 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 14 Jul 2010 15:59:07 -0400 Subject: [PATCH 08/10] Minor markup correction to send Cart form Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/modules/basket/sendbasketform.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tmpl index 9caef3c3de..a8207e4b96 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasketform.tmpl @@ -1,4 +1,5 @@ -Koha Online Catalog › Sending Your Cart + +<!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog › Sending Your Cart From 0f61cacf4aac5b6bce17bcf38dcb0ae09a8f8d31 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 14 Jul 2010 09:56:39 -0400 Subject: [PATCH 09/10] Fix for Bug 4999, OPAC error pages have incorrect markup structure No strings have been harmed in the making of this patch. Signed-off-by: Galen Charlton --- .../opac-tmpl/prog/en/modules/errors/400.tmpl | 31 ++++++++++--------- .../opac-tmpl/prog/en/modules/errors/401.tmpl | 31 ++++++++++--------- .../opac-tmpl/prog/en/modules/errors/402.tmpl | 31 ++++++++++--------- .../opac-tmpl/prog/en/modules/errors/403.tmpl | 31 ++++++++++--------- .../opac-tmpl/prog/en/modules/errors/404.tmpl | 31 ++++++++++--------- .../opac-tmpl/prog/en/modules/errors/500.tmpl | 31 ++++++++++--------- 6 files changed, 96 insertions(+), 90 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl index 49fd9e663b..e7ec2f22f0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl @@ -1,14 +1,14 @@ Koha Online Catalog › An Error Has Occurred - + +
    +
    - -
    -
    -
    -
    +
    +
    +

    An Error has Occurred

    Error 400

    -
    -
    -
    -
    - - - - - +
    +
    + +
    +
    + +
    +
    +
    + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl index 73ed72b0af..cd975604dc 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl @@ -1,14 +1,14 @@ Koha Online Catalog › An Error Has Occurred - + +
    +
    - -
    -
    -
    -
    +
    +
    +

    An Error has Occurred

    Error 401

    -
    -
    -
    -
    - - - - - +
    +
    + +
    +
    + +
    +
    +
    + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl index 13eb795c3d..003526628d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl @@ -1,14 +1,14 @@ Koha Online Catalog › An Error Has Occurred - + +
    +
    - -
    -
    -
    -
    +
    +
    +

    An Error has Occurred

    Error 402

    -
    -
    -
    -
    - - - - - +
    +
    + +
    +
    + +
    +
    +
    + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl index 81b15da9d1..f099511379 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl @@ -1,14 +1,14 @@ Koha Online Catalog › An Error Has Occurred - + +
    +
    - -
    -
    -
    -
    +
    +
    +

    An Error has Occurred

    Error 403

    -
    -
    -
    -
    - - - - - +
    +
    + +
    +
    + +
    +
    +
    + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl index bb07e535ac..0f7472eaff 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl @@ -1,14 +1,14 @@ Koha Online Catalog › An Error Has Occurred - + +
    +
    - -
    -
    -
    -
    +
    +
    +

    An Error has Occurred

    Error 404

    -
    -
    -
    -
    - - - - - +
    +
    + +
    +
    + +
    +
    +
    + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl index f96e407559..d45c5db95d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl @@ -1,14 +1,14 @@ Koha Online Catalog › An Error Has Occurred - + +
    +
    - -
    -
    -
    -
    +
    +
    +

    An Error has Occurred

    Error 500

    -
    -
    -
    -
    - - - - - +
    +
    + +
    +
    + +
    +
    +
    + From ebf7f0cad0148e3ab859fd8bd572794a19f40361 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Fri, 16 Jul 2010 12:55:19 +0100 Subject: [PATCH 10/10] Bug 5021 Formatting of undefined serials dates Routine was checking undefinedness but such dates were normalized on retrieval to 0000-00-00 Also planned/received date should also be checked Signed-off-by: Galen Charlton --- C4/Serials.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 35cc5be846..032246c4e8 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -405,14 +405,17 @@ sub PrepareSerialsData { my $first; my $previousnote = ""; - foreach my $subs (@$lines) { - $subs->{'publisheddate'} = ( - $subs->{'publisheddate'} - ? format_date( $subs->{'publisheddate'} ) - : "XXX" - ); + foreach my $subs (@{$lines}) { + for my $datefield ( qw(publisheddate planneddate) ) { + # handle both undef and undef returned as 0000-00-00 + if (!defined $subs->{$datefield} or $subs->{$datefield}=~m/^00/) { + $subs->{$datefield} = 'XXX'; + } + else { + $subs->{$datefield} = format_date( $subs->{$datefield} ); + } + } $subs->{'branchname'} = GetBranchName( $subs->{'branchcode'} ); - $subs->{'planneddate'} = format_date( $subs->{'planneddate'} ); $subs->{ "status" . $subs->{'status'} } = 1; $subs->{"checked"} = $subs->{'status'} =~ /1|3|4|7/;