summaryrefslogtreecommitdiff
path: root/app/Select2.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-08-09 11:50:48 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-08-09 15:11:52 +0100
commitce15a17af204fa17bb93b13c5560e56ac2e40c87 (patch)
tree3d8a3902c96109494c38c516f6250ee15461933f /app/Select2.php
parentbf43cb39fd09a9a0812ae9e52b69b20a98790ce5 (diff)
downloadwebtrees-ce15a17af204fa17bb93b13c5560e56ac2e40c87.tar.gz
webtrees-ce15a17af204fa17bb93b13c5560e56ac2e40c87.tar.bz2
webtrees-ce15a17af204fa17bb93b13c5560e56ac2e40c87.zip
CodeStyle
Diffstat (limited to 'app/Select2.php')
-rw-r--r--app/Select2.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/Select2.php b/app/Select2.php
index a7b39cf1c4..58ad235216 100644
--- a/app/Select2.php
+++ b/app/Select2.php
@@ -93,13 +93,15 @@ class Select2 extends Html
$more = false;
$results = [];
- $cursor = Database::prepare("SELECT DISTINCT 'FAM' AS type, f_id AS xref, f_gedcom AS gedcom, husb_name.n_sort, wife_name.n_sort" .
+ $cursor = Database::prepare(
+ "SELECT DISTINCT 'FAM' AS type, f_id AS xref, f_gedcom AS gedcom, husb_name.n_sort, wife_name.n_sort" .
" FROM `##families`" .
" JOIN `##name` AS husb_name ON f_husb = husb_name.n_id AND f_file = husb_name.n_file" .
" JOIN `##name` AS wife_name ON f_wife = wife_name.n_id AND f_file = wife_name.n_file" .
" WHERE (CONCAT(husb_name.n_full, ' ', wife_name.n_full) LIKE CONCAT('%', REPLACE(:query, ' ', '%'), '%') OR f_id = :xref) AND f_file = :tree_id" .
" AND husb_name.n_type <> '_MARNM' AND wife_name.n_type <> '_MARNM'" .
- " ORDER BY husb_name.n_sort, wife_name.n_sort COLLATE :collation")->execute([
+ " ORDER BY husb_name.n_sort, wife_name.n_sort COLLATE :collation"
+ )->execute([
'query' => $query,
'xref' => $query,
'tree_id' => $tree->getTreeId(),
@@ -663,7 +665,8 @@ class Select2 extends Html
"SELECT o_id AS xref, o_gedcom AS gedcom" .
" FROM `##other`" .
" WHERE (o_id LIKE CONCAT('%', REPLACE(:query, ' ', '%'), '%') OR o_id = :xref) AND o_file = :tree_id AND o_type = 'SUBM'" .
- " ORDER BY o_id COLLATE :collation")->execute([
+ " ORDER BY o_id COLLATE :collation"
+ )->execute([
'query' => $query,
'xref' => $query,
'tree_id' => $tree->getTreeId(),