zapier trigger

This commit is contained in:
Frédéric FRANCE 2019-09-30 22:03:42 +02:00
parent 73beec6526
commit b74a93e194
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1

View File

@ -58,7 +58,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
$this->description = "Zapier triggers."; $this->description = "Zapier triggers.";
// 'development', 'experimental', 'dolibarr' or version // 'development', 'experimental', 'dolibarr' or version
$this->version = 'development'; $this->version = 'development';
$this->picto = 'zapier@zapier'; $this->picto = 'zapier';
} }
/** /**
@ -102,6 +102,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
return 0; return 0;
} }
$logtriggeraction = false; $logtriggeraction = false;
$sql = '';
if ($action!='') { if ($action!='') {
$actions = explode('_', $action); $actions = explode('_', $action);
$sql = 'SELECT rowid, url FROM '.MAIN_DB_PREFIX.'zapier_hook'; $sql = 'SELECT rowid, url FROM '.MAIN_DB_PREFIX.'zapier_hook';
@ -460,7 +461,7 @@ function cleanObjectDatas($toclean)
if (isset($toclean->lines) && count($toclean->lines) > 0) { if (isset($toclean->lines) && count($toclean->lines) > 0) {
$nboflines = count($toclean->lines); $nboflines = count($toclean->lines);
for ($i=0; $i < $nboflines; $i++) { for ($i=0; $i < $nboflines; $i++) {
$this->cleanObjectDatas($toclean->lines[$i]); cleanObjectDatas($toclean->lines[$i]);
} }
} }