summaryrefslogtreecommitdiff
path: root/includes/controllers
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-12-30 20:59:27 +0000
committerfisharebest <fisharebest@gmail.com>2010-12-30 20:59:27 +0000
commit0c51daab93511025f234efe77f3836173a8baa1d (patch)
tree6ee930f790646bf0ed2cac91e1c0bde8aa829094 /includes/controllers
parent5d96a9ba621c6e9063878962c4d3ec1412aee8f3 (diff)
downloadwebtrees-0c51daab93511025f234efe77f3836173a8baa1d.tar.gz
webtrees-0c51daab93511025f234efe77f3836173a8baa1d.tar.bz2
webtrees-0c51daab93511025f234efe77f3836173a8baa1d.zip
Fix: wrong parameters in links to family timeline charts
Diffstat (limited to 'includes/controllers')
-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]);
}
/**