forked from Wavyzz/dolibarr
Fix signature delete
This commit is contained in:
@@ -84,7 +84,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) {
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) {
|
||||
$result = $object->delete($id);
|
||||
$result = $object->delete($user);
|
||||
if ($result >= 0) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
use Stripe\ApiOperations\Delete;
|
||||
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
@@ -310,13 +312,15 @@ class Deplacement extends CommonObject
|
||||
/**
|
||||
* Delete record
|
||||
*
|
||||
* @param int $id Id of record to delete
|
||||
* @param User $user USer that Delete
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function delete($id)
|
||||
public function delete($user)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
$id = $this->id;
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = ".((int) $id);
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user