diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index 6df86f1c8f3..0f26d395ef4 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -38,6 +38,7 @@ if (! empty($_REQUEST['socid_id'])) } // Security check +$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid']; if (!$user->rights->categorie->lire) accessforbidden(); if (isset ($_REQUEST['choix'])) @@ -61,18 +62,11 @@ if ($_REQUEST['catorigin']) if ($_GET['type'] == 0) $idCatOrigin = $_REQUEST['catorigin']; } -// If socid provided by ajax company selector -if (! empty($_REQUEST['socid_id'])) -{ - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; -} /* -* Actions -*/ + * Actions + */ if ($_POST["action"] == 'add' && $user->rights->categorie->creer) { @@ -247,7 +241,7 @@ if ($user->rights->categorie->creer) else { print '