diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 15 | 
2 files changed, 9 insertions, 10 deletions
| diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 547ea69e81..cc46799252 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))  function generate_smilies($mode, $forum_id)  {  	global $db, $user, $config, $template, $phpbb_dispatcher; -	global $phpEx, $phpbb_root_path, $phpbb_container; +	global $phpEx, $phpbb_root_path, $phpbb_container, $phpbb_path_helper;  	$base_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id);  	$pagination = $phpbb_container->get('pagination'); @@ -111,7 +111,7 @@ function generate_smilies($mode, $forum_id)  	if (sizeof($smilies))  	{ -		$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path; +		$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();  		foreach ($smilies as $row)  		{ diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 3219771c93..16b3ca8573 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -1226,6 +1226,8 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove  	// Check for disallowed recipients  	if (!empty($address_list['u']))  	{ +		$can_ignore_allow_pm = $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'); +  		// Administrator deactivated users check and we need to check their  		//		PM status (do they want to receive PM's?)  		// 		Only check PM status if not a moderator or admin, since they @@ -1233,14 +1235,11 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove  		$sql = 'SELECT user_id, user_allow_pm  			FROM ' . USERS_TABLE . '  			WHERE ' . $db->sql_in_set('user_id', array_keys($address_list['u'])) . ' -				AND (user_type = ' . USER_INACTIVE . ' -					AND user_inactive_reason = ' . INACTIVE_MANUAL . ')'; - -		$can_ignore_allow_pm = ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')); -		if (!$can_ignore_allow_pm) -		{ -			$sql .= ' OR user_allow_pm = 0'; -		} +				AND ( +						(user_type = ' . USER_INACTIVE . ' +						AND user_inactive_reason = ' . INACTIVE_MANUAL . ') +						' . ($can_ignore_allow_pm ? '' : ' OR user_allow_pm = 0') . ' +					)';  		$result = $db->sql_query($sql); | 
