From a5debb61bf3f8d41ce129e5662b6ca129f628d48 Mon Sep 17 00:00:00 2001 From: fisharebest Date: Mon, 27 Jun 2011 16:16:46 +0000 Subject: #797488 - CONT records Not Displaying for Sources --- includes/functions/functions_print_facts.php | 3 +++ library/WT/Event.php | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php index fc23caa5a1..1c169251cd 100644 --- a/includes/functions/functions_print_facts.php +++ b/includes/functions/functions_print_facts.php @@ -258,6 +258,9 @@ function print_fact(WT_Event $eventObj) { case 'WWW': echo '
', htmlspecialchars($eventObj->getDetail()), '
'; break; + case 'TEXT': // 0 SOUR / 1 TEXT + echo '
', nl2br(htmlspecialchars($eventObj->getDetail())), '
'; + break; default: // Display the value for all other facts/events switch ($eventObj->getDetail()) { diff --git a/library/WT/Event.php b/library/WT/Event.php index f1269e90fd..5aad497c73 100644 --- a/library/WT/Event.php +++ b/library/WT/Event.php @@ -21,7 +21,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// @version $Id$ +// $Id$ if (!defined('WT_WEBTREES')) { header('HTTP/1.0 403 Forbidden'); @@ -84,9 +84,13 @@ class WT_Event { // the line number (from the original, privacy-filtered) gedcom // record, to allow editing function __construct($subrecord, $parent, $lineNumber) { - if (preg_match('/^1 ('.WT_REGEX_TAG.') ?(.*)/', $subrecord, $match)) { + if (preg_match('/^1 ('.WT_REGEX_TAG.') ?(.*)((\n2 CONT .*)*)/', $subrecord, $match)) { $this->tag =$match[1]; $this->detail=$match[2]; + // Some detail records contain multiple lines + if ($match[3]) { + $this->detail.=str_replace("\n2 CONT ", "\n", $match[3]); + } } else { // We are not ready for this yet. // throw new Exception('Invalid GEDCOM data passed to WT_Event::_construct('.$subrecord.')'); -- cgit v1.3