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

(-)a/Koha/Template/Plugin/Biblio.pm (+1 lines)
Lines 63-68 sub CanArticleRequest { Link Here
63
    return $biblio ? $biblio->can_article_request( $borrower ) : 0;
63
    return $biblio ? $biblio->can_article_request( $borrower ) : 0;
64
}
64
}
65
65
66
# Do not use RecallsCount, it is deprecated and will be removed in a future release.
66
sub RecallsCount {
67
sub RecallsCount {
67
    my ( $self, $biblionumber ) = @_;
68
    my ( $self, $biblionumber ) = @_;
68
69
(-)a/installer/data/mysql/atomicupdate/bug_35783.pl (+25 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35873",
5
    description => "Biblio.RecallsCount is deprecated",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        my ($count) = $dbh->selectrow_array(
12
            q{
13
            SELECT COUNT(*)
14
            FROM letter
15
            WHERE content LIKE "%Biblio.RecallsCount%";
16
        }
17
        );
18
19
        if ($count) {
20
            say $out "WARNING - Biblio.RecallsCount is used in at least one notice template";
21
            say $out "It is deprecated and will be remove in a future version of Koha.";
22
            say $out "Replace it with biblio.recalls.search( completed => 0 ).count instead";
23
        }
24
    },
25
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc (-1 / +1 lines)
Lines 130-136 Link Here
130
        [%- ELSE -%]
130
        [%- ELSE -%]
131
        <li>
131
        <li>
132
        [%- END -%]
132
        [%- END -%]
133
            <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% Biblio.RecallsCount( biblio_object_id ) | html %])</a>
133
            <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% biblio.recalls.search( completed => 0 ).count | html %])</a>
134
        </li>
134
        </li>
135
        [%- END -%]
135
        [%- END -%]
136
    </ul>
136
    </ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-2 / +1 lines)
Lines 570-576 Link Here
570
                                                        [% END %]
570
                                                        [% END %]
571
                                                    [% END # /IF SEARCH_RESULT.norequests %]
571
                                                    [% END # /IF SEARCH_RESULT.norequests %]
572
                                                    [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
572
                                                    [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
573
                                                        | <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]">Recalls ([% Biblio.RecallsCount( SEARCH_RESULT.biblionumber ) | html %])</a>
573
                                                        | <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]">Recalls ([% SEARCH_RESULT.biblio_object.recalls.search( completed => 1 ).count | html %])</a>
574
                                                    [% END %]
574
                                                    [% END %]
575
575
576
                                                    [% IF Koha.Preference('intranetbookbag') == 1 %]
576
                                                    [% IF Koha.Preference('intranetbookbag') == 1 %]
577
- 

Return to bug 35783