diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-10-15 19:37:51 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-10-15 19:37:51 +0100 |
| commit | 9a3e3fac27ffd156b7665a0ac3745d247ca0c11d (patch) | |
| tree | 874b6cb1c26b0addd90bbf4363c0d82a2455c1bb /library | |
| parent | 86097718bfb483bca1e0b8c4e9de4a6426c0ce10 (diff) | |
| download | webtrees-9a3e3fac27ffd156b7665a0ac3745d247ca0c11d.tar.gz webtrees-9a3e3fac27ffd156b7665a0ac3745d247ca0c11d.tar.bz2 webtrees-9a3e3fac27ffd156b7665a0ac3745d247ca0c11d.zip | |
#1235895 - note.php adding source or restriction deletes header line
Diffstat (limited to 'library')
| -rwxr-xr-x | library/WT/GedcomRecord.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/WT/GedcomRecord.php b/library/WT/GedcomRecord.php index edf4922550..8e4479beb8 100755 --- a/library/WT/GedcomRecord.php +++ b/library/WT/GedcomRecord.php @@ -882,7 +882,8 @@ class WT_GedcomRecord { $old_gedcom = $this->gedcom; } - $new_gedcom = '0 @' . $this->getXref() . '@ ' . static::RECORD_TYPE; + // First line of record may contain data - e.g. NOTE records. + list($new_gedcom) = explode("\n", $old_gedcom, 2); $old_chan = $this->getFirstFact('CHAN'); // Replacing (or deleting) an existing fact foreach ($this->getFacts(null, false, WT_PRIV_HIDE) as $fact) { |
