[Koha-cvs] koha/opac opac-topissues.pl [rel_3_0]

paul poulain paul at koha-fr.org
Thu Jan 11 15:36:04 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	paul poulain <tipaul>	07/01/11 14:36:04

Modified files:
	opac           : opac-topissues.pl 

Log message:
	reindenting & removing useless var

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-topissues.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.4&r2=1.1.2.5

Patches:
Index: opac-topissues.pl
===================================================================
RCS file: /sources/koha/koha/opac/Attic/opac-topissues.pl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -b -r1.1.2.4 -r1.1.2.5
--- opac-topissues.pl	10 Jan 2007 14:34:50 -0000	1.1.2.4
+++ opac-topissues.pl	11 Jan 2007 14:36:04 -0000	1.1.2.5
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: opac-topissues.pl,v 1.1.2.4 2007/01/10 14:34:50 tipaul Exp $
+# $Id: opac-topissues.pl,v 1.1.2.5 2007/01/11 14:36:04 tipaul Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -42,8 +42,6 @@
 =cut
 
 my $input = new CGI;
-my $do_it=$input->param('do_it');
-
 my $branches = GetBranches();
 my $itemtypes = GetItemTypes();
 
@@ -55,18 +53,18 @@
 				debug => 1,
 				});
 my $dbh = C4::Context->dbh;
-    # Displaying results
-    my $limit = $input->param('limit') || 10;
-    my $branch = $input->param('branch');
-    my $itemtype = $input->param('itemtype');
-    my $timeLimit = $input->param('timeLimit') || 3;
-    my $whereclause;
-    $whereclause .= 'items.homebranch='.$dbh->quote($branch)." AND " if ($branch); 
-    $whereclause .= 'biblioitems.itemtype='.$dbh->quote($itemtype)." AND " if $itemtype;
-    $whereclause .= 'TO_DAYS(NOW()) - TO_DAYS(biblio.timestamp) <= '.$timeLimit*30 if $timeLimit;
-    $whereclause =~ s/ AND $//;
-    $whereclause = " WHERE ".$whereclause if $whereclause;
-    my $query = "SELECT biblio.timestamp, biblio.biblionumber, title, 
+# Displaying results
+my $limit = $input->param('limit') || 10;
+my $branch = $input->param('branch');
+my $itemtype = $input->param('itemtype');
+my $timeLimit = $input->param('timeLimit') || 3;
+my $whereclause;
+$whereclause .= 'items.homebranch='.$dbh->quote($branch)." AND " if ($branch); 
+$whereclause .= 'biblioitems.itemtype='.$dbh->quote($itemtype)." AND " if $itemtype;
+$whereclause .= 'TO_DAYS(NOW()) - TO_DAYS(biblio.timestamp) <= '.$timeLimit*30 if $timeLimit;
+$whereclause =~ s/ AND $//;
+$whereclause = " WHERE ".$whereclause if $whereclause;
+my $query = "SELECT biblio.timestamp, biblio.biblionumber, title, 
                     author, sum( items.issues ) AS tot, biblioitems.itemtype,
                     biblioitems.publishercode,biblioitems.publicationyear,
                     itemtypes.description
@@ -80,40 +78,41 @@
                     LIMIT $limit
                     ";
 
-    my $sth = $dbh->prepare($query);
-    $sth->execute();
-    my @results;
-    while (my $line= $sth->fetchrow_hashref) {
+my $sth = $dbh->prepare($query);
+$sth->execute();
+my @results;
+while (my $line= $sth->fetchrow_hashref) {
         push @results, $line;
-    }
+}
 
-    $template->param(do_it => 1,
+$template->param(do_it => 1,
         limit => $limit,
         branch => $branches->{$branch}->{branchname},
         itemtype => $itemtypes->{$itemtype}->{description},
         timeLimit => $timeLimit,
-                    results_loop => \@results);
+                results_loop => \@results,
+                );
     
-	my $branches = GetBranches;
-	my @branchloop;
-	foreach my $thisbranch (keys %$branches) {
+my $branches = GetBranches;
+my @branchloop;
+foreach my $thisbranch (keys %$branches) {
 			my %row =(value => $thisbranch,
 									branchname => $branches->{$thisbranch}->{'branchname'},
 							);
 			push @branchloop, \%row;
-	}
+}
 
-	#doctype
-	my $itemtypes = GetItemTypes;
-	my @itemtypeloop;
-	foreach my $thisitemtype (keys %$itemtypes) {
+#doctype
+my $itemtypes = GetItemTypes;
+my @itemtypeloop;
+foreach my $thisitemtype (keys %$itemtypes) {
 			my %row =(value => $thisitemtype,
 									description => $itemtypes->{$thisitemtype}->{'description'},
 							);
 			push @itemtypeloop, \%row;
-	}
+}
 	
-	$template->param(
+$template->param(
 					branchloop =>\@branchloop,
 					itemtypeloop =>\@itemtypeloop,
 					);





More information about the Koha-cvs mailing list