Extrafields: Difference between revisions

Jump to navigation Jump to search
Line 30: Line 30:


== Load extrafield array in object ==
== Load extrafield array in object ==
<source lang="php">
<source lang="php">
$extrafields = new ExtraFields($db);
$extrafields = new ExtraFields($db);
Line 77: Line 76:


== After fetch method of this object class ==
== After fetch method of this object class ==
<source lang="php">
<source lang="php">
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
Line 107: Line 104:
}
}
else if ($reshook < 0) $error++;
else if ($reshook < 0) $error++;
</source>
== After delete method of this object class ==
<source lang="php">
// Removed extrafields
                    if (! $error)
                    {
                    if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
                    {
                    $result=$this->deleteExtraFields();
                    if ($result < 0)
                    {
                    $error++;
                    $errorflag=-4;
                    dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR);
                    }
                    }
                    }
</source>
</source>


Bureaucrats, emailconfirmed, Administrators
825

edits

Navigation menu