summaryrefslogtreecommitdiff
path: root/includes/controllers/family_ctrl.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/controllers/family_ctrl.php')
-rw-r--r--includes/controllers/family_ctrl.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/includes/controllers/family_ctrl.php b/includes/controllers/family_ctrl.php
index 38755a8cbe..eadf00b58e 100644
--- a/includes/controllers/family_ctrl.php
+++ b/includes/controllers/family_ctrl.php
@@ -175,21 +175,13 @@ class FamilyController extends BaseController {
return null;
}
- function getChildren() {
- if (preg_match_all('/\n1 CHIL @('.WT_REGEX_XREF.')@/', $this->famrec, $match)) {
- return $match[1];
- } else {
- return array();
- }
- }
-
- function getChildrenUrlTimeline($start=0) {
- $children = $this->getChildren();
- $c = count($children);
- for ($i = 0; $i < $c; $i++) {
- $children[$i] = 'pids['.($i + $start).']='.$children[$i];
+ // $tags is an array of HUSB/WIFE/CHIL
+ function getTimelineIndis($tags) {
+ preg_match_all('/\n1 (?:'.implode('|', $tags).') @('.WT_REGEX_XREF.')@/', $this->family->getGedcomRecord(), $matches);
+ foreach ($matches[1] as &$match) {
+ $match='pids[]='.$match;
}
- return join('&amp;', $children);
+ return implode('&amp;', $matches[1]);
}
/**