diff options
Diffstat (limited to 'update')
-rw-r--r-- | update/library/trunk/instadisc.php | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/update/library/trunk/instadisc.php b/update/library/trunk/instadisc.php index 20bbbb9..7c1a763 100644 --- a/update/library/trunk/instadisc.php +++ b/update/library/trunk/instadisc.php | |||
@@ -6,13 +6,17 @@ include('xmlrpc/xmlrpc.inc'); | |||
6 | 6 | ||
7 | $idusSubscriptionSeriesURL = array(); | 7 | $idusSubscriptionSeriesURL = array(); |
8 | $idusSubscriptionID = array(); | 8 | $idusSubscriptionID = array(); |
9 | $idusSubscriptionTitle = array(); | 9 | $idusSeriesUsername = array(); |
10 | $idusSeriesPassword = array(); | ||
11 | $idusSubscriptionURL = array(); | ||
12 | $idusSubscriptionCategory = array(); | ||
13 | $idusSubscriptionPersonal = array(); | ||
10 | $idusEncryptionKey = array(); | 14 | $idusEncryptionKey = array(); |
11 | $instaDisc_subCount = 0; | 15 | $instaDisc_subCount = 0; |
12 | 16 | ||
13 | function instaDisc_sendItem($id, $title, $author, $url, $semantics) | 17 | function instaDisc_sendItem($id, $title, $author, $url, $semantics) |
14 | { | 18 | { |
15 | global $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusEncryptionKey; | 19 | global $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSeriesUsername, $idusSeriesPassword, $idusSubscriptionURL, $idusSubscriptionCategory, $idusSubscriptionPersonal, $idusEncryptionKey; |
16 | 20 | ||
17 | $encID = 0; | 21 | $encID = 0; |
18 | if (($idusEncryptionKey[$id] != '') && extension_loaded('mcrypt')) | 22 | if (($idusEncryptionKey[$id] != '') && extension_loaded('mcrypt')) |
@@ -39,9 +43,16 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) | |||
39 | 43 | ||
40 | $verID = rand(1,2147483647); | 44 | $verID = rand(1,2147483647); |
41 | 45 | ||
42 | $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); | 46 | $client = new xmlrpc_client($idusSubscriptionSeriesURL[$id]); |
43 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusSubscriptionSeriesURL[$id], 'string'), | 47 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusSeriesUsername[$id], 'string'), |
48 | new xmlrpcval(md5($idusSeriesUsername[$id] . ':' . md5($idusSeriesPassword[$id]) . ':' . $verID), 'string'), | ||
49 | new xmlrpcval($verID, 'int'), | ||
50 | new xmlrpcval($idusSubscriptionSeriesURL[$id], 'string'), | ||
44 | new xmlrpcval($idusSubscriptionID[$id], 'string'), | 51 | new xmlrpcval($idusSubscriptionID[$id], 'string'), |
52 | new xmlrpcval($idusSubscriptionURL[$id], 'string'), | ||
53 | new xmlrpcval($idusSubscriptionTitle[$id], 'string'), | ||
54 | new xmlrpcval($idusSubscriptionCategory[$id], 'string'), | ||
55 | new xmlrpcval($idusSubscriptionPersonal[$id], 'string'), | ||
45 | new xmlrpcval($title, 'string'), | 56 | new xmlrpcval($title, 'string'), |
46 | new xmlrpcval($author, 'string'), | 57 | new xmlrpcval($author, 'string'), |
47 | new xmlrpcval($url, 'string'), | 58 | new xmlrpcval($url, 'string'), |
@@ -61,12 +72,16 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) | |||
61 | } | 72 | } |
62 | } | 73 | } |
63 | 74 | ||
64 | function instaDisc_addSubscription($url, $id, $title, $enc = '') | 75 | function instaDisc_addSubscription($url, $id, $un, $pw, $sUrl, $cat, $personal = '', $enc = '') |
65 | { | 76 | { |
66 | global $instaDisc_subCount, $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSubscriptionTitle, $idusEncryptionKey; | 77 | global $instaDisc_subCount, $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSeriesUsername, $idusSeriesPassword, $idusSubscriptionURL, $idusSubscriptionCategory, $idusSubscriptionPersonal, $idusEncryptionKey; |
67 | $idusSubscriptionSeriesURL[$instaDisc_subCount] = $url; | 78 | $idusSubscriptionSeriesURL[$instaDisc_subCount] = $url; |
68 | $idusSubscriptionID[$instaDisc_subCount] = $id; | 79 | $idusSubscriptionID[$instaDisc_subCount] = $id; |
69 | $idusSubscriptionTitle[$instaDisc_subCount] = $title; | 80 | $idusSeriesUsername[$instaDisc_subCount] = $un; |
81 | $idusSeriesPassword[$instaDisc_subCount] = $pw; | ||
82 | $idusSubscriptionURL[$instaDisc_subCount] = $sUrl; | ||
83 | $idusSubscriptionCategory[$instaDisc_subCount] = $cat; | ||
84 | $idusSubscriptionPersonal[$instaDisc_subCount] = ($personal != '' ? 'true' : 'false'); | ||
70 | $idusEncryptionKey[$instaDisc_subCount] = $enc; | 85 | $idusEncryptionKey[$instaDisc_subCount] = $enc; |
71 | $instaDisc_subCount++; | 86 | $instaDisc_subCount++; |
72 | } | 87 | } |