diff options
Diffstat (limited to 'update/plugin/mediawiki/trunk/extensions')
-rw-r--r-- | update/plugin/mediawiki/trunk/extensions/instadisc/instadisc.php | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/update/plugin/mediawiki/trunk/extensions/instadisc/instadisc.php b/update/plugin/mediawiki/trunk/extensions/instadisc/instadisc.php index 35271b2..6425e6e 100644 --- a/update/plugin/mediawiki/trunk/extensions/instadisc/instadisc.php +++ b/update/plugin/mediawiki/trunk/extensions/instadisc/instadisc.php | |||
@@ -15,9 +15,9 @@ $wgHooks['ArticleSaveComplete'][] = 'instaDisc_sendItem'; | |||
15 | 15 | ||
16 | function instaDisc_sendItem(&$article, &$user, &$text, &$summary, &$minoredit, &$watchthis, &$sectionanchor, &$flags, &$revision) | 16 | function instaDisc_sendItem(&$article, &$user, &$text, &$summary, &$minoredit, &$watchthis, &$sectionanchor, &$flags, &$revision) |
17 | { | 17 | { |
18 | global $instaDisc_password, $instaDisc_subscriptionPersonal, $instaDisc_seriesURL, $instaDisc_seriesUsername, $instaDisc_seriesPassword, $instaDisc_subscriptionID, $instaDisc_subscriptionURL, $instaDisc_subscriptionTitle; | 18 | global $instaDisc_password, $instaDisc_seriesURL, $instaDisc_subscriptionID; |
19 | 19 | ||
20 | if (!isset($instaDisc_password) || !isset($instaDisc_subscriptionPersonal) || !isset($instaDisc_seriesURL) || !isset($instaDisc_seriesUsername) || !isset($instaDisc_seriesPassword) || !isset($instaDisc_subscriptionID) || !isset($instaDisc_subscriptionURL) || !isset($instaDisc_subscriptionTitle)) | 20 | if (!isset($instaDisc_password) || !isset($instaDisc_seriesURL) || !isset($instaDisc_subscriptionID)) |
21 | { | 21 | { |
22 | return false; | 22 | return false; |
23 | } | 23 | } |
@@ -32,15 +32,10 @@ function instaDisc_sendItem(&$article, &$user, &$text, &$summary, &$minoredit, & | |||
32 | $encID = encryptData($title, $author, $url, $instaDisc_password); | 32 | $encID = encryptData($title, $author, $url, $instaDisc_password); |
33 | } | 33 | } |
34 | 34 | ||
35 | $instaDisc_subscriptionPersonal = ($instaDisc_subscriptionPersonal == 'true' ? 'true' : 'false'); | ||
36 | |||
37 | $verID = rand(1,2147483647); | 35 | $verID = rand(1,2147483647); |
38 | 36 | ||
39 | $client = new xmlrpc_client($instaDisc_seriesURL); | 37 | $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); |
40 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($instaDisc_seriesUsername, 'string'), | 38 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($instaDisc_seriesURL, 'string'), |
41 | new xmlrpcval(md5($instaDisc_seriesUsername . ':' . md5($instaDisc_seriesPassword) . ':' . $verID), 'string'), | ||
42 | new xmlrpcval($verID, 'int'), | ||
43 | new xmlrpcval($instaDisc_seriesURL, 'string'), | ||
44 | new xmlrpcval($instaDisc_subscriptionID, 'string'), | 39 | new xmlrpcval($instaDisc_subscriptionID, 'string'), |
45 | new xmlrpcval($title, 'string'), | 40 | new xmlrpcval($title, 'string'), |
46 | new xmlrpcval($author, 'string'), | 41 | new xmlrpcval($author, 'string'), |
@@ -88,18 +83,3 @@ function encryptString($td, $key, $string) | |||
88 | 83 | ||
89 | return $string; | 84 | return $string; |
90 | } | 85 | } |
91 | |||
92 | function instaDisc_initSubscription() | ||
93 | { | ||
94 | $client = new xmlrpc_client($instaDisc_seriesURL); | ||
95 | $msg = new xmlrpcmsg("InstaDisc.initSubscription", array( new xmlrpcval($instaDisc_seriesUsername, 'string'), | ||
96 | new xmlrpcval(md5($instaDisc_seriesUsername . ':' . md5($instaDisc_seriesPassword) . ':' . $verID), 'string'), | ||
97 | new xmlrpcval($verID, 'int'), | ||
98 | new xmlrpcval($instaDisc_seriesURL, 'string'), | ||
99 | new xmlrpcval($instaDisc_subscriptionID, 'string'), | ||
100 | new xmlrpcval($instaDisc_subscriptionURL, 'string'), | ||
101 | new xmlrpcval($instaDisc_subscriptionTitle, 'string'), | ||
102 | new xmlrpcval('page-change', 'string'), | ||
103 | new xmlrpcval($instaDisc_subscriptionPersonal, 'string'))); | ||
104 | $client->send($msg); | ||
105 | } | ||