[Koha-bugs] [Bug 10872] C4::Items GetHiddenItems fix and optimization

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 13 11:18:27 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10872

Jonathan Druart <jonathan.druart at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #21069|0                           |1
        is obsolete|                            |

--- Comment #5 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 21075
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21075&action=edit
Bug 10872 - C4::Items GetHiddenItems fix and optimization

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 at kohaaloha.com>
Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>
Maybe
  return () unless $yaml =~ /\S/;
or
  return () if $yaml =~ /^\s*$/;
would have been easier to read.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list