From 3a2f76512bbaf959db8a3cee6ac2e35c991aba41 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 30 Jul 2013 17:28:08 +0200 Subject: [PATCH] Category contact again --- htdocs/categories/viewcat.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a27d9a1a460..da18c5eba76 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -72,25 +72,32 @@ if ($id > 0 && $removeelem > 0) $result = $tmpobject->fetch($removeelem); $elementtype = 'product'; } - if ($type==1 && $user->rights->societe->creer) + else if ($type==1 && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'fournisseur'; } - if ($type==2 && $user->rights->societe->creer) + else if ($type==2 && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'societe'; } - if ($type == 3 && $user->rights->adherent->creer) + else if ($type == 3 && $user->rights->adherent->creer) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $tmpobject = new Adherent($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'member'; } + else if ($type == 4 && $user->rights->societe->creer) { + + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + $tmpobject = new Contact($db); + $result = $tmpobject->fetch($removeelem); + $elementtype = 'contact'; + } $result=$object->del_type($tmpobject,$elementtype); if ($result < 0) dol_print_error('',$object->error);