Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 16, 2018
1 parent 5d596fe commit 028be21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion htdocs/admin/emailcollector_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
{
$emailcollectoroperation = new EmailCollectorAction($db);
$emailcollectoroperation->type = GETPOST('operationtype','az09');
$emailcollectoroperation->actionparam = GETPOST('actionparam', 'alpha');
$emailcollectoroperation->actionparam = GETPOST('operationparam', 'none');
$emailcollectoroperation->fk_emailcollector = $object->id;
$emailcollectoroperation->status = 1;
$result = $emailcollectoroperation->create($user);
Expand Down
18 changes: 3 additions & 15 deletions htdocs/emailcollector/class/emailcollector.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,12 +1108,13 @@ public function doCollectOneCollector()
dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id);

// Search and create thirdparty
if ($operation['type'] == 'loadthirdparty' && $operation['type'] == 'loadandcreatethirdparty')
if ($operation['type'] == 'loadthirdparty' || $operation['type'] == 'loadandcreatethirdparty')
{
if (empty($operation['actionparam']))
{
$errorforactions++;
$this->errors = "Action loadthirdparty or loadandcreatethirdparty has empty parameter. Must be 'VALUE:xxx' or 'REGEX:(body|subject):regex' to extract";
$this->error = "Action loadthirdparty or loadandcreatethirdparty has empty parameter. Must be 'VALUE:xxx' or 'REGEX:(body|subject):regex' to define how to extract data";
$this->errors[] = $this->error;
}
else
{
Expand All @@ -1124,19 +1125,6 @@ public function doCollectOneCollector()
$arrayvaluetouse = dolExplodeIntoArray($actionparam, ';', '=');
foreach($arrayvaluetouse as $propertytooverwrite => $valueforproperty)
{
$tmpclass=''; $tmpproperty='';
$tmparray=explode('.', $propertytooverwrite);
if (count($tmparray) == 2)
{
$tmpclass=$tmparray[0];
$tmpproperty=$tmparray[1];
}
else
{
$tmpproperty=$tmparray[0];
}
//if ($tmpclass && ($tmpclass != $object->element)) continue; // Property is for another type of object

$sourcestring='';
$sourcefield='';
$regexstring='';
Expand Down

0 comments on commit 028be21

Please sign in to comment.