Une erreur s'est glissée dans le code que j'ai envoyé dans le mail, le
code proposé dans le premier "cadre" de code n'était pas bon et doit
être remplacé par le code suivant :

+-CODE------------------------------------------------------------------------------------------------------------------------+
/       //General wrapping
        if(isset($modulepart))
        {
                $subPermConstName = 
strtoupper($modulepart).'_SUBPERM_FOR_DOCUMENTS';
                $subPerm = $conf->global->$subPermConstName;
                if(($user->rights->$modulepart->lire) ||
($user->rights->$modulepart->download) || (isset($subPerm) &&
(($user->rights->$modulepart->$subPerm->lire) ||
($user->rights->$modulepart->$subPerm->download))) )
                {
                        $accessallowed=1;
                }
                
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
                $sqlProtectConstName =
strtoupper($modulepart).'_SQLPROTECTAGAINSTEXTERNALS_FOR_DOCUMENTS';
                $sqlprotectagainstexternals = 
$conf->global->$sqlProtectConstName;
        }
+---------------------------------------------------------------------------------------------------------------------------------+


-- 
Pierre Morin
[email protected] 



_______________________________________________
Dolibarr-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à