From bff65fc6b479f744c34af7a3020d50c66ae9a731 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 5 Dec 2014 01:25:18 +0100
Subject: [PATCH] Fix: starting with var with always same color

---
 htdocs/comm/card.php                      | 2 +-
 htdocs/core/class/html.formfile.class.php | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index d0dd842cd7c..8a4df52748c 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -530,6 +530,7 @@ if ($id > 0)
 			while ($i < $num && $i < $MAXLIST)
 			{
 				$objp = $db->fetch_object($resql);
+				$var=!$var;
 				print "<tr ".$bc[$var].">";
 				print '<td class="nowrap"><a href="propal.php?id='.$objp->propalid.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.'</a>'."\n";
 				if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 )
@@ -539,7 +540,6 @@ if ($id > 0)
 				print '</td><td align="right" width="80">'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
 				print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';
 				print '<td align="right" style="min-width: 60px" class="nowrap">'.$propal_static->LibStatut($objp->fk_statut,5).'</td></tr>';
-				$var=!$var;
 				$i++;
 			}
 			$db->free($resql);
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 824bd4f3ae9..2bcfd36bdde 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -133,9 +133,10 @@ class FormFile
                 if ($perm)
                 {
                 	$langs->load('other');
-                    $out .= ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
-                    $out .= ' '.info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
-                    $out .= ')';
+                    //$out .= ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
+                    $out .= ' ';
+                    $out.=info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
+                    //$out .= ')';
                 }
             }
             else
@@ -778,7 +779,7 @@ class FormFile
 
 			if ($nboffiles > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
 
-			$var=false;
+			$var=true;
 			foreach($filearray as $key => $file)      // filearray must be only files here
 			{
 				if ($file['name'] != '.'
-- 
GitLab