summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/WT/Stats.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/library/WT/Stats.php b/library/WT/Stats.php
index 1dfc193742..f6905214a9 100644
--- a/library/WT/Stats.php
+++ b/library/WT/Stats.php
@@ -860,18 +860,16 @@ class WT_Stats {
}
$placelist = array();
foreach ($rows as $row) {
- if (preg_match('/\n1 {$fact}(?:\n[2-9].*)*\n2 PLAC (.+)}/', $row->ged, $match)) {
+ if (preg_match('/\n1 ' . $fact . '(?:\n[2-9].*)*\n2 PLAC (.+)/', $row->ged, $match)) {
if ($country) {
$tmp=explode(WT_Place::GEDCOM_SEPARATOR, $match[1]);
$place = end($tmp);
- }
- else {
+ } else {
$place = $match[1];
}
if (!isset($placelist[$place])) {
$placelist[$place] = 1;
- }
- else {
+ } else {
$placelist[$place] ++;
}
}