diff options
Diffstat (limited to 'phpBB/includes/mcp')
| -rw-r--r-- | phpBB/includes/mcp/mcp_ban.php | 5 | ||||
| -rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 8 | ||||
| -rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 5 | ||||
| -rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 16 | 
4 files changed, 30 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php index 4d2151fded..2f3405f915 100644 --- a/phpBB/includes/mcp/mcp_ban.php +++ b/phpBB/includes/mcp/mcp_ban.php @@ -28,7 +28,10 @@ class mcp_ban  		global $db, $user, $auth, $template, $request, $phpbb_dispatcher;  		global $phpbb_root_path, $phpEx; -		include($phpbb_root_path . 'includes/functions_user.' . $phpEx); +		if (!function_exists('user_ban')) +		{ +			include($phpbb_root_path . 'includes/functions_user.' . $phpEx); +		}  		// Include the admin banning interface...  		include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx); diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 491697d2e9..69c66639df 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -630,10 +630,13 @@ function mcp_move_topic($topic_ids)  				*  				* @event core.mcp_main_modify_shadow_sql  				* @var	array	shadow	SQL array to be used by $db->sql_build_array +				* @var	array	row		Topic data  				* @since 3.1.11-RC1 +				* @changed 3.1.11-RC1 Added variable: row  				*/  				$vars = array(  					'shadow', +					'row',  				);  				extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_shadow_sql', compact($vars))); @@ -1297,11 +1300,14 @@ function mcp_fork_topic($topic_ids)  			* Perform actions before forked topic is created.  			*  			* @event core.mcp_main_modify_fork_sql -			* @var	array	sql_ary	SQL array to be used by $db->sql_build_array +			* @var	array	sql_ary		SQL array to be used by $db->sql_build_array +			* @var	array	topic_row	Topic data  			* @since 3.1.11-RC1 +			* @changed 3.1.11-RC1 Added variable: topic_row  			*/  			$vars = array(  				'sql_ary', +				'topic_row',  			);  			extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_sql', compact($vars))); diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index b5f2bf4f02..1cf4a74234 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -53,7 +53,10 @@ function mcp_post_details($id, $mode, $action)  			if ($auth->acl_get('m_info', $post_info['forum_id']))  			{  				$ip = request_var('ip', ''); -				include($phpbb_root_path . 'includes/functions_user.' . $phpEx); +				if (!function_exists('user_ipwhois')) +				{ +					include($phpbb_root_path . 'includes/functions_user.' . $phpEx); +				}  				$template->assign_vars(array(  					'RETURN_POST'	=> sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id") . '">', '</a>'), diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 7dbe7787cb..d5415302c8 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -676,7 +676,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)  */  function merge_posts($topic_id, $to_topic_id)  { -	global $db, $template, $user, $phpEx, $phpbb_root_path, $auth; +	global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_dispatcher;  	if (!$to_topic_id)  	{ @@ -777,6 +777,20 @@ function merge_posts($topic_id, $to_topic_id)  		$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");  		$redirect = reapply_sid($redirect); +		/** +		 * Perform additional actions after merging posts. +		 * +		 * @event core.mcp_topics_merge_posts_after +		 * @var	int		topic_id		The topic ID from which posts are being moved +		 * @var	int		to_topic_id		The topic ID to which posts are being moved +		 * @since 3.1.11-RC1 +		 */ +		$vars = array( +			'topic_id', +			'to_topic_id', +		); +		extract($phpbb_dispatcher->trigger_event('core.mcp_topics_merge_posts_after', compact($vars))); +  		meta_refresh(3, $redirect);  		trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);  	}  | 
