[or-cvs] r14726: Causing the mirror list to be updated properly on a clean in (torstatus/trunk)

kasimir at seul.org kasimir at seul.org
Sun May 25 05:51:54 UTC 2008


Author: kasimir
Date: 2008-05-25 01:51:54 -0400 (Sun, 25 May 2008)
New Revision: 14726

Modified:
   torstatus/trunk/tns_update.pl
Log:
Causing the mirror list to be updated properly on a clean install

Modified: torstatus/trunk/tns_update.pl
===================================================================
--- torstatus/trunk/tns_update.pl	2008-05-25 05:42:15 UTC (rev 14725)
+++ torstatus/trunk/tns_update.pl	2008-05-25 05:51:54 UTC (rev 14726)
@@ -158,9 +158,12 @@
 	if ($changeanything == 1)
 	{
 		# Update the mirror list in the database
-		$query = "UPDATE `Mirrors` SET `mirrors` = '$mirrorList' WHERE id=1;";
+		$query = "TRUNCATE `Mirrors`;";
 		$dbresponse = $dbh->prepare($query);
 		$dbresponse->execute();
+		$query = "INSERT INTO `Mirrors` (`id`,`mirrors`) VALUES (1,'$mirrorList');";
+		$dbresponse = $dbh->prepare($query);
+		$dbresponse->execute();
 	}
 }
 $updateCounter++;



More information about the tor-commits mailing list