From 1022c1ba9c4b25a1de1792fe8180ddbb97a06e64 Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Mon, 24 Aug 2009 15:55:45 +0000
Subject: [PATCH] =?UTF-8?q?Retour=20sur=20[14317]:=20garder=20la=20compati?=
 =?UTF-8?q?bilit=C3=A9=20PHP4=20(Pat).?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc/utils.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index 17db9c55f2..529bd94c1a 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -395,15 +395,15 @@ function _L($text, $args=array(), $class=NULL) {
 		foreach ($args as $name => $value) {
 			if ($class)
 				$value = "<span class='$class'>$value</span>";
-			$text = str_replace ("@$name@", $value, $text, $n);
-			if ($n) unset($args[$name]);
+			$t = str_replace ("@$name@", $value, $text);
+			if ($text !== $t) {unset($args[$name]); $text = $t;}
 		}
 		// Si des variables n'ont pas ete inserees, le signaler
 		// (chaines de langues pas a jour)
 		if ($args) spip_log("$text:  variables inutilisées " . join(', ', $args));
 	}
 
-	if ($GLOBALS['test_i18n'] And ($class===NULL OR $args))
+	if ($GLOBALS['test_i18n'] AND $class===NULL)
 		return "<span style='color:red;'>$text</span>";
 	else
 		return $text;
-- 
GitLab