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.
This commit is contained in:
Chris Morgan
2007-07-23 20:39:49 +00:00
committed by WineHQ
parent fd448b96d7
commit 5c42860972

View File

@@ -1112,20 +1112,19 @@ class version {
$oTableRowHighlight = null; $oTableRowHighlight = null;
// if we have a valid tested rating // 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; $sClass = $oVersion->sTestedRating;
$oInactiveColor = new Color(); $oInactiveColor = new Color();
$oInactiveColor->setColorByName($oVersion->sTestedRating); $oInactiveColor->SetColorByName($oVersion->sTestedRating);
$oHighlightColor = GetHighlightColorFromInactiveColor($oInactiveColor); $oHighlightColor = GetHighlightColorFromInactiveColor($oInactiveColor);
$oTableRowHighlight = new TableRowHighlight($oHighlightColor, $oInactiveColor); $oTableRowHighlight = new TableRowHighlight($oHighlightColor, $oInactiveColor);
} else } else
{ {
$sRatingColor = "class=\"$bgcolor\"";
$sClass = $bgcolor; $sClass = $bgcolor;
$oTableRowHighlight = GetStandardRowHighlight($c); $oTableRowHighlight = GetStandardRowHighlight($c);