about summary refs log tree commit diff stats
path: root/central/trunk/includes/instadisc.php
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-09-06 22:36:16 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-09-06 22:36:16 +0000
commit4419c4c44b18eda0d3a04af882e50be069fee49d (patch)
treea5a2b11fb0c81762740c4750e4cc4071ee817e6d /central/trunk/includes/instadisc.php
parent2c33a04e24aefdb75d35841f976875c693893973 (diff)
downloadinstadisc-4419c4c44b18eda0d3a04af882e50be069fee49d.tar.gz
instadisc-4419c4c44b18eda0d3a04af882e50be069fee49d.tar.bz2
instadisc-4419c4c44b18eda0d3a04af882e50be069fee49d.zip
Central: Removed idea of multiple central servers
Refs #52
Diffstat (limited to 'central/trunk/includes/instadisc.php')
-rw-r--r--central/trunk/includes/instadisc.php40
1 files changed, 0 insertions, 40 deletions
diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index f35d021..438fcfb 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php
@@ -97,46 +97,6 @@ function instaDisc_sendItem($username, $id)
97 } 97 }
98} 98}
99 99
100function instaDisc_sendUpdateNotice($softwareVersion)
101{
102 $username = instaDisc_getConfig('owner');
103 $subscription = 'http://fourisland.com/' . $_SERVER['SERVER_NAME'] . '/';
104 $title = 'Update your software to ' . $software;
105 $author = 'Hatkirby';
106 $url = 'http://fourisland.com/projects/instadisc/wiki/CentralSoftwareUpdate';
107 $semantics = array();
108
109 instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics);
110}
111
112function instaDisc_sendDatabase($cserver)
113{
114 $getdb = "SELECT * FROM centralServers";
115 $getdb2 = mysql_query($getdb);
116 $i=0;
117 while ($getdb3[$i] = mysql_fetch_array($getdb2))
118 {
119 $db[$getdb3[$i]['url']]['code'] = $getdb3[$i]['code'];
120 $db[$getdb3[$i]['url']]['xmlrpc'] = $getdb3[$i]['xmlrpc'];
121 $i++;
122 }
123
124 $cserver2 = $_SERVER['SERVER_NAME'];
125 $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_real_escape_string($cserver2) . "\"";
126 $getuk2 = mysql_query($getuk);
127 $getuk3 = mysql_fetch_array($getuk2);
128
129 $verID = rand(1,2147483647);
130
131 $client = new xmlrpc_client($cserver);
132 $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'),
133 new xmlrpcval(md5($cserver2 . ":" . $getuk3['code'] . ":" . $verID), 'string'),
134 new xmlrpcval($verID, 'int'),
135 new xmlrpcval(serialize($db), 'string'),
136 new xmlrpcval(instaDisc_getConfig('databaseVersion'), 'string')));
137 $client->send($msg);
138}
139
140function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics, $encryptionID = 0) 100function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics, $encryptionID = 0)
141{ 101{
142 $getuser = "SELECT * FROM users WHERE username = \"" . mysql_real_escape_string($username) . "\""; 102 $getuser = "SELECT * FROM users WHERE username = \"" . mysql_real_escape_string($username) . "\"";