diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 2b68c5ad13f..edca64dfcf8 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -42,8 +42,7 @@ $ref = GETPOST('ref', 'alpha');
// Security check
if ($user->societe_id > 0)
{
- unset($_GET["action"]);
- $action='';
+ unset($action);
$socid = $user->societe_id;
}
$result = restrictedArea($user, 'societe', $id, '&societe');
@@ -188,8 +187,7 @@ if ($object->id)
$formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,'',0,0,$user->rights->societe->creer,50,$object);
// List of document
- $param='&socid='.$object->id;
- $formfile->list_of_documents($filearray,$object,'societe',$param);
+ $formfile->list_of_documents($filearray,$object,'societe');
print "
";
}