Clean code
This commit is contained in:
parent
5c8dc4ed58
commit
ac75406e35
@ -234,7 +234,7 @@ if ($action == 'add') {
|
|||||||
} elseif ($action == 'delete' && $user->rights->ficheinter->supprimer) {
|
} elseif ($action == 'delete' && $user->rights->ficheinter->supprimer) {
|
||||||
// delete modele
|
// delete modele
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->delete();
|
$object->delete($user);
|
||||||
$id = 0;
|
$id = 0;
|
||||||
header('Location: '.$_SERVER["PHP_SELF"]);
|
header('Location: '.$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@ -411,16 +411,13 @@ class FichinterRec extends Fichinter
|
|||||||
/**
|
/**
|
||||||
* Delete template fichinter rec
|
* Delete template fichinter rec
|
||||||
*
|
*
|
||||||
* @param int $rowid Id of fichinter rec to delete. If empty, we delete current instance of fichinter rec
|
* @param User $user Object user who delete
|
||||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
* @param int $notrigger Disable trigger
|
||||||
* @param int $idwarehouse Id warehouse to use for stock change.
|
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function delete($rowid = 0, $notrigger = 0, $idwarehouse = -1)
|
public function delete(User $user, $notrigger = 0)
|
||||||
{
|
{
|
||||||
if (empty($rowid)) {
|
$rowid = $this->id;
|
||||||
$rowid = $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG);
|
dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG);
|
||||||
|
|
||||||
|
|||||||
@ -76,4 +76,7 @@ exclude:
|
|||||||
- name: PhpMissingParentConstructorInspection
|
- name: PhpMissingParentConstructorInspection
|
||||||
- name: PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection
|
- name: PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection
|
||||||
- name: PhpArrayUsedOnlyForWriteInspection
|
- name: PhpArrayUsedOnlyForWriteInspection
|
||||||
|
- name: PhpArrayIndexImmediatelyRewrittenInspection
|
||||||
|
- name: PhpParameterNameChangedDuringInheritanceInspection
|
||||||
|
- name: PhpDuplicateSwitchCaseBodyInspection
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user