diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-06 22:42:07 +0000 | 
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-06 22:42:07 +0000 | 
| commit | 9c8c1d163cc74e51a46d17e5359723e71a23d1ee (patch) | |
| tree | b3c26dcf2f626a4e8908141157404ffc873dde6f /update | |
| parent | 4419c4c44b18eda0d3a04af882e50be069fee49d (diff) | |
| download | instadisc-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')
| -rw-r--r-- | update/library/trunk/instadisc.php | 21 | ||||
| -rw-r--r-- | update/library/trunk/subscription.php | 26 | 
2 files changed, 10 insertions, 37 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 | ||
| 17 | function instaDisc_sendItem($id, $title, $author, $url, $semantics) | 16 | function 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 | ||
| 70 | function instaDisc_addSubscription($username, $password, $central, $uri, $title, $category, $key = '', $enc = '') | 70 | function 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 | } | 
| diff --git a/update/library/trunk/subscription.php b/update/library/trunk/subscription.php deleted file mode 100644 index 6fe0197..0000000 --- a/update/library/trunk/subscription.php +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | /* InstaDisc Update - A Four Island Project */ | ||
| 4 | |||
| 5 | include('instadisc.php'); // Make sure that if you move me away from instadisc.php that you update this include! | ||
| 6 | |||
| 7 | $id = (isset($_GET['id']) ? $_GET['id'] : 0); | ||
| 8 | |||
| 9 | echo('Subscription: ' . $idusSubscriptionURI[$id] . "\n"); | ||
| 10 | echo('Title: ' . $idusSubscriptionTitle[$id] . "\n"); | ||
| 11 | echo('Category: ' . $idusSubscriptionCategory[$id] . "\n"); | ||
| 12 | |||
| 13 | if ($idusActivationKey[$id] != '') | ||
| 14 | { | ||
| 15 | echo('Key: ' . $idusActivationKey[$id] . "\n"); | ||
| 16 | } | ||
| 17 | |||
| 18 | if ($idusEncryptionKey[$id] != '') | ||
| 19 | { | ||
| 20 | $verID = rand(1,65536); | ||
| 21 | |||
| 22 | echo('Verification: ' . md5($idusSubscriptionTitle[$id] . ':' . md5($idusEncryptionKey[$id]) . ':' . $verID) . "\n"); | ||
| 23 | echo('Verification-ID: ' . $verID . "\n"); | ||
| 24 | } | ||
| 25 | |||
| 26 | ?> | ||
