[Koha-cvs] koha/intranet/cgi-bin/reviews reviewswaiting.pl [rel_TG]

Tumer Garip tgarip at neu.edu.tr
Sat Mar 10 02:25:18 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_TG
Changes by:	Tumer Garip <tgarip1957>	07/03/10 01:25:18

Added files:
	intranet/cgi-bin/reviews: reviewswaiting.pl 

Log message:
	fresh files for rel_TG

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/cgi-bin/reviews/reviewswaiting.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1

Patches:
Index: reviewswaiting.pl
===================================================================
RCS file: reviewswaiting.pl
diff -N reviewswaiting.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ reviewswaiting.pl	10 Mar 2007 01:25:18 -0000	1.1.2.1
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Context;
+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 $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;





More information about the Koha-cvs mailing list