From c0151ba7bae99a1c389e2d8b309ebe53b368da1d Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Sep 2008 22:04:47 +0000 Subject: Central: Removed Series-related code Refs #57 --- central/trunk/includes/instadisc.php | 15 --------------- central/trunk/subscription.php | 9 --------- central/trunk/xmlrpc.php | 24 ++++++++---------------- 3 files changed, 8 insertions(+), 40 deletions(-) delete mode 100644 central/trunk/subscription.php (limited to 'central/trunk') diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index 438fcfb..003ad1b 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php @@ -237,19 +237,4 @@ function instaDisc_changePassword($username, $password) $setpass2 = mysql_query($setpass); } -function instaDisc_resolveSubscription($seriesURL, $id) -{ - $client = new xmlrpc_client($seriesURL); - $msg = new xmlrpcmsg('InstaDisc.subscriptionInfo', array( new xmlrpcval($id, 'string'))); - $resp = $client->send($msg); - $val = $resp->value()->scalarVal(); - - if ($val == 'false') - { - return 'false'; - } else { - return unserialize($val); - } -} - ?> diff --git a/central/trunk/subscription.php b/central/trunk/subscription.php deleted file mode 100644 index 9b6a61c..0000000 --- a/central/trunk/subscription.php +++ /dev/null @@ -1,9 +0,0 @@ -Subscription: http://fourisland.com/ -Title: -Category: instadisc diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index f8f5beb..0254e66 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php @@ -75,26 +75,18 @@ function requestRetained($username, $verification, $verificationID) return new xmlrpcresp(new xmlrpcval(1, "int")); } -function sendFromUpdate($subscriptionSeriesURL, $subscriptionID, $title, $author, $url, $semantics, $encryptionID) +function sendFromUpdate($subscriptionURL, $title, $author, $url, $semantics, $encryptionID) { - $subscriptionURL = instaDisc_resolveSubscription($subscriptionSeriesURL, $subscriptionID); - if ($subscriptionURL != 'false') + $getsed = "SELECT * FROM subscriptions WHERE url = \"" . mysql_real_escape_string($subscriptionURL) . "\""; + $getsed2 = mysql_query($getsed); + $i=0; + while ($getsed3[$i] = mysql_fetch_array($getsed2)) { - $subscriptionURL = $subscriptionURL['url']; - - $getsed = "SELECT * FROM subscriptions WHERE url = \"" . mysql_real_escape_string($subscriptionURL) . "\""; - $getsed2 = mysql_query($getsed); - $i=0; - while ($getsed3[$i] = mysql_fetch_array($getsed2)) - { - instaDisc_addItem($getsed3[$i]['username'], $subscriptionURL, $title, $author, $url, $semantics, $encryptionID); - $i++; - } - - return new xmlrpcresp(new xmlrpcval(0, "int")); + instaDisc_addItem($getsed3[$i]['username'], $subscriptionURL, $title, $author, $url, $semantics, $encryptionID); + $i++; } - return new xmlrpcresp(new xmlrpcval(1, "int")); + return new xmlrpcresp(new xmlrpcval(0, "int")); } function deleteSubscription($username, $verification, $verificationID, $subscription) -- cgit 1.4.1