From 116e788a4f8159b0d502ae7faaf85146f1a979ff Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 2 Aug 2008 14:58:54 +0000 Subject: Central: Added "xmlrpc" field to centralServers --- central/trunk/xmlrpc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'central/trunk/xmlrpc.php') diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index bbf2f2d..cd0bb06 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php @@ -82,7 +82,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription $getusubs3 = mysql_fetch_array($getusubs2); if ($getusubs['username'] == $username) { - $cserver = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; + $cserver = $_SERVER['HTTP_HOST']; $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver) . "\""; $getuk2 = mysql_query($getuk); $getuk3 = mysql_fetch_array($getuk2); @@ -94,7 +94,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription { $verID = rand(1,65536); - $client = new xmlrpc_client($getcs3[$i]['url']); + $client = new xmlrpc_client($getcs3[$i]['xmlrpc']); $msg = new xmlrpcmsg("InstaDisc.sendFromCentral", array( new xmlrpcval($cserver, 'string'), new xmlrpcval(md5($cserver + ":" + $getuk3['key'] + ":" + $verID), 'string'), new xmlrpcval($verID, 'int'), @@ -125,7 +125,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription instaDisc_sendUpdateNotice($softwareVersion); } else if ($softwareVersion < instaDisc_getConfig('softwareVersion')) { - $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; + $cserver2 = $_SERVER['HTTP_HOST']; $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; $getuk2 = mysql_query($getuk); $getuk3 = mysql_fetch_array($getuk2); @@ -142,7 +142,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription if ($databaseVersion > instaDisc_getConfig('databaseVersion')) { - $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; + $cserver2 = $_SERVER['HTTP_HOST']; $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; $getuk2 = mysql_query($getuk); $getuk3 = mysql_fetch_array($getuk2); @@ -247,14 +247,14 @@ function sendDatabase($cserver, $verification, $verificationID, $db) $getfi2 = mysql_query($getfi); $getfi3 = mysql_fetch_array($getfi2); - if ($db['central.fourisland.com'] == $getfi3['key']) + if ($db['central.fourisland.com']['key'] == $getfi3['key']) { $deldb = "TRUNCATE TABLE centralServers"; $deldb2 = mysql_query($deldb); foreach($db as $name => $value) { - $insdb = "INSERT INTO centralServers (url, key) VALUES (\"" . mysql_escape_string($name) . "\", \"" . mysql_escape_string($value) . "\")"; + $insdb = "INSERT INTO centralServers (url, key, xmlrpc) VALUES (\"" . mysql_escape_string($name) . "\", \"" . mysql_escape_string($value['key']) . "\", \"" . mysql_escape_string($value['xmlrpc']) . "\")"; $insdb2 = mysql_query($insdb); } -- cgit 1.4.1