phpBB

Code Changes

File: posting.php

  Unmodified   Added   Modified   Removed
Line 33Line 33
$topic_id	= $request->variable('t', 0);
$forum_id = $request->variable('f', 0);
$draft_id = $request->variable('d', 0);

$topic_id	= $request->variable('t', 0);
$forum_id = $request->variable('f', 0);
$draft_id = $request->variable('d', 0);

$lastclick	= $request->variable('lastclick', 0);

 

$preview = (isset($_POST['preview'])) ? true : false;
$save = (isset($_POST['save'])) ? true : false;


$preview = (isset($_POST['preview'])) ? true : false;
$save = (isset($_POST['save'])) ? true : false;

Line 68Line 67
* @var	int		topic_id	ID of the topic
* @var int forum_id ID of the forum
* @var int draft_id ID of the draft

* @var	int		topic_id	ID of the topic
* @var int forum_id ID of the forum
* @var int draft_id ID of the draft

* @var	int		lastclick	Timestamp of when the form was last loaded

 
* @var	bool	submit		Whether or not the form has been submitted
* @var bool preview Whether or not the post is being previewed
* @var bool save Whether or not a draft is being saved

* @var	bool	submit		Whether or not the form has been submitted
* @var bool preview Whether or not the post is being previewed
* @var bool save Whether or not a draft is being saved

Line 85Line 83
*							language keys.
* @since 3.1.0-a1
* @changed 3.1.2-RC1 Removed 'delete' var as it does not exist

*							language keys.
* @since 3.1.0-a1
* @changed 3.1.2-RC1 Removed 'delete' var as it does not exist

 
* @changed 3.2.4-RC1		Remove unused 'lastclick' var

*/
$vars = array(
'post_id',
'topic_id',
'forum_id',
'draft_id',

*/
$vars = array(
'post_id',
'topic_id',
'forum_id',
'draft_id',

	'lastclick',

 
	'submit',
'preview',
'save',

	'submit',
'preview',
'save',

Line 354Line 352
* @var	int		topic_id	ID of the topic
* @var int forum_id ID of the forum
* @var int draft_id ID of the draft

* @var	int		topic_id	ID of the topic
* @var int forum_id ID of the forum
* @var int draft_id ID of the draft

* @var	int		lastclick	Timestamp of when the form was last loaded

 
* @var	bool	submit		Whether or not the form has been submitted
* @var bool preview Whether or not the post is being previewed
* @var bool save Whether or not a draft is being saved

* @var	bool	submit		Whether or not the form has been submitted
* @var bool preview Whether or not the post is being previewed
* @var bool save Whether or not a draft is being saved

Line 370Line 367
* @var	array	post_data	All post data from database
* @since 3.1.3-RC1
* @changed 3.1.10-RC1 Added post_data

* @var	array	post_data	All post data from database
* @since 3.1.3-RC1
* @changed 3.1.10-RC1 Added post_data

 
* @changed 3.2.4-RC1 		Remove unused 'lastclick' var

*/
$vars = array(
'post_id',
'topic_id',
'forum_id',
'draft_id',

*/
$vars = array(
'post_id',
'topic_id',
'forum_id',
'draft_id',

	'lastclick',

 
	'submit',
'preview',
'save',

	'submit',
'preview',
'save',

Line 1630Line 1627
	// Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
$message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);


	// Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
$message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);


	if ($config['allow_bbcode'])
{
$message_parser->message = $bbcode_utils->generate_quote(
censor_text($message_parser->message),
array(

	$quote_attributes = array(





				'author'  => $post_data['quote_username'],
'post_id' => $post_data['post_id'],
'time' => $post_data['post_time'],
'user_id' => $post_data['poster_id'],

				'author'  => $post_data['quote_username'],
'post_id' => $post_data['post_id'],
'time' => $post_data['post_time'],
'user_id' => $post_data['poster_id'],

			)

 
		);

		);

		$message_parser->message .= "\n\n";
}
else
{
$offset = 0;
$quote_string = "> ";
$message = censor_text(trim($message_parser->message));
// see if we are nesting. It's easily tricked but should work for one level of nesting
if (strpos($message, ">") !== false)
{
$offset = 10;
}
$message = utf8_wordwrap($message, 75 + $offset, "\n");

 




		$message = $quote_string . $message;
$message = str_replace("\n", "\n" . $quote_string, $message);
$message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
}

	phpbb_format_quote($config['allow_bbcode'], $quote_attributes, $bbcode_utils, $message_parser);




}

if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)

}

if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)

Line 1762Line 1738
}

$s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : '';

}

$s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : '';

$s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . $current_time . '" />';

 
$s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . $request->variable('draft_loaded', $draft_id) . '" />' : '';

if ($mode == 'edit')

$s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . $request->variable('draft_loaded', $draft_id) . '" />' : '';

if ($mode == 'edit')