From 96969d7023cf8703bf9c460e1d54d4e32a076987 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 3 Aug 2008 20:37:29 +0000 Subject: Central: Fixed minor errors --- central/trunk/instadisc.php | 4 ++-- central/trunk/xmlrpc.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index fa2eb07..9883116 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php @@ -7,7 +7,7 @@ include_once('class.phpmailer.php'); function instaDisc_checkVerification($username, $verification, $verificationID, $table, $nameField, $passField) { - $getverid = "SELECT * FROM oldVerID WHERE name = \"" . mysql_real_escape_string($username) . "\" AND verID = " . $verificationID; + $getverid = "SELECT * FROM oldVerID WHERE username = \"" . mysql_real_escape_string($username) . "\" AND verID = " . $verificationID; $getverid2 = mysql_query($getverid); $getverid3 = mysql_fetch_array($getverid2); if ($getverid3['id'] != $verificationID) @@ -152,7 +152,7 @@ function instaDisc_sendActivationEmail($username, $password, $email) { $penKey = md5(rand(1,65536)); - $inspending = "INSERT INTO pending (username, password, email, key) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($password) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")"; + $inspending = "INSERT INTO pending (username, password, email, key) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string(md5($password)) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")"; $inspending2 = mysql_query($inspending); $mail = instaDisc_phpMailer(); diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 5ac5868..5377a3b 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php @@ -77,7 +77,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription { if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password')) { - $getusubs = "SELECT * FROM subscriptions WHERE username = \"" . mysql_real_escape_string($username) . "\" AND uri = \"" . mysql_real_escape_string($subscription) . "\" AND owner = \"true\""; + $getusubs = "SELECT * FROM subscriptions WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($subscription) . "\" AND owner = \"true\""; $getusubs2 = mysql_query($getusubs); $getusubs3 = mysql_fetch_array($getusubs2); if ($getusubs['username'] == $username) @@ -160,7 +160,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription instaDisc_sendDatabase($cserver); } - $getsed = "SELECT * FROM subscriptions WHERE uri = \"" . mysql_real_escape_string($subscription) . "\""; + $getsed = "SELECT * FROM subscriptions WHERE url = \"" . mysql_real_escape_string($subscription) . "\""; $getsed2 = mysql_query($getsed); $i=0; while ($getsed3[$i] = mysql_fetch_array($getsed2)) @@ -249,7 +249,7 @@ function sendDatabase($cserver, $verification, $verificationID, $db) if ($db['central.fourisland.com']['key'] == $getfi3['key']) { - $deldb = "TRUNCATE TABLE centralServers"; + $deldb = "DELETE FROM centralServers"; $deldb2 = mysql_query($deldb); foreach($db as $name => $value) -- cgit 1.4.1