diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-09-01 14:34:29 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-09-01 14:34:29 +0100 |
| commit | eb6ae52e140fda574bea4d095c2484b872215a18 (patch) | |
| tree | 445224fa43029956d2e7652c0fadb2517a108c61 /library | |
| parent | 5fbbd6b8c1f22f108fd2f5f9afe0e185412f94b9 (diff) | |
| download | webtrees-eb6ae52e140fda574bea4d095c2484b872215a18.tar.gz webtrees-eb6ae52e140fda574bea4d095c2484b872215a18.tar.bz2 webtrees-eb6ae52e140fda574bea4d095c2484b872215a18.zip | |
Functions should return HTML, not output it
Diffstat (limited to 'library')
| -rw-r--r-- | library/WT/Controller/Individual.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/library/WT/Controller/Individual.php b/library/WT/Controller/Individual.php index 8e261d9555..3fba229d08 100644 --- a/library/WT/Controller/Individual.php +++ b/library/WT/Controller/Individual.php @@ -195,13 +195,11 @@ class WT_Controller_Individual extends WT_Controller_GedcomRecord { } echo '</div>'; } - if (preg_match("/\d (NOTE)|(SOUR)/", $factrec)>0) { - // -- find sources for this name - echo '<div id="indi_note" class="clearfloat">'; - print_fact_sources($factrec, 2); - //-- find the notes for this name - print_fact_notes($factrec, 2); - echo '</div>'; + if (preg_match("/\n2 SOUR/", $factrec)) { + echo '<div id="indi_sour" class="clearfloat">', print_fact_sources($factrec, 2), '</div>'; + } + if (preg_match("/\n2 NOTE/", $factrec)) { + echo '<div id="indi_note" class="clearfloat">', print_fact_notes($factrec, 2), '</div>'; } echo '</div>'; } |
