[or-cvs] r14737: Truncating long hostnames so as to not break the table (torstatus/trunk/web)
kasimir at seul.org
kasimir at seul.org
Sun May 25 17:47:53 UTC 2008
Author: kasimir
Date: 2008-05-25 13:47:52 -0400 (Sun, 25 May 2008)
New Revision: 14737
Modified:
torstatus/trunk/web/index.php
Log:
Truncating long hostnames so as to not break the table
Modified: torstatus/trunk/web/index.php
===================================================================
--- torstatus/trunk/web/index.php 2008-05-25 16:31:56 UTC (rev 14736)
+++ torstatus/trunk/web/index.php 2008-05-25 17:47:52 UTC (rev 14737)
@@ -562,7 +562,15 @@
$innerTable = 1;
echo "<table class='iT'><tr><td class='iT'>";
}
- echo $record[$value];
+ // Cut off hostnames larger than 50 characters
+ if (strlen($record[$value]) > 50)
+ {
+ echo substr($record[$value],0,25) . "<b>(...)</b>" . substr($record[$value],strlen($record[$value]) - 25,strlen($record[$value]));
+ }
+ else
+ {
+ echo $record[$value];
+ }
if (isset($record['IP']))
{
if (defined("WHOISPath"))
More information about the tor-commits
mailing list