Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
//echo $action.'<br>';
if ($action == 'PROPAL_CREATE') {
// only for clone proposal and if version number is used
if ($object->context['createfromclone'] == 'createfromclone' && !empty($object->array_options['options_propalehistory_version_num'])) {
if (isset($object->context['createfromclone']) == 'createfromclone' && !empty($object->array_options['options_propalehistory_version_num'])) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non. Tu veux avoir la valeur de $object->context['createfromclone'], tu ne veux pas seulement savoir si c'est set.

$object->array_options['options_propalehistory_version_num'] = null; // reset version number
$result = $object->insertExtraFields();
if ($result < 0) {
Expand All @@ -128,7 +128,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
} elseif ($action == 'PROPAL_VALIDATE' && $conf->global->PROPALEHISTORY_AUTO_ARCHIVE) {
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);

define('INC_FROM_DOLIBARR', true);
//define('INC_FROM_DOLIBARR', true);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi tu as commenté ça ?

dol_include_once("/propalehistory/config.php");
dol_include_once("/comm/propal/class/propal.class.php");
dol_include_once('/propalehistory/class/propaleHist.class.php');
Expand Down