Bugzilla – Attachment 21069 Details for
Bug 10872
C4::Items GetHiddenItems fix and optimization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10872 - C4::Items GetHiddenItems fix and optimization
Bug-10872---C4Items-GetHiddenItems-fix-and-optimiz.patch (text/plain), 1.46 KB, created by
Mason James
on 2013-09-13 03:49:26 UTC
(
hide
)
Description:
Bug 10872 - C4::Items GetHiddenItems fix and optimization
Filename:
MIME Type:
Creator:
Mason James
Created:
2013-09-13 03:49:26 UTC
Size:
1.46 KB
patch
obsolete
>From a7812ac56695b613b10bdd6e73d92b7e951cd54e Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 10 Sep 2013 16:19:58 -0400 >Subject: [PATCH] Bug 10872 - C4::Items GetHiddenItems fix and optimization >Content-Type: text/plain; charset="utf-8" > >There should be a: >"require YAML;" >or >"use YAML qw/Load/;" > >as the GetHiddenItems routine has a reference to YAML::Load. > >This was discovered while adding a GetHiddenItems() call into >opac/opac-MARCdetail.pl. I believe this problem dates back to >bug 6488 or bug 5984. > >I also added an optimization to GetHiddenItems to prevent >processing if there is nothing in the system preference. Test >by searching for a biblio which has some or all of its items >hidden. > >Signed-off-by: Mason James <mtj@kohaaloha.com> >--- > C4/Items.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 4a98712..1715724 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -30,6 +30,7 @@ use MARC::Record; > use C4::ClassSource; > use C4::Log; > use List::MoreUtils qw/any/; >+use YAML qw/Load/; > use Data::Dumper; # used as part of logging item record changes, not just for > # debugging; so please don't remove this > >@@ -1629,6 +1630,7 @@ sub GetHiddenItemnumbers { > my @resultitems; > > my $yaml = C4::Context->preference('OpacHiddenItems'); >+ return () if (! $yaml =~ /\S/ ); > $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt > my $hidingrules; > eval { >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10872
:
20973
|
20977
|
21069
|
21075
|
21125