From 5fb1dc684b49923022a8d560df7ed6a850303ff6 Mon Sep 17 00:00:00 2001 From: rangi Date: Sat, 17 Jun 2006 22:29:37 +0000 Subject: [PATCH] Can now approve or delete reviews --- reviews/reviewswaiting.pl | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/reviews/reviewswaiting.pl b/reviews/reviewswaiting.pl index 94f78aa0e2..0888682096 100755 --- a/reviews/reviewswaiting.pl +++ b/reviews/reviewswaiting.pl @@ -10,16 +10,28 @@ use HTML::Template; use C4::Review; my $query = new CGI; -my ($template, $loggedinuser, $cookie) -= get_template_and_user({template_name => "reviews/reviewswaiting.tmpl", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {catalogue => 1}, - debug => 1, - }); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "reviews/reviewswaiting.tmpl", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { catalogue => 1 }, + debug => 1, + } +); -my $reviews=getallreviews(0); -$template->param(reviews => $reviews); +my $op = $query->param('op'); +my $reviewid = $query->param('reviewid'); + +if ( $op eq 'approve' ) { + approvereview($reviewid); +} +elsif ( $op eq 'delete' ) { + deletereview($reviewid); +} + +my $reviews = getallreviews(0); +$template->param( reviews => $reviews ); output_html_with_http_headers $query, $cookie, $template->output; -- 2.39.5