[Koha-bugs] [Bug 15632] Move the messages related code to Koha::Patron::Messages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 29 08:17:22 CET 2016


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48014|0                           |1
        is obsolete|                            |
  Attachment #48015|0                           |1
        is obsolete|                            |
  Attachment #48016|0                           |1
        is obsolete|                            |
  Attachment #48017|0                           |1
        is obsolete|                            |
  Attachment #48018|0                           |1
        is obsolete|                            |
  Attachment #48020|0                           |1
        is obsolete|                            |

--- Comment #40 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 48422
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48422&action=edit
Bug 15632: Koha::Patron::Messages - Remove GetMessages

This subroutine just retrieved the messages given some parameters.
Some job should not have been done in this subroutine.
It was called only 3 times, in circ/circulation.pl and opac-user.pl.
Basically it was used to retrieved the message to displaye for a given
patron ($borrowernumber) at the OPAC (B) or Staff (L).

For the 3 calls, the 2 parameters $borrowernumber and $type
(message_type) were passed, the "%" trick at the beginning of the
subroutine was useless.
Moreover, the date formatting should be done on the TT side, not in
subroutine.
The can_delete flag was set if the branchcode given in parameter was the
same as the one of the message. This has been delegated to the template.
Indeed the can_delete was not valid, since it must depend on the
AllowAllMessageDeletion pref.
The test is now:
  IF message.branchcode == branch OR
  Koha.Preference('AllowAllMessageDeletion'')

There is not specific test plan for this patch, the changes have already
been tested in previous patches.

Signed-off-by: Marc Véron <veron at veron.ch>

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


More information about the Koha-bugs mailing list