From 9c8c1d163cc74e51a46d17e5359723e71a23d1ee Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 6 Sep 2008 22:42:07 +0000 Subject: Update: Centralized Central in Library Also removed subscription.php due to the new subscription specification (#28) Refs #52 and #28 --- update/library/trunk/instadisc.php | 21 ++++++++++----------- update/library/trunk/subscription.php | 26 -------------------------- 2 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 update/library/trunk/subscription.php 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'); $idusUsername = array(); $idusPassword = array(); -$idusCentralServer = array(); -$idusSubscriptionURI = array(); +$idusSubscriptionSeriesURL = array(); +$idusSubscriptionID = array(); $idusSubscriptionTitle = array(); $idusSubscriptionCategory = array(); -$idusActivationKey = array(); $idusEncryptionKey = array(); $instaDisc_subCount = 0; function instaDisc_sendItem($id, $title, $author, $url, $semantics) { - global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI, $idusEncryptionKey; + global $idusUsername, $idusPassword, $idusSubscriptionSeriesID, $idusSubscriptionID, $idusEncryptionKey; $encID = 0; if (($idusEncryptionKey[$id] != '') && extension_loaded('mcrypt')) @@ -43,11 +42,12 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) $verID = rand(1,2147483647); - $client = new xmlrpc_client($idusCentralServer[$id]); + $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), new xmlrpcval(md5($idusUsername[$id] . ":" . md5($idusPassword[$id]) . ":" . $verID), 'string'), new xmlrpcval($verID, 'int'), - new xmlrpcval($idusSubscriptionURI[$id], 'string'), + new xmlrpcval($idusSubscriptionSeriesURL[$id], 'string'), + new xmlrpcval($idusSubscriptionID[$id], 'string'), new xmlrpcval($title, 'string'), new xmlrpcval($author, 'string'), new xmlrpcval($url, 'string'), @@ -67,16 +67,15 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) } } -function instaDisc_addSubscription($username, $password, $central, $uri, $title, $category, $key = '', $enc = '') +function instaDisc_addSubscription($username, $password, $url, $id, $title, $category, $enc = '') { - global $instaDisc_subCount, $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI, $idusSubscriptionTitle, $idusSubscriptionCategory, $idusActivationKey, $idusEncryptionKey; + global $instaDisc_subCount, $idusUsername, $idusPassword, $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSubscriptionTitle, $idusSubscriptionCategory, $idusEncryptionKey; $idusUsername[$instaDisc_subCount] = $username; $idusPassword[$instaDisc_subCount] = $password; - $idusCentralServer[$instaDisc_subCount] = $central; - $idusSubscriptionURI[$instaDisc_subCount] = $uri; + $idusSubscriptionSeriesURL[$instaDisc_subCount] = $url; + $idusSubscriptionID[$instaDisc_subCount] = $id; $idusSubscriptionTitle[$instaDisc_subCount] = $title; $idusSubscriptionCategory[$instaDisc_subCount] = $category; - $idusActivationKey[$instaDisc_subCount] = $key; $idusEncryptionKey[$instaDisc_subCount] = $enc; $instaDisc_subCount++; } 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 @@ - -- cgit 1.4.1