[tools] testbot/cgi: Simplify link handling in CollectionBlock::GenerateDataCell().

Francois Gouget fgouget at codeweavers.com
Wed Apr 6 17:31:27 CDT 2022


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
index 736c3f8a3..23825d757 100644
--- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
+++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
@@ -278,13 +278,6 @@ sub GenerateDataCell($$$$)
   if ($PropertyDescriptor->GetIsKey() && $DetailsPage)
   {
     $NeedLink = 1;
-  }
-  else
-  {
-    $NeedLink = !1;
-  }
-  if ($NeedLink)
-  {
     my $Query = "$DetailsPage?Key=" . uri_escape($Item->GetKey());
     my ($MasterColNames, $MasterColValues) = $Item->GetMasterCols();
     if (defined($MasterColNames))
@@ -298,10 +291,7 @@ sub GenerateDataCell($$$$)
     print "<a href='", $self->escapeHTML($Query), "'>";
   }
   print $self->GetEscapedDisplayValue($Item, $PropertyDescriptor);
-  if ($NeedLink)
-  {
-    print "</a>";
-  }
+  print "</a>" if ($NeedLink);
   print "</td>\n";
 }
 
-- 
2.30.2




More information about the wine-devel mailing list