diff options
Diffstat (limited to 'update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php')
-rw-r--r-- | update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index 856bb6a..5570ef3 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
@@ -21,19 +21,30 @@ include($phpbb_root_path . 'includes/xmlrpc/xmlrpc.inc'); | |||
21 | /** | 21 | /** |
22 | * Send an InstaDisc Item | 22 | * Send an InstaDisc Item |
23 | */ | 23 | */ |
24 | function sendItem($title, $author, $url, $semantics) | 24 | function sendItem($title, $author, $url, $fourm) |
25 | { | 25 | { |
26 | global $config, $db, $phpbb_root_path; | ||
26 | $verID = rand(1,65536); | 27 | $verID = rand(1,65536); |
27 | 28 | ||
29 | $url = str_replace($phpbb_root_path, generate_board_url() . '/', $url); | ||
30 | |||
31 | $da = array('forum_id' => $fourm); | ||
32 | $getfourm = "SELECT * FROM " . FORUMS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); | ||
33 | $getfourm2 = $db->sql_query($getfourm); | ||
34 | $getfourm3 = $db->sql_fetchrow($getfourm2); | ||
35 | $db->sql_freeresult($getfourm2); | ||
36 | $semantics = array('forum' => $getfourm3['forum_name']); | ||
37 | |||
28 | $client = new xmlrpc_client($config['id_central_server']); | 38 | $client = new xmlrpc_client($config['id_central_server']); |
29 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_username'], 'string'), | 39 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_username'], 'string'), |
30 | new xmlrpcval(md5($config['id_username'] . ':' . md5($config['id_password']) . ':' . $verID), 'string'), | 40 | new xmlrpcval(md5($config['id_username'] . ':' . md5($config['id_password']) . ':' . $verID), 'string'), |
31 | new xmlrpcval($verID, 'int'), | 41 | new xmlrpcval($verID, 'int'), |
32 | new xmlrpcval($config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/', 'string'), | 42 | new xmlrpcval(generate_board_url() . '/', 'string'), |
33 | new xmlrpcval($title, 'string'), | 43 | new xmlrpcval($title, 'string'), |
34 | new xmlrpcval($author, 'string'), | 44 | new xmlrpcval($author, 'string'), |
35 | new xmlrpcval($url, 'string'), | 45 | new xmlrpcval($url, 'string'), |
36 | new xmlrpcval($semantics, 'array'))); | 46 | new xmlrpcval(serialize($semantics), 'string'))); |
47 | $client->setDebug(4); | ||
37 | $client->send($msg); | 48 | $client->send($msg); |
38 | } | 49 | } |
39 | 50 | ||