diff options
Diffstat (limited to 'central/trunk/xmlrpc.php')
-rw-r--r-- | central/trunk/xmlrpc.php | 12 |
1 files changed, 6 insertions, 6 deletions
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 | |||
82 | $getusubs3 = mysql_fetch_array($getusubs2); | 82 | $getusubs3 = mysql_fetch_array($getusubs2); |
83 | if ($getusubs['username'] == $username) | 83 | if ($getusubs['username'] == $username) |
84 | { | 84 | { |
85 | $cserver = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; | 85 | $cserver = $_SERVER['HTTP_HOST']; |
86 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver) . "\""; | 86 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver) . "\""; |
87 | $getuk2 = mysql_query($getuk); | 87 | $getuk2 = mysql_query($getuk); |
88 | $getuk3 = mysql_fetch_array($getuk2); | 88 | $getuk3 = mysql_fetch_array($getuk2); |
@@ -94,7 +94,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription | |||
94 | { | 94 | { |
95 | $verID = rand(1,65536); | 95 | $verID = rand(1,65536); |
96 | 96 | ||
97 | $client = new xmlrpc_client($getcs3[$i]['url']); | 97 | $client = new xmlrpc_client($getcs3[$i]['xmlrpc']); |
98 | $msg = new xmlrpcmsg("InstaDisc.sendFromCentral", array( new xmlrpcval($cserver, 'string'), | 98 | $msg = new xmlrpcmsg("InstaDisc.sendFromCentral", array( new xmlrpcval($cserver, 'string'), |
99 | new xmlrpcval(md5($cserver + ":" + $getuk3['key'] + ":" + $verID), 'string'), | 99 | new xmlrpcval(md5($cserver + ":" + $getuk3['key'] + ":" + $verID), 'string'), |
100 | new xmlrpcval($verID, 'int'), | 100 | new xmlrpcval($verID, 'int'), |
@@ -125,7 +125,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription | |||
125 | instaDisc_sendUpdateNotice($softwareVersion); | 125 | instaDisc_sendUpdateNotice($softwareVersion); |
126 | } else if ($softwareVersion < instaDisc_getConfig('softwareVersion')) | 126 | } else if ($softwareVersion < instaDisc_getConfig('softwareVersion')) |
127 | { | 127 | { |
128 | $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; | 128 | $cserver2 = $_SERVER['HTTP_HOST']; |
129 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; | 129 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; |
130 | $getuk2 = mysql_query($getuk); | 130 | $getuk2 = mysql_query($getuk); |
131 | $getuk3 = mysql_fetch_array($getuk2); | 131 | $getuk3 = mysql_fetch_array($getuk2); |
@@ -142,7 +142,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription | |||
142 | 142 | ||
143 | if ($databaseVersion > instaDisc_getConfig('databaseVersion')) | 143 | if ($databaseVersion > instaDisc_getConfig('databaseVersion')) |
144 | { | 144 | { |
145 | $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; | 145 | $cserver2 = $_SERVER['HTTP_HOST']; |
146 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; | 146 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; |
147 | $getuk2 = mysql_query($getuk); | 147 | $getuk2 = mysql_query($getuk); |
148 | $getuk3 = mysql_fetch_array($getuk2); | 148 | $getuk3 = mysql_fetch_array($getuk2); |
@@ -247,14 +247,14 @@ function sendDatabase($cserver, $verification, $verificationID, $db) | |||
247 | $getfi2 = mysql_query($getfi); | 247 | $getfi2 = mysql_query($getfi); |
248 | $getfi3 = mysql_fetch_array($getfi2); | 248 | $getfi3 = mysql_fetch_array($getfi2); |
249 | 249 | ||
250 | if ($db['central.fourisland.com'] == $getfi3['key']) | 250 | if ($db['central.fourisland.com']['key'] == $getfi3['key']) |
251 | { | 251 | { |
252 | $deldb = "TRUNCATE TABLE centralServers"; | 252 | $deldb = "TRUNCATE TABLE centralServers"; |
253 | $deldb2 = mysql_query($deldb); | 253 | $deldb2 = mysql_query($deldb); |
254 | 254 | ||
255 | foreach($db as $name => $value) | 255 | foreach($db as $name => $value) |
256 | { | 256 | { |
257 | $insdb = "INSERT INTO centralServers (url, key) VALUES (\"" . mysql_escape_string($name) . "\", \"" . mysql_escape_string($value) . "\")"; | 257 | $insdb = "INSERT INTO centralServers (url, key, xmlrpc) VALUES (\"" . mysql_escape_string($name) . "\", \"" . mysql_escape_string($value['key']) . "\", \"" . mysql_escape_string($value['xmlrpc']) . "\")"; |
258 | $insdb2 = mysql_query($insdb); | 258 | $insdb2 = mysql_query($insdb); |
259 | } | 259 | } |
260 | 260 | ||