From 46b75f4cf925ee0da852beeb6c4932e4fcb37992 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 15 Jan 2013 13:20:35 +0100 Subject: [PATCH] [ticket/10411] Add a comment why we left join the group table We left join the group table because we want to check that the group does exist there aswell. PHPBB3-10411 --- phpBB/includes/groupposition/teampage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpBB/includes/groupposition/teampage.php b/phpBB/includes/groupposition/teampage.php index a189d5def9..2c488dd8a9 100644 --- a/phpBB/includes/groupposition/teampage.php +++ b/phpBB/includes/groupposition/teampage.php @@ -88,6 +88,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_interface */ public function get_group_value($group_id) { + // The join is required to ensure that the group itself exists $sql = 'SELECT g.group_id, t.teampage_position FROM ' . GROUPS_TABLE . ' g LEFT JOIN ' . TEAMPAGE_TABLE . ' t @@ -114,6 +115,7 @@ class phpbb_groupposition_teampage implements phpbb_groupposition_interface */ public function get_group_values($group_id) { + // The join is required to ensure that the group itself exists $sql = 'SELECT * FROM ' . GROUPS_TABLE . ' g LEFT JOIN ' . TEAMPAGE_TABLE . ' t