about summary refs log tree commit diff stats
path: root/update/plugin/phpBB3/trunk/root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'update/plugin/phpBB3/trunk/root/includes')
-rw-r--r--update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php2
-rw-r--r--update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php17
2 files changed, 15 insertions, 4 deletions
diff --git a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php index a5388f1..dc28771 100644 --- a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php
@@ -43,7 +43,7 @@ class acp_instadisc
43 $idun = isset($config['id_username']) ? $config['id_username'] : ''; 43 $idun = isset($config['id_username']) ? $config['id_username'] : '';
44 $idps = isset($config['id_password']) ? $config['id_password'] : ''; 44 $idps = isset($config['id_password']) ? $config['id_password'] : '';
45 $idak = isset($config['id_activation_key']) ? $config['id_activation_key'] : ''; 45 $idak = isset($config['id_activation_key']) ? $config['id_activation_key'] : '';
46 $idsf = $config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/instadisc.php'; 46 $idsf = generate_board_url() . '/instadisc.php';
47 47
48 $template->assign_vars(array( 48 $template->assign_vars(array(
49 'S_SUBSCRIPTION_TITLE' => $idst, 49 'S_SUBSCRIPTION_TITLE' => $idst,
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*/
24function sendItem($title, $author, $url, $semantics) 24function 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