From 8f0c10ef1bc09d820523fbaf528df45d72dfa782 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 - Correcting permissions checks on the home page - Adding default parameter (1) to numberofreviews subroutine Signed-off-by: Paul Poulain --- C4/Review.pm | 3 ++- koha-tmpl/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 d74f077442..49d90b371c 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 3eb0b21d0d..12861f6a3c 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 %] -- 2.39.5