diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2015-06-04 17:46:36 +0200 | 
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2015-06-04 17:46:36 +0200 | 
| commit | c28a213b1b80205c5e53df5764a408898eb75c7c (patch) | |
| tree | 9977826fdc1b96d69676adc85ff0fc961be64160 /phpBB/includes/mcp/mcp_post.php | |
| parent | f3f82bd3776047ba99d0ba828ce43ff743e65b02 (diff) | |
| parent | bb7f8433441343eaaf0c15aa9f27c4227256e3c7 (diff) | |
| download | forums-c28a213b1b80205c5e53df5764a408898eb75c7c.tar forums-c28a213b1b80205c5e53df5764a408898eb75c7c.tar.gz forums-c28a213b1b80205c5e53df5764a408898eb75c7c.tar.bz2 forums-c28a213b1b80205c5e53df5764a408898eb75c7c.tar.xz forums-c28a213b1b80205c5e53df5764a408898eb75c7c.zip | |
Merge branch '3.1.x'
Conflicts:
	phpBB/styles/subsilver2/template/mcp_post.html
Diffstat (limited to 'phpBB/includes/mcp/mcp_post.php')
| -rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 45 | 
1 files changed, 43 insertions, 2 deletions
| diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index b70dfbb514..838252fa22 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -26,6 +26,7 @@ function mcp_post_details($id, $mode, $action)  {  	global $phpEx, $phpbb_root_path, $config, $request;  	global $template, $db, $user, $auth, $cache; +	global $phpbb_dispatcher;  	$user->add_lang('posting'); @@ -106,6 +107,21 @@ function mcp_post_details($id, $mode, $action)  			}  		break; + +		default: + +			/** +			* This event allows you to handle custom post moderation options +			* +			* @event core.mcp_post_additional_options +			* @var	string	action		Post moderation action name +			* @var	array	post_info	Information on the affected post +			* @since 3.1.5-RC1 +			*/ +			$vars = array('action', 'post_info'); +			extract($phpbb_dispatcher->trigger_event('core.mcp_post_additional_options', compact($vars))); + +		break;  	}  	// Set some vars @@ -197,7 +213,7 @@ function mcp_post_details($id, $mode, $action)  		$l_deleted_by = '';  	} -	$template->assign_vars(array( +	$mcp_post_template_data = array(  		'U_MCP_ACTION'			=> "$url&i=main&quickmod=1&mode=post_details", // Use this for mode paramaters  		'U_POST_ACTION'			=> "$url&i=$id&mode=post_details", // Use this for action parameters  		'U_APPROVE_ACTION'		=> append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f={$post_info['forum_id']}"), @@ -249,7 +265,32 @@ function mcp_post_details($id, $mode, $action)  		'U_LOOKUP_IP'			=> ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '',  		'U_WHOIS'				=> ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '', -	)); +	); + +	$s_additional_opts = false; + +	/** +	* Event to add/modify MCP post template data +	* +	* @event core.mcp_post_template_data +	* @var	array	post_info					Array with the post information +	* @var	array	mcp_post_template_data		Array with the MCP post template data +	* @var	array	attachments					Array with the post attachments, if any +	* @var	bool	s_additional_opts			Must be set to true in extension if additional options are presented in MCP post panel +	* @since 3.1.5-RC1 +	*/ +	$vars = array( +		'post_info', +		'mcp_post_template_data', +		'attachments', +		's_additional_opts', +	); +	extract($phpbb_dispatcher->trigger_event('core.mcp_post_template_data', compact($vars))); + +	$template->assign_vars($mcp_post_template_data); +	$template->assign_var('S_MCP_POST_ADDITIONAL_OPTS', $s_additional_opts); + +	unset($mcp_post_template_data);  	// Get User Notes  	$log_data = array(); | 
