Skip to content
Snippets Groups Projects
Commit c3f59620 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Normalize code

parent 142a2e34
Branches
No related tags found
No related merge requests found
...@@ -111,6 +111,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->stock->su ...@@ -111,6 +111,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->stock->su
$result=$object->delete($user); $result=$object->delete($user);
if ($result > 0) if ($result > 0)
{ {
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
header("Location: ".DOL_URL_ROOT.'/product/stock/list.php'); header("Location: ".DOL_URL_ROOT.'/product/stock/list.php');
exit; exit;
} }
......
...@@ -215,9 +215,10 @@ class Entrepot extends CommonObject ...@@ -215,9 +215,10 @@ class Entrepot extends CommonObject
* Delete a warehouse * Delete a warehouse
* *
* @param User $user Object user that made deletion * @param User $user Object user that made deletion
* @param int $notrigger 1=No trigger
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function delete($user) function delete($user, $notrigger=0)
{ {
$this->db->begin(); $this->db->begin();
......
...@@ -233,7 +233,7 @@ class EntrepotTest extends PHPUnit_Framework_TestCase ...@@ -233,7 +233,7 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
$localobject=new Entrepot($this->savdb); $localobject=new Entrepot($this->savdb);
$result=$localobject->fetch($id); $result=$localobject->fetch($id);
$result=$localobject->delete($id); $result=$localobject->delete($user);
print __METHOD__." id=".$id." result=".$result."\n"; print __METHOD__." id=".$id." result=".$result."\n";
$this->assertLessThan($result, 0); $this->assertLessThan($result, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment