summaryrefslogtreecommitdiff
path: root/autocomplete.php
diff options
context:
space:
mode:
authorŁukasz Wilenski <wooc@gazeta.pl>2012-03-26 16:42:08 +0000
committerŁukasz Wilenski <wooc@gazeta.pl>2012-03-26 16:42:08 +0000
commita5c82e56918ea0eac69b02e4e84c0fa2df5132b2 (patch)
tree9a9743e12960f2a0180bb7a13a2eae58445e0c2b /autocomplete.php
parentebae14220a9a496c9c7179bca74a3a636fc8da50 (diff)
downloadwebtrees-a5c82e56918ea0eac69b02e4e84c0fa2df5132b2.tar.gz
webtrees-a5c82e56918ea0eac69b02e4e84c0fa2df5132b2.tar.bz2
webtrees-a5c82e56918ea0eac69b02e4e84c0fa2df5132b2.zip
Bug #964047 - Autocomplete in ID box not working for certain name combinations
Diffstat (limited to 'autocomplete.php')
-rw-r--r--autocomplete.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/autocomplete.php b/autocomplete.php
index f1fe3b524d..ccc39a7f78 100644
--- a/autocomplete.php
+++ b/autocomplete.php
@@ -2,7 +2,7 @@
// Returns data for autocompletion
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2010 PGV Development Team. All rights reserved.
@@ -560,12 +560,12 @@ function get_autocomplete_INDI($FILTER, $ged_id=WT_GED_ID) {
WT_DB::prepare(
"SELECT 'INDI' AS type, i_id AS xref, i_file AS ged_id, i_gedcom AS gedrec".
" FROM `##individuals`, `##name`".
- " WHERE n_sort LIKE ?".
+ " WHERE (n_sort LIKE ? OR n_full LIKE ?)".
" AND i_id=n_id AND i_file=n_file AND i_file=?".
" ORDER BY n_sort".
" LIMIT ".WT_AUTOCOMPLETE_LIMIT
)
- ->execute(array("%{$FILTER}%", $ged_id))
+ ->execute(array("%{$FILTER}%", "%{$FILTER}%", $ged_id))
->fetchAll(PDO::FETCH_ASSOC);
} else {
return $rows;