Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » v1.34 issue with audit_logging and getFieldspec_original
v1.34 issue with audit_logging and getFieldspec_original [message #1304] Thu, 03 April 2008 19:09 Go to previous message
cpscdave is currently offline  cpscdave
Messages: 20
Registered: June 2006
Junior Member
Hi Tony,
I have not verified if this is also in 1.35.

We are running Apache 2.2.4 and PHP 5.2.0

What appears to be happening is when I set $table->audit_logging = false; or
$table->audit_logging = 0;

All is fine until
_dml_insertRecord
...
$DML->fieldspec = $this->getFieldSpec_original();

In here
if (!empty($this->audit_logging)) {
$save_audit_logging = $this->audit_logging;
} // if

Is not saving the audit_logging, and then it gets turned back on.

I did some tests:
if( $this->tablename   == 'history')
      {
	print "\nIN HISTORY al\n";
	print "\nal: {$this->audit_logging}al\n";
	//exit;
	
	if(!empty($this->audit_logging))
	{
	  print "is not empty would save \n";
	}
	else
	{
	  print "is empty will NOT save\n";
	}
	if(isset($this->audit_logging))
	{
	  print "is set\n";
	}
	else
	{
	  print "is not set\n";
	}
	if($this->audit_logging===false)
	{
	  print "is false\n";
	}
	else
	{
	  print "is not false\n";
	}
	exit;
      }

outputs when I do $table->audit_logging = false;
is empty will NOT save
is set
is false

outputs when I do $table->audit_logging = 0;
is empty will NOT save
is set
is not false

outputs when I do $table->audit_logging = true;
is not empty would save
is set
is not false

Prehaps the code should be changed to:

  if ($this->audit_logging===false) {
        	$save_audit_logging = $this->audit_logging;
        } // if


Is there a standard for setting variables within Radicore?
Should we be using true/false, 1/0, unset()?

Thanks,
SoftElephant
 
Read Message
Read Message
Previous Topic: Problem in Delete Operation
Next Topic: v 1.35 - Inconsistent SQL files
Goto Forum:
  


Current Time: Sun May 12 01:51:34 EDT 2024

Total time taken to generate the page: 0.00855 seconds