Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6b000698e0
1 changed files with 11 additions and 10 deletions
|
|
@ -791,9 +791,10 @@ abstract class CommonInvoice extends CommonObject
|
|||
if (!empty($hookmanager->resArray['result'])) {
|
||||
$this->error = $hookmanager->resArray['error'];
|
||||
if (!empty($hookmanager->resArray['errors'])) {
|
||||
$this->errors = array_merge($this->errors, array($this->error), $hookmanager->resArray['errors']);
|
||||
} else {
|
||||
$this->errors = array_merge($this->errors, array($this->error));
|
||||
$this->errors = array_merge($this->errors, $hookmanager->resArray['errors']);
|
||||
}
|
||||
if (!in_array($this->error, $this->errors)) {
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
return $hookmanager->resArray['result'];
|
||||
}
|
||||
|
|
@ -846,15 +847,15 @@ abstract class CommonInvoice extends CommonObject
|
|||
}
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('isEditable', $parameters, $this, $action);
|
||||
$reshook = $hookmanager->executeHooks('isReplacable', $parameters, $this, $action);
|
||||
if (!empty($hookmanager->resArray['result'])) {
|
||||
$this->error = $hookmanager->resArray['error'];
|
||||
if (!in_array($this->error, $this->errors)) {
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
if (!empty($hookmanager->resArray['errors'])) {
|
||||
$this->errors = array_merge($this->errors, $hookmanager->resArray['errors']);
|
||||
}
|
||||
if (!in_array($this->error, $this->errors)) {
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
return $hookmanager->resArray['result'];
|
||||
}
|
||||
|
||||
|
|
@ -959,12 +960,12 @@ abstract class CommonInvoice extends CommonObject
|
|||
$reshook = $hookmanager->executeHooks('isErasable', $parameters, $this, $action);
|
||||
if (!empty($hookmanager->resArray['result'])) {
|
||||
$this->error = $hookmanager->resArray['error'];
|
||||
if (!in_array($this->error, $this->errors)) {
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
if (!empty($hookmanager->resArray['errors'])) {
|
||||
$this->errors = array_merge($this->errors, $hookmanager->resArray['errors']);
|
||||
}
|
||||
if (!in_array($this->error, $this->errors)) {
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
return $hookmanager->resArray['result'];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue