diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-01 18:27:00 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-01 18:27:00 +0000 |
commit | 0114b7b5ddaf919a61b108f5006a256b81178c3d (patch) | |
tree | a1d7511cecdbd59abf15d8b736d2503b6f588580 /central/trunk | |
parent | c717b1cd06c3d935cc5d70208bebe57215492eab (diff) | |
download | instadisc-0114b7b5ddaf919a61b108f5006a256b81178c3d.tar.gz instadisc-0114b7b5ddaf919a61b108f5006a256b81178c3d.tar.bz2 instadisc-0114b7b5ddaf919a61b108f5006a256b81178c3d.zip |
Central: Added InstaDisc.addSubscription function
Diffstat (limited to 'central/trunk')
-rw-r--r-- | central/trunk/xmlrpc.php | 16 |
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 | ||
208 | function 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(); |