diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 0c616ca2579..26bb7c5818e 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -63,9 +63,9 @@ if (!$error) { } // Security check +$socid = ''; if (!empty($user->socid)) { $socid = $user->socid; - $object->id = $user->socid; } restrictedArea($user, 'propal', $object->id); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index f1b6b2221e6..0a7584248c0 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -45,13 +45,6 @@ $confirm = GETPOST('confirm', 'alpha'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -// Security check -$socid = ''; -if (!empty($user->socid)) { - $socid = $user->socid; -} -$result = restrictedArea($user, 'propal', $id); - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -84,9 +77,9 @@ $object->fetch($id, $ref); $permissiontoadd = $user->rights->propal->creer; // Security check +$socid = ''; if (!empty($user->socid)) { $socid = $user->socid; - $object->id = $user->socid; } restrictedArea($user, 'propal', $object->id); diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 4a772dae1d2..ace4556fb62 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -49,9 +49,9 @@ if ($id > 0 || !empty($ref)) { } // Security check +$socid = ''; if ($user->socid > 0) { $socid = $user->socid; - $object->id = $user->socid; } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context