From 8d0ebef0d075981bd943e8256e2c81a3b1e92b4b Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sat, 17 Nov 2018 15:22:08 +0000 Subject: Prefer class-constants to global-constants --- resources/views/edit/new-individual.phtml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'resources/views/edit/new-individual.phtml') diff --git a/resources/views/edit/new-individual.phtml b/resources/views/edit/new-individual.phtml index c67d8451a3..4f5aea2a4b 100644 --- a/resources/views/edit/new-individual.phtml +++ b/resources/views/edit/new-individual.phtml @@ -3,6 +3,7 @@ + @@ -154,7 +155,7 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR } else { $adv_name_fields = []; } - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('ADVANCED_NAME_FACTS'), $match)) { + if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('ADVANCED_NAME_FACTS'), $match)) { foreach ($match[1] as $tag) { // Ignore advanced facts that duplicate standard facts if (!in_array($tag, ['TYPE', 'NPFX', 'GIVN', 'NICK', 'SPFX', 'SURN', 'NSFX'])) { @@ -242,9 +243,9 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR echo FunctionsEdit::addSimpleTag($tree, '0 SEX U'); } $bdm = 'BD'; - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { + if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { foreach ($matches[1] as $match) { - if (!in_array($match, explode('|', WT_EVENTS_DEAT))) { + if (!in_array($match, Gedcom::DEATH_EVENTS)) { FunctionsEdit::addSimpleTags($tree, $match); } } @@ -252,15 +253,15 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR //-- if adding a spouse add the option to add a marriage fact to the new family if ($nextaction === 'add_spouse_to_individual_action' || $nextaction === 'add_spouse_to_family_action') { $bdm .= 'M'; - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) { + if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) { foreach ($matches[1] as $match) { FunctionsEdit::addSimpleTags($tree, $match); } } } - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { + if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { foreach ($matches[1] as $match) { - if (in_array($match, explode('|', WT_EVENTS_DEAT))) { + if (in_array($match, Gedcom::DEATH_EVENTS)) { FunctionsEdit::addSimpleTags($tree, $match); } } -- cgit v1.3