Commits

Michele Bini committed 3af56c7

Fix initial generation of the private/public key pair.

Comments (0)

Files changed (2)

+timekoin (1.9-deb46) lucid; urgency=low
+
+  * Fix initial generation of the private/public key pair.
+
+ -- Michele Bini <michele.bini@gmail.com>  Fri, 21 Sep 2012 16:39:17 +0200
+
 timekoin (1.9-deb44) unstable; urgency=low
 
   * Merged 'dev' branch.
 }
 
 if ((!isset($_GET['resetkeys'])) || ($_GET['resetkeys'] != 1)) {
-  $sql = "SELECT field_data FROM my_keys where field_name = 'server_private_key' LIMIT 1";
+  $sql = "SELECT field_data FROM my_keys WHERE field_name = 'server_private_key' LIMIT 1";
   $result = mysql_query($sql);
   if ($result === FALSE) {
     println("Could not access database.");
     exit;
   }
   $result = mysql_result($result,0,"field_data");
-  $result = (($result !== "Private Key Goes Here") ||
+  $result = (($result !== "Private Key Goes Here") &&
 	     ($result !== ""));
   if ($result) {
     if (!$keys_quiet) { println("A private key is already present."); }