From 4a94ba3b393b2b30dde98f991e5b38729bf6af0b Mon Sep 17 00:00:00 2001 From: fisharebest Date: Fri, 5 Jul 2013 17:53:21 +0000 Subject: More refactoring - historical facts --- modules_v3/personal_facts/module.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules_v3/personal_facts/module.php b/modules_v3/personal_facts/module.php index 5678fefba7..abf0b6e638 100644 --- a/modules_v3/personal_facts/module.php +++ b/modules_v3/personal_facts/module.php @@ -443,9 +443,10 @@ class personal_facts_WT_Module extends WT_Module implements WT_Module_Tab { if (file_exists(WT_Site::preference('INDEX_DIRECTORY') . 'histo.' . WT_LOCALE . '.php')) { require WT_Site::preference('INDEX_DIRECTORY') . 'histo.' . WT_LOCALE . '.php'; foreach ($histo as $hist) { - $sdate = new WT_Date(get_gedcom_value('DATE', 2, $hist)); + $fact = new WT_Fact($hist, null, 'histo'); + $sdate = $fact->getDate(); if ($sdate->isOK() && WT_Date::Compare($birt_date, $sdate)<=0 && WT_Date::Compare($sdate, $deat_date)<=0) { - $facts[] = new WT_Fact($hist, null, 'histo'); + $facts[] = $fact; } } } -- cgit v1.3