summaryrefslogtreecommitdiff
path: root/modules_v3
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-07-21 19:15:14 +0000
committerfisharebest <fisharebest@gmail.com>2013-07-21 19:15:14 +0000
commit04059d01ba73a2f5ee54a5bd91f7c6ee2dbb995b (patch)
tree4f679aef2e86a2866c7a93a538081c0f385d3e03 /modules_v3
parent187dc92db4e26a14a8803761af7f487d04d23b0c (diff)
downloadwebtrees-04059d01ba73a2f5ee54a5bd91f7c6ee2dbb995b.tar.gz
webtrees-04059d01ba73a2f5ee54a5bd91f7c6ee2dbb995b.tar.bz2
webtrees-04059d01ba73a2f5ee54a5bd91f7c6ee2dbb995b.zip
PHP error in personal facts module
Diffstat (limited to 'modules_v3')
-rw-r--r--modules_v3/personal_facts/module.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/modules_v3/personal_facts/module.php b/modules_v3/personal_facts/module.php
index 9222b2d2f9..ca3dfb9bcf 100644
--- a/modules_v3/personal_facts/module.php
+++ b/modules_v3/personal_facts/module.php
@@ -414,21 +414,22 @@ class personal_facts_WT_Module extends WT_Module implements WT_Module_Tab {
private static function historical_facts(WT_Individual $person) {
global $SHOW_RELATIVES_EVENTS;
- if (!$SHOW_RELATIVES_EVENTS) return;
$facts = array();
- // Only include events between birth and death
- $birt_date = $person->getEstimatedBirthDate();
- $deat_date = $person->getEstimatedDeathDate();
-
- 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) {
- $fact = new WT_Fact($hist, $person, 'histo');
- $sdate = $fact->getDate();
- if ($sdate->isOK() && WT_Date::Compare($birt_date, $sdate)<=0 && WT_Date::Compare($sdate, $deat_date)<=0) {
- $facts[] = $fact;
+ if ($SHOW_RELATIVES_EVENTS) {
+ // Only include events between birth and death
+ $birt_date = $person->getEstimatedBirthDate();
+ $deat_date = $person->getEstimatedDeathDate();
+
+ 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) {
+ $fact = new WT_Fact($hist, $person, 'histo');
+ $sdate = $fact->getDate();
+ if ($sdate->isOK() && WT_Date::Compare($birt_date, $sdate)<=0 && WT_Date::Compare($sdate, $deat_date)<=0) {
+ $facts[] = $fact;
+ }
}
}
}