diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-16 17:52:30 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-16 17:52:30 +0000 |
commit | 2d998db45226ca7efd39ec6e04b9891ccf129d4f (patch) | |
tree | 8059664ec8f60c17239672e69abea7d2970a59cd /update | |
parent | 3abf3909dfa306d20358a3538da212b7cb64f52a (diff) | |
download | instadisc-2d998db45226ca7efd39ec6e04b9891ccf129d4f.tar.gz instadisc-2d998db45226ca7efd39ec6e04b9891ccf129d4f.tar.bz2 instadisc-2d998db45226ca7efd39ec6e04b9891ccf129d4f.zip |
General: Upgraded Verification ID generation
Verification IDs in Central and Update can now be between 0 and 2147483647. Closes #37
Diffstat (limited to 'update')
-rw-r--r-- | update/library/trunk/instadisc.php | 6 | ||||
-rw-r--r-- | update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | 4 | ||||
-rw-r--r-- | update/plugin/wordpress/trunk/instadisc/instadisc.php | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/update/library/trunk/instadisc.php b/update/library/trunk/instadisc.php index bfc1101..8a17da0 100644 --- a/update/library/trunk/instadisc.php +++ b/update/library/trunk/instadisc.php | |||
@@ -18,7 +18,7 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics) | |||
18 | { | 18 | { |
19 | global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI; | 19 | global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI; |
20 | 20 | ||
21 | $verID = rand(1,65536); | 21 | $verID = rand(1,2147483647); |
22 | 22 | ||
23 | $client = new xmlrpc_client($idusCentralServer[$id]); | 23 | $client = new xmlrpc_client($idusCentralServer[$id]); |
24 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), | 24 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), |
@@ -40,7 +40,7 @@ function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics) | |||
40 | $encID = 0; | 40 | $encID = 0; |
41 | while ($encID == 0) | 41 | while ($encID == 0) |
42 | { | 42 | { |
43 | $encID = rand(1,65536); | 43 | $encID = rand(1,2147483647); |
44 | } | 44 | } |
45 | 45 | ||
46 | $cipher = "rijndael-128"; | 46 | $cipher = "rijndael-128"; |
@@ -70,7 +70,7 @@ function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics) | |||
70 | 70 | ||
71 | mcrypt_module_close($td); | 71 | mcrypt_module_close($td); |
72 | 72 | ||
73 | $verID = rand(1,65536); | 73 | $verID = rand(1,2147483647); |
74 | 74 | ||
75 | $client = new xmlrpc_client($idusCentralServer[$id]); | 75 | $client = new xmlrpc_client($idusCentralServer[$id]); |
76 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), | 76 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), |
diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index df7c203..95d1956 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
@@ -24,7 +24,7 @@ include($phpbb_root_path . 'includes/xmlrpc/xmlrpc.inc'); | |||
24 | function sendItem($title, $userID, $url, $fourm) | 24 | function sendItem($title, $userID, $url, $fourm) |
25 | { | 25 | { |
26 | global $config, $db, $phpbb_root_path; | 26 | global $config, $db, $phpbb_root_path; |
27 | $verID = rand(1,65536); | 27 | $verID = rand(1,2147483647); |
28 | 28 | ||
29 | $da = array('user_id' => $userID); | 29 | $da = array('user_id' => $userID); |
30 | $getuser = "SELECT * FROM " . USERS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); | 30 | $getuser = "SELECT * FROM " . USERS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); |
@@ -33,7 +33,7 @@ function sendItem($title, $userID, $url, $fourm) | |||
33 | $db->sql_freeresult($getuser2); | 33 | $db->sql_freeresult($getuser2); |
34 | $author = $getuser3['username']; | 34 | $author = $getuser3['username']; |
35 | 35 | ||
36 | $url = html_entity_decode(str_replace($phpbb_root_path, generate_board_url() . '/', $url)); | 36 | $url = str_replace($phpbb_root_path, generate_board_url() . '/', $url); |
37 | 37 | ||
38 | $da = array('forum_id' => $fourm); | 38 | $da = array('forum_id' => $fourm); |
39 | $getfourm = "SELECT * FROM " . FORUMS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); | 39 | $getfourm = "SELECT * FROM " . FORUMS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); |
diff --git a/update/plugin/wordpress/trunk/instadisc/instadisc.php b/update/plugin/wordpress/trunk/instadisc/instadisc.php index b8ed9d1..c1d82ad 100644 --- a/update/plugin/wordpress/trunk/instadisc/instadisc.php +++ b/update/plugin/wordpress/trunk/instadisc/instadisc.php | |||
@@ -146,7 +146,7 @@ function sendPost($id) | |||
146 | $authorName = $author->display_name; | 146 | $authorName = $author->display_name; |
147 | $url = get_permalink($id); | 147 | $url = get_permalink($id); |
148 | 148 | ||
149 | $verID = rand(1,65536); | 149 | $verID = rand(1,2147483647); |
150 | 150 | ||
151 | $client = new xmlrpc_client(get_option('instaDisc_blogPost_centralServer')); | 151 | $client = new xmlrpc_client(get_option('instaDisc_blogPost_centralServer')); |
152 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_blogPost_centralServer_username'), 'string'), | 152 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_blogPost_centralServer_username'), 'string'), |
@@ -170,7 +170,7 @@ function sendComment($id) | |||
170 | $author = $comment->comment_author; | 170 | $author = $comment->comment_author; |
171 | $url = get_permalink($comment->comment_post_ID) . "#comments"; | 171 | $url = get_permalink($comment->comment_post_ID) . "#comments"; |
172 | 172 | ||
173 | $verID = rand(1,65536); | 173 | $verID = rand(1,2147483647); |
174 | 174 | ||
175 | $client = new xmlrpc_client(get_option('instaDisc_comment_centralServer')); | 175 | $client = new xmlrpc_client(get_option('instaDisc_comment_centralServer')); |
176 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_comment_centralServer_username'), 'string'), | 176 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_comment_centralServer_username'), 'string'), |