
Thanks for the quick responce! That has to be the fastest one I have recieved on this forum!

And thank you for making this mod.. I would donate to support it but I really can't afford to. I hope you understand.
Code: Select all
$_REQUEST['form_token'] = $_POST['form_token'] = sha1($now . $user->data['user_form_salt'] . 'ucp_pm_compose');
Code: Select all
-------------[ OPEN ]------------------------------
mcp.php
-------------[ FIND ]-------------------------------
$now = $_REQUEST['creation_time'] = $_POST['creation_time'] = time()
-------------[ AFTER / ADD ]---------------------
- 5
-------------[ SAVE / CLOSE ALL FILES ]------
Code: Select all
$now = $_REQUEST['creation_time'] = $_POST['creation_time'] = time() - 5;
Code: Select all
$sql = 'SELECT DISTINCT p.poster_id
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE p.forum_id = ' . $forum_id . '
AND u.user_id = p.poster_id
AND u.user_type <> ' . (int) USER_INACTIVE . '
AND p.poster_id <> ' . $user->data['user_id'] . '
AND p.poster_id <> ' . (int) ANONYMOUS . '
AND p.topic_id = ' . $topic_id;
$result = $db->sql_query($sql);
Code: Select all
// Remove author from the recipients
if(isset($_REQUEST['address_list']['u'][$user->data['user_id']]))
{
unset($_REQUEST['address_list']['u'][$user->data['user_id']]);
}
That's a good question that I can't answer at the moment - but if, then only when the PM is sent.joebert wrote:Don't the PM functions already handle that stuff ?
Code: Select all
if ($config['allow_post_links'])
{
$_REQUEST['message'] = $user->lang['TOPIC'] . ": [url=" . generate_board_url() . "/viewtopic.$phpEx?f={$forum_id}&t={$topic_id}]" . htmlspecialchars_decode($row['topic_title']) . "[/url]\n\n";
}
else
{
$_REQUEST['message'] = $user->lang['TOPIC'] . ': ' . htmlspecialchars_decode($row['topic_title']) . " (" . generate_board_url() . "/viewtopic.$phpEx?f={$forum_id}&t={$topic_id})\n\n";
}
$_REQUEST['subject'] = 'Re: ' . htmlspecialchars_decode($row['topic_title']);
$_POST['preview'] = true;
I'm sorry to hear that - thanks for your existing MODs and for your latest support!joebert wrote:I've decided not to support any of my phpBB mods anymore.
done this updatejoebert wrote:phpBB 3.0.3 made a tiny change in the check_form_key function that makes an elapsed time of zero invalid.
I'll submit a repackaged version of this MOD for review shortly, but in the mean time the fix is literally as simple as adding a few characters to "mcp.php".
The whole line should now readCode: Select all
-------------[ OPEN ]------------------------------ mcp.php -------------[ FIND ]------------------------------- $now = $_REQUEST['creation_time'] = $_POST['creation_time'] = time() -------------[ AFTER / ADD ]--------------------- - 5 -------------[ SAVE / CLOSE ALL FILES ]------
This fix causes the artificial form token to have a creation date of 5 seconds ago so that when the actual token check is done there's not an elapsed time of zero.Code: Select all
$now = $_REQUEST['creation_time'] = $_POST['creation_time'] = time() - 5;