From a73b338481fcee86f23731dae7405e52cebdb832 Mon Sep 17 00:00:00 2001 From: Ɓukasz Wilenski Date: Fri, 24 Sep 2010 15:41:49 +0000 Subject: #646548 - two NOTEs run together --- includes/functions/functions_print.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index a255d9ab39..c9568e3fb1 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -1010,7 +1010,6 @@ function print_fact_notes($factrec, $level, $textOnly=false, $return=false) { $ged_id=get_id_from_gedcom($GEDCOM); $data = ""; - $printDone = false; $nlevel = $level+1; $ct = preg_match_all("/$level NOTE(.*)/", $factrec, $match, PREG_SET_ORDER); for($j=0; $j<$ct; $j++) { @@ -1024,18 +1023,18 @@ function print_fact_notes($factrec, $level, $textOnly=false, $return=false) { if ($nt==0) { //-- print embedded note records $closeSpan = print_note_record($match[$j][1], $nlevel, $nrec, $textOnly, true); - $data .= $closeSpan; + $data .= $closeSpan."
"; } else { $noterec = find_gedcom_record($nmatch[1], $ged_id); if (canDisplayRecord($ged_id, $noterec)) { //-- print linked note records $nt = preg_match("/0 @$nmatch[1]@ NOTE (.*)/", $noterec, $n1match); $closeSpan = print_note_record(($nt>0)?$n1match[1]:"", 1, $noterec, $textOnly, true); - $data .= $closeSpan; + $data .= $closeSpan."
"; if (!$textOnly) { if (strpos($noterec, "1 SOUR")!==false) { - $data .= "
"; $data .= print_fact_sources($noterec, 1, true); + $data .= "
"; } } } @@ -1056,9 +1055,7 @@ function print_fact_notes($factrec, $level, $textOnly=false, $return=false) { } } */ - $printDone = true; } - if ($printDone) $data .= "
"; if (!$return) echo $data; else return $data; } -- cgit v1.3