commit
f151dc1951
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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 = '<pre>'.print_r($request_data, true).'</pre>';
|
||||
// $debug .= '<pre>'.print_r(DolibarrApiAccess::$user->rights->zapier, true).'</pre>';
|
||||
// mail('frederic.france@free.fr', 'test hook', $debug);
|
||||
if (! DolibarrApiAccess::$user->rights->zapier->write) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ if ($object->id > 0)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
$object->info($object->id);
|
||||
print dol_print_object_info($object, 1);
|
||||
dol_print_object_info($object, 1);
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user