diff options
| author | fisharebest <fisharebest@gmail.com> | 2013-06-29 22:33:03 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2013-06-29 22:33:03 +0000 |
| commit | 660cbf5fdbf1c5ece6b6c3aadc752fc09a10fd47 (patch) | |
| tree | ca94e6fcde611712d23b38a8dc1fa74a66753b53 /modules_v3/individuals/module.php | |
| parent | e40bcb61e289f4fb6e5802407d3d44fa278da82b (diff) | |
| download | webtrees-660cbf5fdbf1c5ece6b6c3aadc752fc09a10fd47.tar.gz webtrees-660cbf5fdbf1c5ece6b6c3aadc752fc09a10fd47.tar.bz2 webtrees-660cbf5fdbf1c5ece6b6c3aadc752fc09a10fd47.zip | |
Diffstat (limited to 'modules_v3/individuals/module.php')
| -rw-r--r-- | modules_v3/individuals/module.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules_v3/individuals/module.php b/modules_v3/individuals/module.php index 599b354b17..20f9677054 100644 --- a/modules_v3/individuals/module.php +++ b/modules_v3/individuals/module.php @@ -186,9 +186,9 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar { $indis=WT_Query_Name::individuals($surname, $alpha, '', true, false, WT_GED_ID); $out = '<ul>'; foreach ($indis as $person) { - if ($person->canDisplayName()) { + if ($person->canShowName()) { $out .= '<li><a href="'.$person->getHtmlUrl().'">'.$person->getSexImage().' '.$person->getFullName().' '; - if ($person->canDisplayDetails()) { + if ($person->canShow()) { $bd = $person->getLifeSpan(); if (!empty($bd)) { $out .= ' ('.$bd.')'; @@ -207,22 +207,22 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar { } $rows= WT_DB::prepare( - "SELECT ? AS type, i_id AS xref, i_file AS ged_id, i_gedcom AS gedrec". + "SELECT i_id AS xref, i_file AS gedcom_id, i_gedcom AS gedcom". " FROM `##individuals`, `##name`". " WHERE (i_id LIKE ? OR n_sort LIKE ?)". " AND i_id=n_id AND i_file=n_file AND i_file=?". " ORDER BY n_sort COLLATE '".WT_I18N::$collation."'". " LIMIT 50" ) - ->execute(array('INDI', "%{$query}%", "%{$query}%", WT_GED_ID)) - ->fetchAll(PDO::FETCH_ASSOC); + ->execute(array("%{$query}%", "%{$query}%", WT_GED_ID)) + ->fetchAll(); $out = '<ul>'; foreach ($rows as $row) { - $person=WT_Person::getInstance($row); - if ($person->canDisplayName()) { + $person = WT_Individual::getInstance($row->xref, $row->gedcom_id, $row->gedcom); + if ($person->canShowName()) { $out .= '<li><a href="'.$person->getHtmlUrl().'">'.$person->getSexImage().' '.$person->getFullName().' '; - if ($person->canDisplayDetails()) { + if ($person->canShow()) { $bd = $person->getLifeSpan(); if (!empty($bd)) $out .= ' ('.$bd.')'; } |
