X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=mainpage.pl;h=49f46fc272f594848c9ac3cca3bb956ac4c4b000;hb=8f3d5fc3dc7da6d2733f2e9944835757736cc474;hp=c1df82b4420e829d3dc36e14911c16d8235a8029;hpb=da172a560f7c4c2ba3eab69144ddcac9043b2c3b;p=srvgit diff --git a/mainpage.pl b/mainpage.pl index c1df82b442..49f46fc272 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -63,17 +63,17 @@ my $branch = ? C4::Context->userenv()->{'branch'} : undef; -my $pendingcomments = Koha::Reviews->search({ approved => 0 })->count; +my $pendingcomments = Koha::Reviews->search_limited({ approved => 0 })->count; my $pendingtags = get_count_by_tag_status(0); my $pendingsuggestions = CountSuggestion("ASKED"); my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch ); my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }); -my $pending_article_requests = Koha::ArticleRequests->count( +my $pending_article_requests = Koha::ArticleRequests->search_limited( { status => Koha::ArticleRequest::Status::Pending, - $branch ? ( branchcode => $branch ) : (), + $branch ? ( 'me.branchcode' => $branch ) : (), } -); +)->count; $template->param( pendingcomments => $pendingcomments, @@ -84,11 +84,4 @@ $template->param( pending_article_requests => $pending_article_requests, ); -# -# warn user if they are using mysql/admin login -# -unless ($loggedinuser) { - $template->param(adminWarning => 1); -} - output_html_with_http_headers $query, $cookie, $template->output;