[Koha-cvs] CVS: koha/C4 Maintainance.pm,1.15,1.16

Henri-Damien LAURENT hdl at users.sourceforge.net
Thu Jul 14 11:53:12 CEST 2005


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27552/C4

Modified Files:
	Maintainance.pm 
Log Message:
Adding a log facility for actions watching.
Code to be widely used in order to report data modifications.


Index: Maintainance.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Maintainance.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** Maintainance.pm	5 Nov 2004 00:08:22 -0000	1.15
--- Maintainance.pm	14 Jul 2005 09:53:10 -0000	1.16
***************
*** 53,57 ****
  @ISA = qw(Exporter);
  @EXPORT = qw(&listsubjects &updatesub &shiftgroup &deletedbib &undeletebib
! &updatetype);
  
  =item listsubjects
--- 53,57 ----
  @ISA = qw(Exporter);
  @EXPORT = qw(&listsubjects &updatesub &shiftgroup &deletedbib &undeletebib
! &updatetype &logaction);
  
  =item listsubjects
***************
*** 216,219 ****
--- 216,235 ----
  }
  
+ =item logaction
+ 
+   &logaction($usernumber, $modulename, $actionname, $infos);
+ 
+ Adds a record into action_logs table to report the different changes upon the database
+ 
+ =cut
+ #'
+ sub logaction{
+   my ($usernumber,$modulename, $actionname, $infos)=@_;
+   my $dbh = C4::Context->dbh;
+ 	my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,info) values (now(),?,?,?,?)");
+ 	$sth->execute($usernumber,$modulename,$actionname,$infos);
+ 	$sth->finish;
+ }
+ 
  END { }       # module clean-up code here (global destructor)
  





More information about the Koha-cvs mailing list