From 4a49d3268946a95c1e69f54a5bf977fb8d115b02 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Nov 2011 15:34:11 +0100 Subject: [PATCH] Fix: Removed warning --- htdocs/comm/action/document.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 542aac2679a..78322b2ecd2 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -22,7 +22,7 @@ /** * \file htdocs/comm/action/document.php * \ingroup agenda - * \brief Page des documents joints sur les actions + * \brief Page of documents linked to actions */ require("../../main.inc.php"); @@ -40,7 +40,7 @@ $langs->load("other"); $langs->load("bills"); if (isset($_GET["error"])) $error=$_GET["error"]; -$objectid = isset($_GET["id"])?$_GET["id"]:''; +$objectid = GETPOST("id"); // Security check if ($user->societe_id > 0) @@ -132,9 +132,7 @@ if ($objectid > 0) $author->fetch($act->author->id); $act->author=$author; - $contact=new Contact($db); - $contact->fetch($act->contact->id); - $act->contact=$contact; + if ($act->contact->id) $act->fetch_contact($act->contact->id); $head=actions_prepare_head($act); dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action');