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