From e283c1516c33f9b6f1e5b0c572e192ef4ac254d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Apr 2006 01:28:16 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20bug=20#16322=20:=20Cr=E9ation=20PDF=20fi?= =?UTF-8?q?che=20intervention=20impossible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/fichinter/fiche.php | 26 +++++++------- htdocs/fichinter/fichinter.class.php | 34 ++++++++++-------- htdocs/html.form.class.php | 10 ++++++ .../modules/fichinter/modules_fichinter.php | 2 +- .../modules/fichinter/pdf_soleil.modules.php | 35 ++++++++++++++----- 5 files changed, 70 insertions(+), 37 deletions(-) diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 112ffc8d5b7..98f97325c40 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -36,12 +36,8 @@ if (defined("FICHEINTER_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/mod require_once(DOL_DOCUMENT_ROOT ."/includes/modules/ficheinter/".FICHEINTER_ADDON.".php"); } -// Sécurité accés client -if ($user->societe_id > 0) -{ - $action = ''; - $socidp = $user->societe_id; -} +$user->getrights("ficheinter"); +if (!$user->rights->ficheinter->lire) accessforbidden(); if ($_GET["socidp"]) @@ -50,6 +46,13 @@ if ($_GET["socidp"]) $objsoc->fetch($_GET["socidp"]); } +// Sécurité accés client +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + /* * Traitements des actions @@ -94,15 +97,14 @@ if ($_POST["action"] == 'update') $_GET["id"]=$_POST["id"]; // Force raffraichissement sur fiche venant d'etre créée } -/** - * Generation du pdf - */ +// Generation du pdf if ($_GET["action"] == 'generate' && $_GET["id"]) { - fichinter_pdf_create($db, $_GET["id"]); + fichinter_pdf_create($db, $_GET["id"], $_POST['model']); } + llxHeader(); $sel = new Form($db); @@ -164,7 +166,7 @@ if ($_GET["action"] == 'create') if ($conf->projet->enabled) { - // Projet associ + // Projet associe $langs->load("project"); print ''.$langs->trans("Project").'