diff options
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
| -rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 16 | 
1 files changed, 14 insertions, 2 deletions
| diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 82c3bc9ab0..4b3e16d713 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -283,6 +283,7 @@ class mcp_queue  				$template->assign_vars(array(  					'S_MCP_QUEUE'			=> true,  					'U_APPROVE_ACTION'		=> append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f=$forum_id"), +					'S_CAN_DELETE_POST'		=> $auth->acl_get('m_delete', $post_info['forum_id']),  					'S_CAN_VIEWIP'			=> $auth->acl_get('m_info', $post_info['forum_id']),  					'S_POST_REPORTED'		=> $post_info['post_reported'],  					'S_POST_UNAPPROVED'		=> $post_info['post_visibility'] == ITEM_UNAPPROVED || $post_info['post_visibility'] == ITEM_REAPPROVE, @@ -404,7 +405,7 @@ class mcp_queue  				$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';  				foreach ($forum_list_approve as $row)  				{ -					$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('   ', $row['padding']) . $row['forum_name'] . '</option>'; +					$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('   ', $row['padding']) . truncate_string($row['forum_name'], 30, 255, false, $user->lang['ELLIPSIS']) . '</option>';  				}  				$sort_days = $total = 0; @@ -1130,6 +1131,11 @@ class mcp_queue  			// Build a list of posts to be disapproved and get the related topics real replies count  			foreach ($post_info as $post_id => $post_data)  			{ +				if ($mode === 'unapproved_topics' && $post_data['post_visibility'] == ITEM_APPROVED) +				{ +					continue; +				} +  				$post_disapprove_list[$post_id] = $post_data['topic_id'];  				if (!isset($topic_posts_unapproved[$post_data['topic_id']]))  				{ @@ -1139,6 +1145,12 @@ class mcp_queue  				$topic_posts_unapproved[$post_data['topic_id']]++;  			} +			// Do not try to disapprove if no posts are selected +			if (empty($post_disapprove_list)) +			{ +				trigger_error('NO_POST_SELECTED'); +			} +  			// Now we build the log array  			foreach ($post_disapprove_list as $post_id => $topic_id)  			{ @@ -1240,7 +1252,7 @@ class mcp_queue  						continue;  					} -					$post_data['disapprove_reason'] = ''; +					$post_data['disapprove_reason'] = $disapprove_reason;  					if (isset($disapprove_reason_lang))  					{  						// Okay we need to get the reason from the posters language | 
