summaryrefslogtreecommitdiff
path: root/app/Select2.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2017-12-06 22:23:56 +0000
committerGreg Roach <fisharebest@gmail.com>2017-12-06 22:23:56 +0000
commitbc8ec8ca804858c248a2f7c8c15d9be4a7a8b7a9 (patch)
tree1e726bf72652b1b7e63267b1b69a372c8f1eab8b /app/Select2.php
parent061089e1a82fdbc4b85779d3b1a2ab5094b11b7f (diff)
downloadwebtrees-bc8ec8ca804858c248a2f7c8c15d9be4a7a8b7a9.tar.gz
webtrees-bc8ec8ca804858c248a2f7c8c15d9be4a7a8b7a9.tar.bz2
webtrees-bc8ec8ca804858c248a2f7c8c15d9be4a7a8b7a9.zip
Fix: #1406 - autocomplete for SUBM records
Diffstat (limited to 'app/Select2.php')
-rw-r--r--app/Select2.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Select2.php b/app/Select2.php
index a39a63036f..e6a43d3504 100644
--- a/app/Select2.php
+++ b/app/Select2.php
@@ -606,7 +606,11 @@ class Select2 extends Html {
$offset = $page * self::RESULTS_PER_PAGE;
$more = false;
$results = [];
- $cursor = Database::prepare("SELECT o_id AS xref, o_gedcom AS gedcom, n_full" . " FROM `##other`" . " JOIN `##name` ON o_id = n_id AND o_file = n_file" . " WHERE (n_full LIKE CONCAT('%', REPLACE(:query, ' ', '%'), '%') OR o_id = :xref) AND o_file = :tree_id AND o_type = 'SUBM'" . " ORDER BY n_full COLLATE :collation")->execute([
+ $cursor = Database::prepare(
+ "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([
'query' => $query,
'xref' => $query,
'tree_id' => $tree->getTreeId(),