diff options
| author | fisharebest <fisharebest@gmail.com> | 2013-07-05 18:28:24 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2013-07-05 18:28:24 +0000 |
| commit | aff45b213fb9249d79f7f27cb73e88db1edd1a0c (patch) | |
| tree | 29571323a1ed3bd3fa4db783d2b1cd7b575ca76e | |
| parent | 15fcc8b022019a71f4f2f83104f623b31650f137 (diff) | |
| download | webtrees-aff45b213fb9249d79f7f27cb73e88db1edd1a0c.tar.gz webtrees-aff45b213fb9249d79f7f27cb73e88db1edd1a0c.tar.bz2 webtrees-aff45b213fb9249d79f7f27cb73e88db1edd1a0c.zip | |
More refactoring - SOUR:PUBL
| -rw-r--r-- | includes/functions/functions_print_facts.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php index 4787922a0e..9bc9d45447 100644 --- a/includes/functions/functions_print_facts.php +++ b/includes/functions/functions_print_facts.php @@ -715,10 +715,9 @@ function print_main_sources(WT_Fact $fact, $level) { if ($source) { echo '<a href="', $source->getHtmlUrl(), '">', $source->getFullName(), '</a>'; // PUBL - $text = get_gedcom_value('PUBL', '1', $source->getGedcom()); - if (!empty($text)) { - echo '<br><span class="label">', WT_Gedcom_Tag::getLabel('PUBL'), ': </span>'; - echo $text; + $publ = $source->getFactByType('PUBL'); + if ($publ) { + echo WT_Gedcom_Tag::getLabelValue('PUBL', $publ->getValue()); } // 2 RESN tags. Note, there can be more than one, such as "privacy" and "locked" if (preg_match_all("/\n2 RESN (.+)/", $factrec, $rmatches)) { |
