From 6aadb6b92349e4d40f67b40b9cc7c0ea1e408a5f Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jun 2020 17:51:03 +0000 Subject: [PATCH] Changed structure --- src/Model/Item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 636a98ae4f..4228d1a5af 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -789,10 +789,10 @@ class Item if ((strpos($sql_commands, "`parent-item`.") !== false) || (strpos($sql_commands, "`parent-item-author`.") !== false)) { $joins .= " STRAIGHT_JOIN `item` AS `parent-item` ON `parent-item`.`id` = `item`.`parent`"; - } - if (strpos($sql_commands, "`parent-item-author`.") !== false) { - $joins .= " STRAIGHT_JOIN `contact` AS `parent-item-author` ON `parent-item-author`.`id` = `parent-item`.`author-id`"; + if (strpos($sql_commands, "`parent-item-author`.") !== false) { + $joins .= " STRAIGHT_JOIN `contact` AS `parent-item-author` ON `parent-item-author`.`id` = `parent-item`.`author-id`"; + } } return $joins;