[Koha-bugs] [Bug 17825] Remove C4::Members::AttributeTypes::AttributeTypeExists

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 29 22:27:57 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17825

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #58598|0                           |1
        is obsolete|                            |
  Attachment #58599|0                           |1
        is obsolete|                            |

--- Comment #6 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 61713
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61713&action=edit
Bug 17825: Remove the use of AttributeTypeExists from opac-user.pl

With the introducion of Koha::Object-based
Koha::Patron::Attribute::Type(s) there's no need for using this
function.

This patch replaces it with a regular ->search + ->count call.

To test:
- Have a user with checkouts logged into the OPAC on the opac-user.pl
page
- Set the SHOW_BCODE attribute to 'no' on the staff interface for the
user.
- Reload opac-user.pl
=> SUCCESS: The barcode is not shown for checked out items.
- Set the SHOW_BCODE atttribute to 'yes' on the staff interface for the
user.
- Reload opac-user.pl
=> SUCCESS: The barcode is shown for checked out items.
- Delete the Patron attribute type SHOW_BCODE
- Reload opac-user.pl
=> SUCCESS: No barcode is shown for checked out items
- Sign off :-D

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

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


More information about the Koha-bugs mailing list