Add: avertissement sur l'utilisation de la protection des pdf
This commit is contained in:
parent
a45e1cfbf8
commit
35b8ab7565
@ -165,7 +165,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("Security"));
|
||||
|
||||
|
||||
$var=false;
|
||||
$form = new Form($db);
|
||||
$html = new Form($db);
|
||||
|
||||
|
||||
// Choix du gestionnaire du générateur de mot de passe
|
||||
@ -318,7 +318,11 @@ print '</tr>';
|
||||
// Encryption et protection des PDF
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="3">'.$langs->trans("ProtectAndEncryptPdfFiles").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$text = $langs->trans("ProtectAndEncryptPdfFiles");
|
||||
$desc = $html->textwithwarning($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1);
|
||||
print $desc;
|
||||
print '</td>';
|
||||
print '<td align="center" width="20">';
|
||||
if($conf->global->PDF_SECURITY_ENCRYPTION == 1)
|
||||
{
|
||||
@ -327,18 +331,16 @@ if($conf->global->PDF_SECURITY_ENCRYPTION == 1)
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center" width="100">';
|
||||
if ($conf->global->PDF_SECURITY_ENCRYPTION == 0)
|
||||
{
|
||||
print '<td align="center" width="100">';
|
||||
print '<a href="security.php?action=activate_pdfsecurity">'.$langs->trans("Activate").'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
if($conf->global->PDF_SECURITY_ENCRYPTION == 1)
|
||||
{
|
||||
print '<td align="center" width="100">';
|
||||
print '<a href="security.php?action=disable_pdfsecurity">'.$langs->trans("Disable").'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
@ -106,6 +106,48 @@ class Form
|
||||
return $s;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche un texte avec picto alert qui affiche un tooltip
|
||||
\param text Texte à afficher
|
||||
\param htmltooltip Contenu html du tooltip
|
||||
\param direction 1=Le picto est après, -1=le picto est avant
|
||||
\return string Code html du texte,picto
|
||||
*/
|
||||
function textwithwarning($text,$htmltext,$direction=1)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (! $htmltext)
|
||||
{
|
||||
return $text;
|
||||
}
|
||||
|
||||
$s="";
|
||||
|
||||
// Sanitize tooltip
|
||||
$paramfortooltip ='';
|
||||
if ($conf->use_javascript)
|
||||
{
|
||||
$htmltext=ereg_replace("'","\'",$htmltext);
|
||||
$paramfortooltip.=' onmouseover="showtip(\''.$htmltext.'\')"';
|
||||
$paramfortooltip.=' onMouseout="hidetip()"';
|
||||
}
|
||||
|
||||
$s.='<table class="nobordernopadding"><tr>';
|
||||
if ($direction > 0)
|
||||
{
|
||||
if ($text) $s.='<td>'.$text.' </td>';
|
||||
$s.='<td'.$paramfortooltip.' valign="top" width="14">'.img_warning("default").'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='<td'.$paramfortooltip.' valign="top" width="14">'.img_warning("default").'</td>';
|
||||
if ($text) $s.='<td> '.$text.'</td>';
|
||||
}
|
||||
$s.='</tr></table>';
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne la liste déroulante des départements/province/cantons tout pays confondu ou pour un pays donné.
|
||||
|
||||
@ -96,6 +96,7 @@ DoNotStoreClearPassword=Do no store clear passwords in database
|
||||
MainDbPasswordFileConfEncrypted=Password of the database encrypted in conf.php
|
||||
ConfigFileIsInReadOnly=The file conf.php is in read only, check the rights.
|
||||
ProtectAndEncryptPdfFiles=Protection and encryption of the pdf generated
|
||||
ProtectAndEncryptPdfFilesDesc=protecting a document requires to encrypt it, which increases the processing time a lot.<br>This can cause a PHP time-out in some cases, especially if the document contains images or fonts.<br><br>You can solve this problem by increasing the variable <b>memory_limit</b> with 16M in the php.ini, or if you do not have access to the php.ini, create a .htaccess in root of the site and add this line: <br><br><center><b>php_value memory_limit 16M</b><center><br><br>
|
||||
Feature=Feature
|
||||
DolibarrLicense=License
|
||||
DolibarrProjectLeader=Project leader
|
||||
|
||||
@ -96,6 +96,7 @@ DoNotStoreClearPassword=Ne pas stocker de mot de passe en clair dans la base
|
||||
MainDbPasswordFileConfEncrypted=Encrypter le mot de passe de la base dans le fichier conf.php
|
||||
ConfigFileIsInReadOnly=Le fichier conf.php est lecture seule, vérifiez les droits d'écriture.
|
||||
ProtectAndEncryptPdfFiles=Protection et encryption des pdf générés
|
||||
ProtectAndEncryptPdfFilesDesc=La protection d'un document pdf exige son encryption, ce qui peut augmenter la durée de la transformation. Ceci peut causer un arrêt de PHP dans certains cas, particulièrement si le document contient des images ou des polices.<br><br>Vous pouvez résoudre ce problème en augmentant la variable <b>memory_limit</b> à 16M dans php.ini ou, si vous n'avez pas accès au php.ini, créer un .htaccess à la racine du site et ajouter cette ligne : <br><br><center><b>php_value memory_limit 16M</b><center><br><br>
|
||||
Feature=Fonction
|
||||
DolibarrLicense=Licence
|
||||
DolibarrProjectLeader=Chef de projet
|
||||
|
||||
Loading…
Reference in New Issue
Block a user