about summary refs log tree commit diff stats
path: root/update
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-09-10 21:04:26 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-09-10 21:04:26 +0000
commita9a796498285358e7a2f1fde5043e4015de5db70 (patch)
tree8e3533dc006a2469ba8240307b0a2cc154e92d16 /update
parent7a683b695a297794bf86b063ebf2e77835f334d0 (diff)
downloadinstadisc-a9a796498285358e7a2f1fde5043e4015de5db70.tar.gz
instadisc-a9a796498285358e7a2f1fde5043e4015de5db70.tar.bz2
instadisc-a9a796498285358e7a2f1fde5043e4015de5db70.zip
Update: Added more fields
Refs #55
Diffstat (limited to 'update')
-rw-r--r--update/library/trunk/instadisc.php29
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
13function instaDisc_sendItem($id, $title, $author, $url, $semantics) 17function 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
64function instaDisc_addSubscription($url, $id, $title, $enc = '') 75function 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}