Skip to content

Commit 450aa32

Browse files
committed
Add distinct function to remove duplicate results
1 parent 9ea28ea commit 450aa32

5 files changed

+5
-1
lines changed

Config/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<descriptive locale="en_US">
88
<title>Keyword</title>
99
</descriptive>
10-
<version>2.4.1</version>
10+
<version>2.4.2</version>
1111
<author>
1212
<name>Michaël Espeche</name>
1313
<email>mespeche@openstudio.fr</email>

Loop/KeywordCategory.php

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public function buildModelCriteria()
133133
'category_associated_keyword.category_id IN (' . $categoryIds . ')'
134134
);
135135
$search->withColumn('category_associated_keyword.position', 'category_position');
136+
$search->distinct();
136137

137138
$orders = $this->getAssociation_order();
138139

Loop/KeywordContent.php

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public function buildModelCriteria()
132132
'content_associated_keyword.content_id IN (' . $contentIds . ')'
133133
);
134134
$search->withColumn('content_associated_keyword.position', 'content_position');
135+
$search->distinct();
135136

136137
$orders = $this->getAssociation_order();
137138

Loop/KeywordFolder.php

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public function buildModelCriteria()
132132
'folder_associated_keyword.folder_id IN (' . $folderIds . ')'
133133
);
134134
$search->withColumn('folder_associated_keyword.position', 'folder_position');
135+
$search->distinct();
135136

136137
$orders = $this->getAssociation_order();
137138

Loop/KeywordProduct.php

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public function buildModelCriteria()
134134
'product_associated_keyword.product_id IN (' . $productIds . ')'
135135
);
136136
$search->withColumn('product_associated_keyword.position', 'product_position');
137+
$search->distinct();
137138

138139
$orders = $this->getAssociation_order();
139140

0 commit comments

Comments
 (0)