[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.56,1.57

Henri-Damien LAURENT hdl at users.sourceforge.net
Fri Jul 15 18:11:05 CEST 2005


Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30700/acqui.simple

Modified Files:
	addbiblio.pl 
Log Message:
Adding Log Facility.
Needs Two Update in database...
On more table (action_logs)
And One more syspref Activate_Log, with On|Off values.
Maintainance has been sweeped of previous Log functions
addbiblio.pl contains a sample of code using Log.pm
To be generalized to Authorities, acquisitions, members soon.



Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbiblio.pl,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** addbiblio.pl	20 Jun 2005 13:16:10 -0000	1.56
--- addbiblio.pl	15 Jul 2005 16:10:31 -0000	1.57
***************
*** 28,31 ****
--- 28,32 ----
  use C4::SearchMarc; # also includes Biblio.pm, SearchMarc is used to FindDuplicate
  use C4::Context;
+ use C4::Log;
  use C4::Koha; # XXX subfield_is_koha_internal_p
  use HTML::Template;
***************
*** 429,434 ****
--- 430,437 ----
  			NEWmodbiblioframework($dbh,$bibid,$frameworkcode);
  			NEWmodbiblio($dbh,$record,$bibid,$frameworkcode);
+ 			logaction($loggedinuser,"acqui.simple","modify","biblionumber :$oldbiblionumber\nrecord : ".$record->as_formatted) if (logstatus);
  		} else {
  			($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$record,$frameworkcode);
+ 			logaction($loggedinuser,"acqui.simple","add","biblionumber :$oldbibnum\nrecord : ".$record->as_formatted) if (logstatus);
  		}
  	# now, redirect to additem page
***************
*** 483,489 ****
  #------------------------------------------------------------------------------------------------------------------------------
  	&NEWdelbiblio($dbh,$bibid);
  	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=/cgi-bin/koha/search.marc/search.pl?type=intranet\"></html>";
  	exit;
! #------------------------------------------------------------------------------------------------------------------------------
  #------------------------------------------------------------------------------------------------------------------------------
  } else {
--- 486,494 ----
  #------------------------------------------------------------------------------------------------------------------------------
  	&NEWdelbiblio($dbh,$bibid);
+ 	logaction($loggedinuser,"acqui.simple","del","biblionumber :$bibid") if (logstatus);
+ 	
  	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=/cgi-bin/koha/search.marc/search.pl?type=intranet\"></html>";
  	exit;
! #------------------------------------------------------------------------------------------------------------------------------logaction($loggedinuser,"acqui.simple","add","biblionumber :$oldbibnum");
  #------------------------------------------------------------------------------------------------------------------------------
  } else {





More information about the Koha-cvs mailing list