View | Details | Raw Unified | Return to bug 12029
Collapse All | Expand All

(-)a/Koha/Patron/Messages.pm (-4 / +1 lines)
Lines 41-54 Koha::Patron::Messages - Koha Message Object set class Link Here
41
=cut
41
=cut
42
42
43
sub filter_by_unread {
43
sub filter_by_unread {
44
    my ( $self, $params ) = @_;
44
    my ( $self ) = @_;
45
46
    $params ||= {};
47
45
48
    return $self->search(
46
    return $self->search(
49
        {
47
        {
50
            patron_read_date => { is => undef },
48
            patron_read_date => { is => undef },
51
            %$params,
52
        }
49
        }
53
    );
50
    );
54
}
51
}
(-)a/opac/opac-dismiss-message.pl (-1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Koha;
23
use C4::Context;
22
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
(-)a/t/db_dependent/Koha/Patron/Messages.t (-2 lines)
Lines 113-119 my $current_messages_count = $patron_obj->messages->count; Link Here
113
is( $patron_obj->messages->filter_by_unread->count, $current_messages_count, "No messages have been marked as read" );
113
is( $patron_obj->messages->filter_by_unread->count, $current_messages_count, "No messages have been marked as read" );
114
$new_message_4->update({ patron_read_date => dt_from_string });
114
$new_message_4->update({ patron_read_date => dt_from_string });
115
is( $patron_obj->messages->filter_by_unread->count, $current_messages_count - 1, "One message has been marked as read" );
115
is( $patron_obj->messages->filter_by_unread->count, $current_messages_count - 1, "One message has been marked as read" );
116
$new_message_4->update({ patron_read_date => undef });
117
116
118
$schema->storage->txn_rollback;
117
$schema->storage->txn_rollback;
119
118
120
- 

Return to bug 12029