From 0a09adaa2e04943d3b9a70b344d5614ea1d95e8a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 7 Dec 2011 10:02:56 -0500 Subject: [PATCH] Bug 7259 - Show a count of items pending approval on staff client home and tools pages Content-Type: text/plain; charset="utf-8" - Correcting permissions checks on the home page - Adding default parameter (1) to numberofreviews subroutine --- C4/Review.pm | 3 ++- .../intranet-tmpl/prog/en/modules/intranet-main.tt | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Review.pm b/C4/Review.pm index d74f077..49d90b3 100644 --- a/C4/Review.pm +++ b/C4/Review.pm @@ -91,7 +91,8 @@ sub updatereview { } sub numberofreviews { - my ($status) = @_; + my ($param) = @_; + my $status = (defined($param) ? $param : 1); my $dbh = C4::Context->dbh; my $query = "SELECT count(*) FROM reviews WHERE approved=?"; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index 3eb0b21..12861f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -97,8 +97,8 @@

Tools

[% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) %] [% END %] [% END %] -- 1.7.3