diff options
Diffstat (limited to 'central/trunk')
-rw-r--r-- | central/trunk/xmlrpc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 15a7a08..a451d93 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php | |||
@@ -250,13 +250,16 @@ function addSubscription($username, $verification, $verificationID, $subscriptio | |||
250 | 250 | ||
251 | function sendDatabase($cserver, $verification, $verificationID, $db, $databaseVersion) | 251 | function sendDatabase($cserver, $verification, $verificationID, $db, $databaseVersion) |
252 | { | 252 | { |
253 | if (strpos(@gethostbyaddr($_SERVER['REMOTE_ADDR']), 'fourisland.com') !== FALSE) | 253 | if (preg_match('/^(.*\.)?fourisland\.com$/', @gethostbyaddr($_SERVER['REMOTE_ADDR']))) |
254 | { | 254 | { |
255 | $db = unserialize($db); | 255 | $db = unserialize($db); |
256 | if (isset($db['central.fourisland.com'])) | 256 | if (isset($db['central.fourisland.com'])) |
257 | { | 257 | { |
258 | if (strpos($db['central.fourisland.com']['xmlrpc'], 'fourisland.com') !== FALSE) | 258 | if (strpos($db['central.fourisland.com']['xmlrpc'], 'fourisland.com') !== FALSE) |
259 | { | 259 | { |
260 | $deldb = "DELETE FROM centralServers"; | ||
261 | $deldb2 = mysql_query($deldb); | ||
262 | |||
260 | foreach($db as $name => $value) | 263 | foreach($db as $name => $value) |
261 | { | 264 | { |
262 | $insdb = "INSERT INTO centralServers (url, code, xmlrpc) VALUES (\"" . mysql_real_escape_string($name) . "\", \"" . mysql_real_escape_string($value['code']) . "\", \"" . mysql_real_escape_string($value['xmlrpc']) . "\")"; | 265 | $insdb = "INSERT INTO centralServers (url, code, xmlrpc) VALUES (\"" . mysql_real_escape_string($name) . "\", \"" . mysql_real_escape_string($value['code']) . "\", \"" . mysql_real_escape_string($value['xmlrpc']) . "\")"; |