[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.2,1.21.2.3

Steve Tonnesen tonnesen at users.sourceforge.net
Sat Jul 27 07:30:14 CEST 2002


Update of /cvsroot/koha/koha/C4/Circulation
In directory usw-pr-cvs1:/tmp/cvs-serv24481/C4/Circulation

Modified Files:
      Tag: rel-1-2
	Circ2.pm 
Log Message:
New script for setting user flags.  Link from member modification page
(moremember.pl).


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.21.2.2
retrieving revision 1.21.2.3
diff -C2 -r1.21.2.2 -r1.21.2.3
*** Circ2.pm	24 Jun 2002 22:08:20 -0000	1.21.2.2
--- Circ2.pm	27 Jul 2002 05:30:12 -0000	1.21.2.3
***************
*** 111,121 ****
      $sth->execute;
      my $borrower=$sth->fetchrow_hashref;
!     my $flags=patronflags($env, $borrower, $dbh);
      $sth->finish;
      $dbh->disconnect;
      print O "$borrower->{'surname'} <---\n";
      close O;
      $borrower->{'flags'}=$flags;
!     return($borrower, $flags);
  }
  
--- 111,130 ----
      $sth->execute;
      my $borrower=$sth->fetchrow_hashref;
!     my $accessflagsint=$borrower->{flags};
!     my $accessflagshash;
      $sth->finish;
+     my $flags=patronflags($env, $borrower, $dbh);
+     $sth=$dbh->prepare("select bit,flag from userflags");
+     $sth->execute;
+     while (my ($bit, $flag) = $sth->fetchrow) {
+ 	if ($accessflagsint & 2**$bit) {
+ 	    $accessflagshash->{$flag}=1;
+ 	}
+     }
      $dbh->disconnect;
      print O "$borrower->{'surname'} <---\n";
      close O;
      $borrower->{'flags'}=$flags;
!     return($borrower, $flags, $accessflagshash);
  }
  





More information about the Koha-cvs mailing list