diff options
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 34 | 
1 files changed, 33 insertions, 1 deletions
| diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 75d77285a0..b2713fef07 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1129,6 +1129,32 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id  		$db->sql_freeresult($result);  	} +	/** +	* Event to modify the posts list for topic reviews +	* +	* @event core.topic_review_modify_post_list +	* @var	array	attachments			Array with the post attachments data +	* @var	int		cur_post_id			Post offset ID +	* @var	int		forum_id			The topic's forum ID +	* @var	string	mode				The topic review mode +	* @var	array	post_list			Array with the post IDs +	* @var	array	rowset				Array with the posts data +	* @var	bool	show_quote_button	Flag indicating if the quote button should be displayed +	* @var	int		topic_id			The topic ID that is being reviewed +	* @since 3.1.9-RC1 +	*/ +	$vars = array( +		'attachments', +		'cur_post_id', +		'forum_id', +		'mode', +		'post_list', +		'rowset', +		'show_quote_button', +		'topic_id', +	); +	extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_post_list', compact($vars))); +  	for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)  	{  		// A non-existing rowset only happens if there was no user present for the entered poster_id @@ -1610,6 +1636,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u  			break;  		}  	} +	else if (isset($data['post_visibility']) && $data['post_visibility'] !== false) +	{ +		$post_visibility = $data['post_visibility']; +	}  	// MODs/Extensions are able to force any visibility on posts  	if (isset($data['force_approved_state'])) @@ -2403,7 +2433,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u  	$params = $add_anchor = ''; -	if ($post_visibility == ITEM_APPROVED) +	if ($post_visibility == ITEM_APPROVED || +		($auth->acl_get('m_softdelete', $data['forum_id']) && $post_visibility == ITEM_DELETED) || +		($auth->acl_get('m_approve', $data['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))  	{  		$params .= '&t=' . $data['topic_id']; | 
