X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=mainpage.pl;h=f4efc653b813bd74dc01fc1bf7c59601ff5bf397;hb=ba9b55d5ca56231c887cc3d818071f72e390a8a7;hp=d0635cbbb63a9a793fc194c414e3aa2e46fbf458;hpb=e5571ddd660c204c40fe7be6f08ae9c03a00426b;p=koha.git diff --git a/mainpage.pl b/mainpage.pl index d0635cbbb6..f4efc653b8 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -28,8 +28,8 @@ use C4::NewsChannels; # GetNewsToDisplay use C4::Review qw/numberofreviews/; use C4::Suggestions qw/CountSuggestion/; use C4::Tags qw/get_count_by_tag_status/; -use Koha::Borrower::Modifications; -use Koha::Borrower::Discharge; +use Koha::Patron::Modifications; +use Koha::Patron::Discharge; my $query = new CGI; @@ -56,7 +56,8 @@ $template->param( ); my $branch = - C4::Context->preference("IndependentBranchesPatronModifications") + ( C4::Context->preference("IndependentBranchesPatronModifications") + || C4::Context->preference("IndependentBranches") ) && !$flags->{'superlibrarian'} ? C4::Context->userenv()->{'branch'} : undef; @@ -64,9 +65,8 @@ my $branch = my $pendingcomments = numberofreviews(0); my $pendingtags = get_count_by_tag_status(0); my $pendingsuggestions = CountSuggestion("ASKED"); -my $pending_borrower_modifications = - Koha::Borrower::Modifications->GetPendingModificationsCount( $branch ); -my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 }); +my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); +my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); $template->param( pendingcomments => $pendingcomments,