about summary refs log tree commit diff stats
path: root/update/library/trunk/instadisc.php
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-09-06 22:42:07 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-09-06 22:42:07 +0000
commit9c8c1d163cc74e51a46d17e5359723e71a23d1ee (patch)
treeb3c26dcf2f626a4e8908141157404ffc873dde6f /update/library/trunk/instadisc.php
parent4419c4c44b18eda0d3a04af882e50be069fee49d (diff)
downloadinstadisc-9c8c1d163cc74e51a46d17e5359723e71a23d1ee.tar.gz
instadisc-9c8c1d163cc74e51a46d17e5359723e71a23d1ee.tar.bz2
instadisc-9c8c1d163cc74e51a46d17e5359723e71a23d1ee.zip
Update: Centralized Central in Library
Also removed subscription.php due to the new subscription specification (#28)

Refs #52 and #28
Diffstat (limited to 'update/library/trunk/instadisc.php')
-rw-r--r--update/library/trunk/instadisc.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/update/library/trunk/instadisc.php b/update/library/trunk/instadisc.php index f5be298..1162ac2 100644 --- a/update/library/trunk/instadisc.php +++ b/update/library/trunk/instadisc.php
@@ -6,17 +6,16 @@ include('xmlrpc/xmlrpc.inc');
6 6
7$idusUsername = array(); 7$idusUsername = array();
8$idusPassword = array(); 8$idusPassword = array();
9$idusCentralServer = array(); 9$idusSubscriptionSeriesURL = array();
10$idusSubscriptionURI = array(); 10$idusSubscriptionID = array();
11$idusSubscriptionTitle = array(); 11$idusSubscriptionTitle = array();
12$idusSubscriptionCategory = array(); 12$idusSubscriptionCategory = array();
13$idusActivationKey = array();
14$idusEncryptionKey = array(); 13$idusEncryptionKey = array();
15$instaDisc_subCount = 0; 14$instaDisc_subCount = 0;
16 15
17function instaDisc_sendItem($id, $title, $author, $url, $semantics) 16function instaDisc_sendItem($id, $title, $author, $url, $semantics)
18{ 17{
19 global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI, $idusEncryptionKey; 18 global $idusUsername, $idusPassword, $idusSubscriptionSeriesID, $idusSubscriptionID, $idusEncryptionKey;
20 19
21 $encID = 0; 20 $encID = 0;
22 if (($idusEncryptionKey[$id] != '') && extension_loaded('mcrypt')) 21 if (($idusEncryptionKey[$id] != '') && extension_loaded('mcrypt'))
@@ -43,11 +42,12 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics)
43 42
44 $verID = rand(1,2147483647); 43 $verID = rand(1,2147483647);
45 44
46 $client = new xmlrpc_client($idusCentralServer[$id]); 45 $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php');
47 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), 46 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'),
48 new xmlrpcval(md5($idusUsername[$id] . ":" . md5($idusPassword[$id]) . ":" . $verID), 'string'), 47 new xmlrpcval(md5($idusUsername[$id] . ":" . md5($idusPassword[$id]) . ":" . $verID), 'string'),
49 new xmlrpcval($verID, 'int'), 48 new xmlrpcval($verID, 'int'),
50 new xmlrpcval($idusSubscriptionURI[$id], 'string'), 49 new xmlrpcval($idusSubscriptionSeriesURL[$id], 'string'),
50 new xmlrpcval($idusSubscriptionID[$id], 'string'),
51 new xmlrpcval($title, 'string'), 51 new xmlrpcval($title, 'string'),
52 new xmlrpcval($author, 'string'), 52 new xmlrpcval($author, 'string'),
53 new xmlrpcval($url, 'string'), 53 new xmlrpcval($url, 'string'),
@@ -67,16 +67,15 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics)
67 } 67 }
68} 68}
69 69
70function instaDisc_addSubscription($username, $password, $central, $uri, $title, $category, $key = '', $enc = '') 70function instaDisc_addSubscription($username, $password, $url, $id, $title, $category, $enc = '')
71{ 71{
72 global $instaDisc_subCount, $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI, $idusSubscriptionTitle, $idusSubscriptionCategory, $idusActivationKey, $idusEncryptionKey; 72 global $instaDisc_subCount, $idusUsername, $idusPassword, $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSubscriptionTitle, $idusSubscriptionCategory, $idusEncryptionKey;
73 $idusUsername[$instaDisc_subCount] = $username; 73 $idusUsername[$instaDisc_subCount] = $username;
74 $idusPassword[$instaDisc_subCount] = $password; 74 $idusPassword[$instaDisc_subCount] = $password;
75 $idusCentralServer[$instaDisc_subCount] = $central; 75 $idusSubscriptionSeriesURL[$instaDisc_subCount] = $url;
76 $idusSubscriptionURI[$instaDisc_subCount] = $uri; 76 $idusSubscriptionID[$instaDisc_subCount] = $id;
77 $idusSubscriptionTitle[$instaDisc_subCount] = $title; 77 $idusSubscriptionTitle[$instaDisc_subCount] = $title;
78 $idusSubscriptionCategory[$instaDisc_subCount] = $category; 78 $idusSubscriptionCategory[$instaDisc_subCount] = $category;
79 $idusActivationKey[$instaDisc_subCount] = $key;
80 $idusEncryptionKey[$instaDisc_subCount] = $enc; 79 $idusEncryptionKey[$instaDisc_subCount] = $enc;
81 $instaDisc_subCount++; 80 $instaDisc_subCount++;
82} 81}