about summary refs log tree commit diff stats
path: root/series/core
diff options
context:
space:
mode:
Diffstat (limited to 'series/core')
-rw-r--r--series/core/trunk/xmlrpc.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/series/core/trunk/xmlrpc.php b/series/core/trunk/xmlrpc.php index 60ada6a..01664ad 100644 --- a/series/core/trunk/xmlrpc.php +++ b/series/core/trunk/xmlrpc.php
@@ -17,7 +17,26 @@ function subscriptionInfo($id)
17 )); 17 ));
18} 18}
19 19
20$s = new xmlrpc_server(array( "InstaDisc.subscriptionInfo" => array('function' => 'subscriptionInfo') 20function getPasswordInfo($id)
21{
22 if (!instaDisc_subscriptionExists($id))
23 {
24 return new xmlrpcresp(new xmlrpcval('false', 'string'));
25 }
26
27 $sub = instaDisc_getSubscription($id);
28 if ($sub['password'] == '')
29 {
30 return new xmlrpcresp(new xmlrpcval('false', 'string'));
31 } else {
32 $verID = rand(1,2147483647);
33
34 return new xmlrpcresp(new xmlrpcval(md5($sub['password'] . ':' . $verID) . ':' . $verID, 'string'));
35 }
36}
37
38$s = new xmlrpc_server(array( "InstaDisc.subscriptionInfo" => array('function' => 'subscriptionInfo'),
39 "InstaDisc.getPasswordInfo" => array('function' => 'getPasswordInfo')
21 ), 0); 40 ), 0);
22$s->functions_parameters_type = 'phpvals'; 41$s->functions_parameters_type = 'phpvals';
23$s->service(); 42$s->service();