diff --git a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php b/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php index 9d24af321e7..d32b188d029 100644 --- a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php +++ b/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php @@ -58,7 +58,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers $this->description = "Zapier triggers."; // 'development', 'experimental', 'dolibarr' or version $this->version = 'development'; - $this->picto = 'zapier@zapier'; + $this->picto = 'zapier'; } /** @@ -102,6 +102,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers return 0; } $logtriggeraction = false; + $sql = ''; if ($action!='') { $actions = explode('_', $action); $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) { $nboflines = count($toclean->lines); for ($i=0; $i < $nboflines; $i++) { - $this->cleanObjectDatas($toclean->lines[$i]); + cleanObjectDatas($toclean->lines[$i]); } } diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index b2adc8ce5ff..f6e825b2190 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -75,7 +75,7 @@ class Contacts extends DolibarrApi throw new RestException(401, 'No permission to read contacts'); } if ($id ==0) { - $result = $this->contact->intiAsSpecimen(); + $result = $this->contact->initAsSpecimen(); } else { $result = $this->contact->fetch($id); } diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 919961b4f8f..3c622a6769f 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -77,7 +77,7 @@ class Thirdparties extends DolibarrApi throw new RestException(401); } if ($id ==0) { - $result = $this->company->intiAsSpecimen(); + $result = $this->company->initAsSpecimen(); } else { $result = $this->company->fetch($id); } diff --git a/htdocs/zapier/class/api_zapier.class.php b/htdocs/zapier/class/api_zapier.class.php index 239ee5227d6..287f1b9e3b7 100644 --- a/htdocs/zapier/class/api_zapier.class.php +++ b/htdocs/zapier/class/api_zapier.class.php @@ -210,7 +210,8 @@ class ZapierApi extends DolibarrApi $sql.= $db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $db->query($sql); + $i = 0; if ($result) { $num = $db->num_rows($result); while ($i < $num) { @@ -240,9 +241,6 @@ class ZapierApi extends DolibarrApi */ public function post($request_data = null) { - // $debug = '
'.print_r($request_data, true).''; - // $debug .= '
'.print_r(DolibarrApiAccess::$user->rights->zapier, true).''; - // mail('frederic.france@free.fr', 'test hook', $debug); if (! DolibarrApiAccess::$user->rights->zapier->write) { throw new RestException(401); } diff --git a/htdocs/zapier/hook_agenda.php b/htdocs/zapier/hook_agenda.php index 924db3b8632..b536b264952 100644 --- a/htdocs/zapier/hook_agenda.php +++ b/htdocs/zapier/hook_agenda.php @@ -196,7 +196,7 @@ if ($object->id > 0) print ''; $object->info($object->id); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print '';