summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-06-27 16:16:46 +0000
committerfisharebest <fisharebest@gmail.com>2011-06-27 16:16:46 +0000
commita5debb61bf3f8d41ce129e5662b6ca129f628d48 (patch)
treecbd0fefc8f047ca5a7ebab3b0f9d89550bc9d0f2 /library
parentc1850a8425ea3554775822366568d030fe3c3731 (diff)
downloadwebtrees-a5debb61bf3f8d41ce129e5662b6ca129f628d48.tar.gz
webtrees-a5debb61bf3f8d41ce129e5662b6ca129f628d48.tar.bz2
webtrees-a5debb61bf3f8d41ce129e5662b6ca129f628d48.zip
#797488 - CONT records Not Displaying for Sources
Diffstat (limited to 'library')
-rw-r--r--library/WT/Event.php8
1 files changed, 6 insertions, 2 deletions
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.')');