View Issue Details

IDProjectCategoryView StatusLast Update
381PHPOF2_Audit_GenericDbpublic9 May 2011 20:50
Reportermrosenquist Assigned Totimj  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Summary381: Auditing should only record an event if there is a change or there is a note
DescriptionAuditing should only record an event if there is a change or there is a note
TagsNo tags attached.
Attached Files
GenericDb.php.bug381.patch (536 bytes)   
--- ./pear_local/php/PHPOF2/Audit/GenericDb.php.orig	2011-04-20 14:16:50.000000000 +0100
+++ ./pear_local/php/PHPOF2/Audit/GenericDb.php	2011-04-20 14:18:08.000000000 +0100
@@ -85,6 +85,11 @@
 
 	public function recordEvent($event_type, $table_name, $pri_key, $owner, $note, array $changes)
 	{	
+		// Check if there is any information to record
+		if (empty($note) && count($changes)==0) {
+			return;
+		}
+	
 		// Mapping of input variables to the audit_events table columns
 		$storage_mappings = array(
 			'event_type' => 'type',
GenericDb.php.bug381.patch (536 bytes)   

Activities

timj

9 May 2011 20:50

manager   ~385

Thanks for the patch! I'm trying to write tests for all new bugs but it looks good

Issue History

Date Modified Username Field Change
20 Apr 2011 13:57 mrosenquist New Issue
20 Apr 2011 14:19 mrosenquist File Added: GenericDb.php.bug381.patch
9 May 2011 20:50 timj Note Added: 385
9 May 2011 20:50 timj Assigned To => timj
9 May 2011 20:50 timj Status new => assigned