phpBB

Code Changes

File: posting.php

  Unmodified   Added   Modified   Removed
Line 221Line 221
	}
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
}

	}
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
}

 

/**
* This event allows you to bypass reply/quote test of an unapproved post.
*
* @event core.posting_modify_row_data
* @var array post_data All post data from database
* @var string mode What action to take if the form has been submitted
* post|reply|quote|edit|delete|bump|smilies|popup
* @var int topic_id ID of the topic
* @var int forum_id ID of the forum
* @since 3.2.8-RC1
*/
$vars = array(
'post_data',
'mode',
'topic_id',
'forum_id',
);
extract($phpbb_dispatcher->trigger_event('core.posting_modify_row_data', compact($vars)));


// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key


// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key

Line 955Line 974
	}

// Parse Attachments - before checksum is calculated

	}

// Parse Attachments - before checksum is calculated

 
	if ($message_parser->check_attachment_form_token($language, $request, 'posting'))
{

	$message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);

	$message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);

 
	}


/**
* This event allows you to modify message text before parsing


/**
* This event allows you to modify message text before parsing

Line 1648Line 1670
						'time'    => $post_data['post_time'],
'user_id' => $post_data['poster_id'],
);

						'time'    => $post_data['post_time'],
'user_id' => $post_data['poster_id'],
);

 

/**
* This event allows you to modify the quote attributes of the post being quoted
*
* @event core.posting_modify_quote_attributes
* @var array quote_attributes Array with quote attributes
* @var array post_data Array with post data
* @since 3.2.6-RC1
*/
$vars = array(
'quote_attributes',
'post_data',
);
extract($phpbb_dispatcher->trigger_event('core.posting_modify_quote_attributes', compact($vars)));


/** @var \phpbb\language\language $language */
$language = $phpbb_container->get('language');


/** @var \phpbb\language\language $language */
$language = $phpbb_container->get('language');

Line 1657Line 1693
if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
{
$post_data['post_subject'] = ((strpos($post_data['post_subject'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($post_data['post_subject']);

if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh)
{
$post_data['post_subject'] = ((strpos($post_data['post_subject'], 'Re: ') !== 0) ? 'Re: ' : '') . censor_text($post_data['post_subject']);

 

$post_subject = $post_data['post_subject'];

/**
* This event allows you to modify the post subject of the post being quoted
*
* @event core.posting_modify_post_subject
* @var string post_subject String with the post subject already censored.
* @since 3.2.8-RC1
*/
$vars = array('post_subject');
extract($phpbb_dispatcher->trigger_event('core.posting_modify_post_subject', compact($vars)));

$post_data['post_subject'] = $post_subject;

}

$attachment_data = $message_parser->attachment_data;

}

$attachment_data = $message_parser->attachment_data;