From 5c4286097246c7f97c4c5fde0a7188fbf8c1fec4 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Mon, 23 Jul 2007 20:39:49 +0000 Subject: [PATCH] Add check for empty tested ratings to the conditions upon which we will skip trying to color using the tested rating. Remove two unused variables. --- include/version.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/version.php b/include/version.php index 03ccc5f..e5dd4a9 100644 --- a/include/version.php +++ b/include/version.php @@ -1112,20 +1112,19 @@ class version { $oTableRowHighlight = null; // if we have a valid tested rating - if($oVersion->sTestedRating && $oVersion->sTestedRating != "/") + if($oVersion->sTestedRating && ($oVersion->sTestedRating != "/") && + ($oVersion->sTestedRating != " ")) { - $sRatingColor = "class=\"$oVersion->sTestedRating\""; $sClass = $oVersion->sTestedRating; $oInactiveColor = new Color(); - $oInactiveColor->setColorByName($oVersion->sTestedRating); + $oInactiveColor->SetColorByName($oVersion->sTestedRating); $oHighlightColor = GetHighlightColorFromInactiveColor($oInactiveColor); $oTableRowHighlight = new TableRowHighlight($oHighlightColor, $oInactiveColor); } else { - $sRatingColor = "class=\"$bgcolor\""; $sClass = $bgcolor; $oTableRowHighlight = GetStandardRowHighlight($c);