From a9a796498285358e7a2f1fde5043e4015de5db70 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 10 Sep 2008 21:04:26 +0000 Subject: Update: Added more fields Refs #55 --- update/library/trunk/instadisc.php | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'update/library') 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'); $idusSubscriptionSeriesURL = array(); $idusSubscriptionID = array(); -$idusSubscriptionTitle = array(); +$idusSeriesUsername = array(); +$idusSeriesPassword = array(); +$idusSubscriptionURL = array(); +$idusSubscriptionCategory = array(); +$idusSubscriptionPersonal = array(); $idusEncryptionKey = array(); $instaDisc_subCount = 0; function instaDisc_sendItem($id, $title, $author, $url, $semantics) { - global $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusEncryptionKey; + global $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSeriesUsername, $idusSeriesPassword, $idusSubscriptionURL, $idusSubscriptionCategory, $idusSubscriptionPersonal, $idusEncryptionKey; $encID = 0; if (($idusEncryptionKey[$id] != '') && extension_loaded('mcrypt')) @@ -39,9 +43,16 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) $verID = rand(1,2147483647); - $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); - $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusSubscriptionSeriesURL[$id], 'string'), + $client = new xmlrpc_client($idusSubscriptionSeriesURL[$id]); + $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusSeriesUsername[$id], 'string'), + new xmlrpcval(md5($idusSeriesUsername[$id] . ':' . md5($idusSeriesPassword[$id]) . ':' . $verID), 'string'), + new xmlrpcval($verID, 'int'), + new xmlrpcval($idusSubscriptionSeriesURL[$id], 'string'), new xmlrpcval($idusSubscriptionID[$id], 'string'), + new xmlrpcval($idusSubscriptionURL[$id], 'string'), + new xmlrpcval($idusSubscriptionTitle[$id], 'string'), + new xmlrpcval($idusSubscriptionCategory[$id], 'string'), + new xmlrpcval($idusSubscriptionPersonal[$id], 'string'), new xmlrpcval($title, 'string'), new xmlrpcval($author, 'string'), new xmlrpcval($url, 'string'), @@ -61,12 +72,16 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) } } -function instaDisc_addSubscription($url, $id, $title, $enc = '') +function instaDisc_addSubscription($url, $id, $un, $pw, $sUrl, $cat, $personal = '', $enc = '') { - global $instaDisc_subCount, $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSubscriptionTitle, $idusEncryptionKey; + global $instaDisc_subCount, $idusSubscriptionSeriesURL, $idusSubscriptionID, $idusSeriesUsername, $idusSeriesPassword, $idusSubscriptionURL, $idusSubscriptionCategory, $idusSubscriptionPersonal, $idusEncryptionKey; $idusSubscriptionSeriesURL[$instaDisc_subCount] = $url; $idusSubscriptionID[$instaDisc_subCount] = $id; - $idusSubscriptionTitle[$instaDisc_subCount] = $title; + $idusSeriesUsername[$instaDisc_subCount] = $un; + $idusSeriesPassword[$instaDisc_subCount] = $pw; + $idusSubscriptionURL[$instaDisc_subCount] = $sUrl; + $idusSubscriptionCategory[$instaDisc_subCount] = $cat; + $idusSubscriptionPersonal[$instaDisc_subCount] = ($personal != '' ? 'true' : 'false'); $idusEncryptionKey[$instaDisc_subCount] = $enc; $instaDisc_subCount++; } -- cgit 1.4.1