[or-cvs] r16005: (ticket:104) Changing all.de to allde (torstatus/trunk/web)

kasimir at seul.org kasimir at seul.org
Thu Jul 17 03:04:14 UTC 2008


Author: kasimir
Date: 2008-07-16 23:04:13 -0400 (Wed, 16 Jul 2008)
New Revision: 16005

Modified:
   torstatus/trunk/web/config_template.php
   torstatus/trunk/web/index.php
Log:
(ticket:104) Changing all.de to allde

Modified: torstatus/trunk/web/config_template.php
===================================================================
--- torstatus/trunk/web/config_template.php	2008-07-17 02:52:11 UTC (rev 16004)
+++ torstatus/trunk/web/config_template.php	2008-07-17 03:04:13 UTC (rev 16005)
@@ -69,7 +69,7 @@
 // Change this value to 0 if you do not wish to download the mirror list
 $useMirrorList = 1;
 $mirrorListURI = "http://trunk.torstatus.kgprog.com/currentmirrors.php";
-$manualMirrorList = array('all.de' => 'https://torstatus.all.de/','blutmagie' => 'https://torstatus.blutmagie.de/','kradense' => 'https://kradense.whsites.net/tns/', 'cyberphunk' => 'http://torstatus.cyberphunk.org/', 'hermetix' => 'http://tns.hermetix.org/', 'kgprog' => 'https://torstatus.kgprog.com/', 'recoxdotorg' => 'http://tor.recox.org/', 'amorphis' => 'http://torstatus.amorphis.eu/');
+$manualMirrorList = array('allde' => 'https://torstatus.all.de/','blutmagie' => 'https://torstatus.blutmagie.de/','kradense' => 'https://kradense.whsites.net/tns/', 'cyberphunk' => 'http://torstatus.cyberphunk.org/', 'hermetix' => 'http://tns.hermetix.org/', 'kgprog' => 'https://torstatus.kgprog.com/', 'recoxdotorg' => 'http://tor.recox.org/', 'amorphis' => 'http://torstatus.amorphis.eu/');
 
 // }}}
 

Modified: torstatus/trunk/web/index.php
===================================================================
--- torstatus/trunk/web/index.php	2008-07-17 02:52:11 UTC (rev 16004)
+++ torstatus/trunk/web/index.php	2008-07-17 03:04:13 UTC (rev 16005)
@@ -760,10 +760,19 @@
   			case
 			($value == "Uptime"):
 
-			// Uptime is now in seconds, days and hours should
+			// Uptime is now in days and hours -- should
 			// be extracted
 
-			$printTimeHours = floor($record[$value]/86400) . "d " . floor(($record[$value] % 86400)/(60*60)) . "h";
+			if ($record[$value] < 3600) // Detect for less than
+			                            // an hour cases
+			{
+				$printTimeHours = floor($record[$value]/60) . "m";
+			}
+			else
+			{
+				$printTimeHours = floor($record[$value]/86400) . "d " . floor(($record[$value] % 86400)/3600) . "h";
+				$printTimeHours = preg_replace("/^0d/","",$printTimeHours);
+			}
 			$printTimeDays = floor($record[$value]/86400) . "d";
 			
 			if ($record[$value] > -1 && $record[$value] < 5*86400)



More information about the tor-commits mailing list