From 23bac47b53ca8e0d0af909708481603e0a41882f Mon Sep 17 00:00:00 2001 From: davux <da@weeno.net> Date: Mon, 4 Oct 2010 00:16:08 +0000 Subject: [PATCH] =?UTF-8?q?libell=C3=A9=20facultatif=20sur=20|lien=5Fou=5F?= =?UTF-8?q?expose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rendre le premier paramètre du filtre {{{|lien_ou_expose}}} facultatif: en cas d'absence, c'est l'URL qui est utilisée. --- ecrire/inc/filtres.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php index 1075e738a0..6e8deddca3 100644 --- a/ecrire/inc/filtres.php +++ b/ecrire/inc/filtres.php @@ -2278,7 +2278,7 @@ function url_rss_forum($texte){return $texte;} * @param string $title * @return string */ -function lien_ou_expose($url,$libelle,$on=false,$class="",$title="",$rel=""){ +function lien_ou_expose($url,$libelle=NULL,$on=false,$class="",$title="",$rel=""){ return ($on ?"<strong class='on'>": "<a href='$url'" @@ -2287,7 +2287,7 @@ function lien_ou_expose($url,$libelle,$on=false,$class="",$title="",$rel=""){ .($rel?" rel='".attribut_html($rel)."'":'') .">" ) - . $libelle + . $libelle != NULL ? $libelle : $url . ($on ? "</strong>":"</a>"); } @@ -2617,4 +2617,4 @@ function wrap($texte,$wrap) { } return $texte; } -?> \ No newline at end of file +?> -- GitLab