From 17ad28a1bbc14270094ee52ddb3dabd1b07a36e7 Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Thu, 23 Mar 2006 06:40:02 +0000
Subject: [PATCH] oups (pyrat)

---
 ecrire/inc/barre.php   | 5 ++---
 ecrire/inc/filtres.php | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ecrire/inc/barre.php b/ecrire/inc/barre.php
index 7f1abc0737..7fd5ce051c 100644
--- a/ecrire/inc/barre.php
+++ b/ecrire/inc/barre.php
@@ -41,12 +41,10 @@ function afficher_barre($champ, $forum=false, $lang='') {
 	include_spip('inc/layer');
 	if (!$GLOBALS['browser_barre']) return '';
 	if (!$lang) $lang = $spip_lang;
-
-
 	$num_barre++;
 	$champhelp = "document.getElementById('barre_$num_barre')";
 
-	$ret = ($num_barre > 0)  ? '' :
+	$ret = ($num_barre > 1)  ? '' :
 	  '<script type="text/javascript" src="' . _DIR_IMG_PACK. 'spip_barre.js"></script>';
 	$ret .= "<table class='spip_barre' width='100%' cellpadding='0' cellspacing='0' border='0'>";
 	$ret .= "\n<tr width='100%' class='spip_barre'>";
@@ -120,6 +118,7 @@ function afficher_barre($champ, $forum=false, $lang='') {
 		$ret .= "\n<tr>\n<td colspan='$col'><input disabled='disabled' type='text' id='barre_$num_barre' size='45' maxlength='100' style='width:100%; font-size:11px; color: black; background-color: #e4e4e4; border: 0px solid #dedede;'\nvalue=\"".attribut_html(_T('barre_aide'))."\" /></td></tr>";
 
 	$ret .= "</table>";
+	$num_barre++;
 	return $ret;
 }
 
diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php
index aa3d0c7726..8a57ef870a 100644
--- a/ecrire/inc/filtres.php
+++ b/ecrire/inc/filtres.php
@@ -2583,8 +2583,8 @@ function boutonne($t, $n, $v, $a='') {
 
 function barre_textarea($texte, $rows, $cols, $lang='') {
 	static $num_textarea = 0;
-	include_spip('inc/layer'); // defini browser_barre
-	spip_log("entree dans barre_tex" . $GLOBALS['browser_barre']);
+	include_spip('inc/layer'); // definit browser_barre
+
 	$texte = entites_html($texte);
 	if (!$GLOBALS['browser_barre'])
 		return "<textarea name='texte' rows='$rows' class='forml' cols='$cols'>$texte</textarea>";
-- 
GitLab