X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins%2Ffacteur%2Ffacteur_fonctions.php;h=54a2d2583c236faf89bcf5cb7423d1c0ce8a192c;hb=c0f18416f529232b5555c6410a8765a5125ebcd3;hp=7eb20877765caf9ae38a8d08d2a1acfe2b013a8b;hpb=50522c53acc9e61a4a7de3a1890c4ba93e2f61b4;p=lhc%2Fweb%2Fwww.git diff --git a/www/plugins/facteur/facteur_fonctions.php b/www/plugins/facteur/facteur_fonctions.php index 7eb20877..54a2d258 100755 --- a/www/plugins/facteur/facteur_fonctions.php +++ b/www/plugins/facteur/facteur_fonctions.php @@ -8,6 +8,19 @@ if (!defined("_ECRIRE_INC_VERSION")) return; +function facteur_affiche_password_masque($pass){ + $l = strlen($pass); + if ($l<=8){ + return str_pad('',$l,'*'); + } + $e = intval(ceil($l/10)); + $mid = str_pad('',$l-2*$e,'*'); + if (strlen($mid)>8){ + $mid = '***...***'; + } + return substr($pass,0,$e) . $mid . substr($pass,-$e); +} + /** * Transformer un mail texte ou HTML simplifie en mail HTML complet avec le wrapper emails/texte.html * Si le mail est un mail texte : @@ -283,12 +296,15 @@ function facteur_addstyle($matches) { * @return string */ function facteur_nl2br_si_pas_autobr($texte){ - return (_AUTOBR?$texte:nl2br($texte)); + if (_AUTOBR) return $texte; + include_spip("inc/filtres"); + $texte = post_autobr($texte); + return $texte; } /** * Transformer un mail HTML en mail Texte proprement : - * - les tableaux de mise en page sont utilisés pour structurer le mail texte + * - les tableaux de mise en page sont utilis�s pour structurer le mail texte * - le reste du HTML est markdownifie car c'est un format texte lisible et conventionnel * * @param string $html