[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Maintainance.pm,1.15,1.16
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/C4 Maintainance.pm,1.15,1.16 |
Date: |
Thu, 14 Jul 2005 02:53:12 -0700 |
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)address@hidden;
+ 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Maintainance.pm,1.15,1.16,
Henri-Damien LAURENT <=