diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-11-17 15:22:08 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-11-18 18:18:42 +0000 |
| commit | 8d0ebef0d075981bd943e8256e2c81a3b1e92b4b (patch) | |
| tree | 6ce584137d2125125417a6c749d5d5e9a11611f1 /resources/views/edit/new-individual.phtml | |
| parent | ada1c84947c5c97bcc08a94582e9443f18df3d13 (diff) | |
| download | webtrees-8d0ebef0d075981bd943e8256e2c81a3b1e92b4b.tar.gz webtrees-8d0ebef0d075981bd943e8256e2c81a3b1e92b4b.tar.bz2 webtrees-8d0ebef0d075981bd943e8256e2c81a3b1e92b4b.zip | |
Prefer class-constants to global-constants
Diffstat (limited to 'resources/views/edit/new-individual.phtml')
| -rw-r--r-- | resources/views/edit/new-individual.phtml | 13 |
1 files changed, 7 insertions, 6 deletions
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 @@ <?php use Fisharebest\Webtrees\Fact; ?> <?php use Fisharebest\Webtrees\FontAwesome; ?> <?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?> +<?php use Fisharebest\Webtrees\Gedcom; ?> <?php use Fisharebest\Webtrees\GedcomTag; ?> <?php use Fisharebest\Webtrees\I18N; ?> <?php use Fisharebest\Webtrees\SurnameTradition; ?> @@ -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); } } |
