diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-02 14:48:59 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-02 14:48:59 +0000 |
commit | f58e72c0d5181c5bf77393cf657d2c2bccee1073 (patch) | |
tree | 941ee1ae07d56ed77a16346dc8dcb35d7d9437e0 /central/trunk/xmlrpc.php | |
parent | 7174283738786d0e4bfc9669bdc2a7134f410895 (diff) | |
download | instadisc-f58e72c0d5181c5bf77393cf657d2c2bccee1073.tar.gz instadisc-f58e72c0d5181c5bf77393cf657d2c2bccee1073.tar.bz2 instadisc-f58e72c0d5181c5bf77393cf657d2c2bccee1073.zip |
Central: Added instaDisc_getConfig()
This functions retrives a single configuration value out of the database.
Diffstat (limited to 'central/trunk/xmlrpc.php')
-rw-r--r-- | central/trunk/xmlrpc.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 2c6b2e6..bbf2f2d 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php | |||
@@ -103,8 +103,8 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription | |||
103 | new xmlrpcval($author, 'string'), | 103 | new xmlrpcval($author, 'string'), |
104 | new xmlrpcval($url, 'string'), | 104 | new xmlrpcval($url, 'string'), |
105 | new xmlrpcval($semantics, 'array'), | 105 | new xmlrpcval($semantics, 'array'), |
106 | new xmlrpcval(getConfig('softwareVersion'), 'int'), | 106 | new xmlrpcval(instaDisc_getConfig('softwareVersion'), 'int'), |
107 | new xmlrpcval(getConfig('databaseVersion'), 'int'))); | 107 | new xmlrpcval(instaDisc_getConfig('databaseVersion'), 'int'))); |
108 | $client->send($msg); | 108 | $client->send($msg); |
109 | $i++; | 109 | $i++; |
110 | } | 110 | } |
@@ -120,10 +120,10 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription | |||
120 | { | 120 | { |
121 | if (instaDisc_checkVerification($cserver, $verification, $verificationID, 'centralServers', 'url', 'key')) | 121 | if (instaDisc_checkVerification($cserver, $verification, $verificationID, 'centralServers', 'url', 'key')) |
122 | { | 122 | { |
123 | if ($softwareVersion > getConfig('softwareVersion')) | 123 | if ($softwareVersion > instaDisc_getConfig('softwareVersion')) |
124 | { | 124 | { |
125 | instaDisc_sendUpdateNotice($softwareVersion); | 125 | instaDisc_sendUpdateNotice($softwareVersion); |
126 | } else if ($softwareVersion < getConfig('softwareVersion')) | 126 | } else if ($softwareVersion < instaDisc_getConfig('softwareVersion')) |
127 | { | 127 | { |
128 | $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; | 128 | $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; |
129 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; | 129 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; |
@@ -136,11 +136,11 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription | |||
136 | $msg = new xmlrpcmsg("InstaDisc.sendUpdateNotice", array( new xmlrpcval($cserver2, 'string'), | 136 | $msg = new xmlrpcmsg("InstaDisc.sendUpdateNotice", array( new xmlrpcval($cserver2, 'string'), |
137 | new xmlrpcval(md5($cserver2 . ':' . $getuk3['key'] . ':' . $verID), 'string'), | 137 | new xmlrpcval(md5($cserver2 . ':' . $getuk3['key'] . ':' . $verID), 'string'), |
138 | new xmlrpcval($verID, 'int'), | 138 | new xmlrpcval($verID, 'int'), |
139 | new xmlrpcval(getConfig('softwareVersion'), 'int'))); | 139 | new xmlrpcval(instaDisc_getConfig('softwareVersion'), 'int'))); |
140 | $client->send($msg); | 140 | $client->send($msg); |
141 | } | 141 | } |
142 | 142 | ||
143 | if ($databaseVersion > getConfig('databaseVersion')) | 143 | if ($databaseVersion > instaDisc_getConfig('databaseVersion')) |
144 | { | 144 | { |
145 | $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; | 145 | $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; |
146 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; | 146 | $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\""; |
@@ -153,9 +153,9 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription | |||
153 | $msg = new xmlrpcmsg("InstaDisc.askForDatabase", array( new xmlrpcval($cserver2, 'string'), | 153 | $msg = new xmlrpcmsg("InstaDisc.askForDatabase", array( new xmlrpcval($cserver2, 'string'), |
154 | new xmlrpcval(md5($cserver2 . ':' . $getuk3['key'] . ':' . $verID), 'string'), | 154 | new xmlrpcval(md5($cserver2 . ':' . $getuk3['key'] . ':' . $verID), 'string'), |
155 | new xmlrpcval($verID, 'int'), | 155 | new xmlrpcval($verID, 'int'), |
156 | new xmlrpcval(getConfig('databaseVersion'), 'int'))); | 156 | new xmlrpcval(instaDisc_getConfig('databaseVersion'), 'int'))); |
157 | $client->send($msg); | 157 | $client->send($msg); |
158 | } else if ($databaseVersion < getConfig('databaseVersion')) | 158 | } else if ($databaseVersion < instaDisc_getConfig('databaseVersion')) |
159 | { | 159 | { |
160 | instaDisc_sendDatabase($cserver); | 160 | instaDisc_sendDatabase($cserver); |
161 | } | 161 | } |
@@ -179,7 +179,7 @@ function sendUpdateNotice($cserver, $verification, $verificationID, $softwareVer | |||
179 | { | 179 | { |
180 | if (instaDisc_checkVerification($cserver, $verification, $verificationID, 'centralServers', 'url', 'key')) | 180 | if (instaDisc_checkVerification($cserver, $verification, $verificationID, 'centralServers', 'url', 'key')) |
181 | { | 181 | { |
182 | if ($softwareVersion > getConfig('softwareVersion')) | 182 | if ($softwareVersion > instaDisc_getConfig('softwareVersion')) |
183 | { | 183 | { |
184 | instaDisc_sendUpdateNotice($softwareVersion); | 184 | instaDisc_sendUpdateNotice($softwareVersion); |
185 | 185 | ||
@@ -194,7 +194,7 @@ function askForDatabase($cserver, $verification, $verificationID, $databaseVersi | |||
194 | { | 194 | { |
195 | if (instaDisc_checkVerification($cserver, $verification, $verificationID, 'centralServers', 'url', 'key')) | 195 | if (instaDisc_checkVerification($cserver, $verification, $verificationID, 'centralServers', 'url', 'key')) |
196 | { | 196 | { |
197 | if ($databaseVersion < getConfig('databaseVersion')) | 197 | if ($databaseVersion < instaDisc_getConfig('databaseVersion')) |
198 | { | 198 | { |
199 | instaDisc_sendDatabase($cserver); | 199 | instaDisc_sendDatabase($cserver); |
200 | 200 | ||