From d62b03e0deb8f5adfb64b4a296355f9720e01912 Mon Sep 17 00:00:00 2001
From: Marc Alexander <admin@m-a-styles.de>
Date: Tue, 22 Sep 2015 09:50:17 +0200
Subject: [PATCH] [ticket/14186] Do correct string concatenation in
 phpbb_mcp_sorting()

PHPBB3-14186
---
 phpBB/includes/functions_mcp.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
index ed96dcf338..1e08864bdc 100644
--- a/phpBB/includes/functions_mcp.php
+++ b/phpBB/includes/functions_mcp.php
@@ -388,7 +388,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
 
 			if (!$auth->acl_get('m_approve', $forum_id))
 			{
-				$sql .= 'AND topic_visibility = ' . ITEM_APPROVED;
+				$sql .= ' AND topic_visibility = ' . ITEM_APPROVED;
 			}
 			break;
 
@@ -404,7 +404,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
 
 			if (!$auth->acl_get('m_approve', $forum_id))
 			{
-				$sql .= 'AND post_visibility = ' . ITEM_APPROVED;
+				$sql .= ' AND post_visibility = ' . ITEM_APPROVED;
 			}
 			break;