diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-11-03 09:37:40 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-11-03 09:37:40 +0000 |
| commit | 8dbf893d1832baf8be0094bb3df5cfc4ad1176ac (patch) | |
| tree | f9b09f2ce170ea4c61bf94b26cc2ea331abd499f /includes | |
| parent | f078f27b517869266bd24d494ffc10c3abc9b686 (diff) | |
| download | webtrees-8dbf893d1832baf8be0094bb3df5cfc4ad1176ac.tar.gz webtrees-8dbf893d1832baf8be0094bb3df5cfc4ad1176ac.tar.bz2 webtrees-8dbf893d1832baf8be0094bb3df5cfc4ad1176ac.zip | |
#1245017 - Formatted text in 1.4.4 and 1.5
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/functions/functions_print.php | 12 | ||||
| -rw-r--r-- | includes/functions/functions_print_facts.php | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index 6a3132213a..2a8493af35 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -399,11 +399,15 @@ function print_note_record($text, $nlevel, $nrec, $textOnly=false) { // Check if shared note if (preg_match('/^0 @('.WT_REGEX_XREF.')@ NOTE/', $nrec, $match)) { $note = WT_Note::getInstance($match[1]); - // Check if using census assistant - if ($note && array_key_exists('GEDFact_assistant', WT_Module::getActiveModules())) { - $text = GEDFact_assistant_WT_Module::formatCensusNote($note); + if ($note) { + // If Census assistant installed, allow it to format the note + if (array_key_exists('GEDFact_assistant', WT_Module::getActiveModules())) { + $text = GEDFact_assistant_WT_Module::formatCensusNote($note); + } else { + $text = WT_Filter::expandUrls($note->getNote()); + } } else { - $text = WT_Filter::expandUrls($note->getNote()); + $text = '<span class="error">' . WT_Filter::escapeHtml($nid) . '</span>'; } } else { $note = null; diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php index 43a612b145..0fe537dbef 100644 --- a/includes/functions/functions_print_facts.php +++ b/includes/functions/functions_print_facts.php @@ -902,10 +902,10 @@ function print_main_notes(WT_Fact $fact, $level) { if (preg_match("/$level NOTE @(.*)@/", $match[$j][0], $nmatch)) { // Note objects $nid = $nmatch[1]; - $note=WT_Note::getInstance($nid); + $note = WT_Note::getInstance($nid); if ($note) { // If Census assistant installed, allow it to format the note - if ($fact->getTag()=='CENS' && array_key_exists('GEDFact_assistant', WT_Module::getActiveModules())) { + if (array_key_exists('GEDFact_assistant', WT_Module::getActiveModules())) { $text = GEDFact_assistant_WT_Module::formatCensusNote($note); } else { $text = WT_Filter::expandUrls($note->getNote()); |
