diff --git a/composer.json b/composer.json index 4cf5edc..09e3cd7 100755 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { - "name": "jaedb/search", + "name": "plasticstudio/search", "type": "silverstripe-vendormodule", "description": "SilverStripe search engine", - "homepage": "http://jamesbarnsley.co.nz", + "homepage": "https://psdigital.co.nz", "keywords": ["silverstripe"], "license": "BSD-3-Clause", "authors": [ @@ -13,7 +13,7 @@ } ], "support": { - "issues": "http://github.com/jaedb/search/issues" + "issues": "http://github.com/plasticstudio/search/issues" }, "extra": { "expose": [ diff --git a/package.json b/package.json index a3647d9..231671f 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.1.0", "author": "James Barnsley", "description": "SilverStripe Search Engine", - "repository": "https://github.com/jaedb/search", + "repository": "https://github.com/plasticstudio/search", "licenses": { "type": "Apache License", "url": "http://www.apache.org/licenses/LICENSE-2.0.txt" diff --git a/src/SearchPageController.php b/src/SearchPageController.php index 71afb00..e1ac8b9 100755 --- a/src/SearchPageController.php +++ b/src/SearchPageController.php @@ -427,6 +427,7 @@ public function PerformSearch(){ $filter_join = $filter['JoinTables'][$type['Key']]; $joins.= "LEFT JOIN \"".$filter_join['Table']."\" ON \"".$type['Table']."\".\"ID\" = \"".$filter_join['Column']."\""; + $joins.= "LEFT JOIN \"".$filter_join['Table']."\" ON \"".$type['Table']."\".\"ID\" = \"".$filter_join['Table']."\".\"".$filter_join['Column']."\""; if (is_array($filter['Value'])){ $ids = ''; @@ -440,6 +441,9 @@ public function PerformSearch(){ $ids = $filter['Value']; } + if ($relations_sql !== ''){ + $relations_sql.= " AND "; + } $relations_sql.= "\"".$filter_join['Table']."\".\"".$filter['Table']."ID\" IN (". $ids .")"; }