about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--central/trunk/xmlrpc.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 18c344b..16a2c29 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php
@@ -205,6 +205,19 @@ function deleteSubscription($username, $verification, $verificationID, $subscrip
205 return new xmlrpcresp(new xmlrpcval(1, "int")); 205 return new xmlrpcresp(new xmlrpcval(1, "int"));
206} 206}
207 207
208function addSubscription($username, $verification, $verificationID, $subscription)
209{
210 if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password'))
211 {
212 $inssub = "INSERT INTO subscriptions (url, username, owner) VALUES (\"" . $subscription . "\", \"" . $username . "\", \"false\")";
213 $inssub2 = mysql_query($inssub);
214
215 return new xmlrpcresp(new xmlrpcval(0, "int"));
216 }
217
218 return new xmlrpcresp(new xmlrpcval(1, "int"));
219}
220
208$s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), 221$s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"),
209 "InstaDisc.deleteItem" => array("function" => "deleteItem"), 222 "InstaDisc.deleteItem" => array("function" => "deleteItem"),
210 "InstaDisc.resendItem" => array("function" => "resendItem"), 223 "InstaDisc.resendItem" => array("function" => "resendItem"),
@@ -213,7 +226,8 @@ $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function"
213 "InstaDisc.sendFromCentral" => array("function" => "sendFromCentral"), 226 "InstaDisc.sendFromCentral" => array("function" => "sendFromCentral"),
214 "InstaDisc.sendUpdateNotice" => array("function" => "sendUpdateNotice"), 227 "InstaDisc.sendUpdateNotice" => array("function" => "sendUpdateNotice"),
215 "InstaDisc.askForDatabase" => array("function" => "askForDatabase"), 228 "InstaDisc.askForDatabase" => array("function" => "askForDatabase"),
216 "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription") 229 "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"),
230 "InstaDisc.addSubscription" => array("function" => "addSubscription")
217 ),0); 231 ),0);
218$s->functions_parameters_type = 'phpvals'; 232$s->functions_parameters_type = 'phpvals';
219$s->service(); 233$s->service();