From 7ffd65bc149e89684a3f778545a76e07d7dfe779 Mon Sep 17 00:00:00 2001 From: fisharebest Date: Mon, 14 Nov 2011 11:56:43 +0000 Subject: Fix: list of surnames on indi-list ignoring the "include married names" option. We need the where clause on both the inner and outer SQL statements --- library/WT/Query/Name.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'library') diff --git a/library/WT/Query/Name.php b/library/WT/Query/Name.php index fcc4b134d7..79cb46ed4e 100644 --- a/library/WT/Query/Name.php +++ b/library/WT/Query/Name.php @@ -361,6 +361,9 @@ class WT_Query_Name { $sql.=" AND n_surn NOT IN ('', '@N.N.')"; } $sql.=" GROUP BY n_surn COLLATE '".WT_I18N::$collation."', n_file) n2 ON (n1.n_surn=n2.n_surn COLLATE '".WT_I18N::$collation."' AND n1.n_file=n2.n_file)"; + if (!$marnm) { + $sql.=" AND n_type!='_MARNM'"; + } $list=array(); foreach (WT_DB::prepare($sql)->fetchAll() as $row) { -- cgit v1.3