From e4e8dda3b09ce11acc85cb526c22c1c99b0d8589 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 17 Apr 2013 12:08:41 -0400 Subject: [PATCH] Address hash/list thinko; Ensure initialization Two cascading defects were identified after being reported by users. The first, which was only a potential issue, was an apparent lack of mod_perl initialization for the item-age record feed. While not the direct cause of the error message, a lack of initialization here would manifest in the same way. So, we check that initialization. Feed-generating callbacks were not being constructed properly due to a simple thinko in the construction of the default record format list provided by the SuperCat backend. We need a list of two hashes, not a hash of two keys. Signed-off-by: Mike Rylander Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm | 2 +- Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm index c8d35b6e59..2e7000eaef 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm @@ -3002,8 +3002,8 @@ sub list_record_formats { docs => 'http://www.loc.gov/marcxml/', schema_location => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd', }, - marc21 => { docs => 'http://www.loc.gov/marc/' } }, + { marc21 => { docs => 'http://www.loc.gov/marc/' } } ); for my $type ( keys %record_xslt ) { diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm index 1956b5a6a9..16fdb24a58 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm @@ -1713,6 +1713,8 @@ sub item_age_browse { my $apache = shift; return Apache2::Const::DECLINED if (-e $apache->filename); + check_child_init(); + my $cgi = new CGI; my $year = (gmtime())[5] + 1900; -- 2.43.2