@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -25,7 +25,6 @@ |
||
| 25 | 25 | use Fisharebest\Webtrees\Census\CensusOfUnitedStates; |
| 26 | 26 | use Fisharebest\Webtrees\Census\CensusOfWales; |
| 27 | 27 | use Fisharebest\Webtrees\Config; |
| 28 | -use Fisharebest\Webtrees\Database; |
|
| 29 | 28 | use Fisharebest\Webtrees\Date; |
| 30 | 29 | use Fisharebest\Webtrees\Fact; |
| 31 | 30 | use Fisharebest\Webtrees\Family; |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -60,34 +60,34 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | // Some facts don't get printed here ... |
| 62 | 62 | switch ($fact->getTag()) { |
| 63 | - case 'NOTE': |
|
| 64 | - self::printMainNotes($fact, 1); |
|
| 63 | + case 'NOTE': |
|
| 64 | + self::printMainNotes($fact, 1); |
|
| 65 | 65 | |
| 66 | - return; |
|
| 67 | - case 'SOUR': |
|
| 68 | - self::printMainSources($fact, 1); |
|
| 66 | + return; |
|
| 67 | + case 'SOUR': |
|
| 68 | + self::printMainSources($fact, 1); |
|
| 69 | 69 | |
| 70 | - return; |
|
| 71 | - case 'OBJE': |
|
| 72 | - self::printMainMedia($fact, 1); |
|
| 70 | + return; |
|
| 71 | + case 'OBJE': |
|
| 72 | + self::printMainMedia($fact, 1); |
|
| 73 | 73 | |
| 74 | + return; |
|
| 75 | + case 'FAMC': |
|
| 76 | + case 'FAMS': |
|
| 77 | + case 'CHIL': |
|
| 78 | + case 'HUSB': |
|
| 79 | + case 'WIFE': |
|
| 80 | + // These are internal links, not facts |
|
| 81 | + return; |
|
| 82 | + case '_WT_OBJE_SORT': |
|
| 83 | + // These links are used internally to record the sort order. |
|
| 84 | + return; |
|
| 85 | + default: |
|
| 86 | + // Hide unrecognized/custom tags? |
|
| 87 | + if ($fact->getParent()->getTree()->getPreference('HIDE_GEDCOM_ERRORS') && !GedcomTag::isTag($fact->getTag())) { |
|
| 74 | 88 | return; |
| 75 | - case 'FAMC': |
|
| 76 | - case 'FAMS': |
|
| 77 | - case 'CHIL': |
|
| 78 | - case 'HUSB': |
|
| 79 | - case 'WIFE': |
|
| 80 | - // These are internal links, not facts |
|
| 81 | - return; |
|
| 82 | - case '_WT_OBJE_SORT': |
|
| 83 | - // These links are used internally to record the sort order. |
|
| 84 | - return; |
|
| 85 | - default: |
|
| 86 | - // Hide unrecognized/custom tags? |
|
| 87 | - if ($fact->getParent()->getTree()->getPreference('HIDE_GEDCOM_ERRORS') && !GedcomTag::isTag($fact->getTag())) { |
|
| 88 | - return; |
|
| 89 | - } |
|
| 90 | - break; |
|
| 89 | + } |
|
| 90 | + break; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | // Who is this fact about? Need it to translate fact label correctly |
@@ -131,35 +131,35 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | switch ($fact->getTag()) { |
| 134 | - case 'EVEN': |
|
| 135 | - case 'FACT': |
|
| 136 | - if (GedcomTag::isTag($type)) { |
|
| 137 | - // Some users (just Meliza?) use "1 EVEN/2 TYPE BIRT". Translate the TYPE. |
|
| 138 | - $label = GedcomTag::getLabel($type, $label_person); |
|
| 139 | - $type = ''; // Do not print this again |
|
| 140 | - } elseif ($type) { |
|
| 141 | - // We don't have a translation for $type - but a custom translation might exist. |
|
| 142 | - $label = I18N::translate(Filter::escapeHtml($type)); |
|
| 143 | - $type = ''; // Do not print this again |
|
| 144 | - } else { |
|
| 145 | - // An unspecified fact/event |
|
| 146 | - $label = $fact->getLabel(); |
|
| 147 | - } |
|
| 148 | - break; |
|
| 149 | - case 'MARR': |
|
| 150 | - // This is a hack for a proprietory extension. Is it still used/needed? |
|
| 151 | - $utype = strtoupper($type); |
|
| 152 | - if ($utype == 'CIVIL' || $utype == 'PARTNERS' || $utype == 'RELIGIOUS') { |
|
| 153 | - $label = GedcomTag::getLabel('MARR_' . $utype, $label_person); |
|
| 154 | - $type = ''; // Do not print this again |
|
| 155 | - } else { |
|
| 156 | - $label = $fact->getLabel(); |
|
| 157 | - } |
|
| 158 | - break; |
|
| 159 | - default: |
|
| 160 | - // Normal fact/event |
|
| 134 | + case 'EVEN': |
|
| 135 | + case 'FACT': |
|
| 136 | + if (GedcomTag::isTag($type)) { |
|
| 137 | + // Some users (just Meliza?) use "1 EVEN/2 TYPE BIRT". Translate the TYPE. |
|
| 138 | + $label = GedcomTag::getLabel($type, $label_person); |
|
| 139 | + $type = ''; // Do not print this again |
|
| 140 | + } elseif ($type) { |
|
| 141 | + // We don't have a translation for $type - but a custom translation might exist. |
|
| 142 | + $label = I18N::translate(Filter::escapeHtml($type)); |
|
| 143 | + $type = ''; // Do not print this again |
|
| 144 | + } else { |
|
| 145 | + // An unspecified fact/event |
|
| 161 | 146 | $label = $fact->getLabel(); |
| 162 | - break; |
|
| 147 | + } |
|
| 148 | + break; |
|
| 149 | + case 'MARR': |
|
| 150 | + // This is a hack for a proprietory extension. Is it still used/needed? |
|
| 151 | + $utype = strtoupper($type); |
|
| 152 | + if ($utype == 'CIVIL' || $utype == 'PARTNERS' || $utype == 'RELIGIOUS') { |
|
| 153 | + $label = GedcomTag::getLabel('MARR_' . $utype, $label_person); |
|
| 154 | + $type = ''; // Do not print this again |
|
| 155 | + } else { |
|
| 156 | + $label = $fact->getLabel(); |
|
| 157 | + } |
|
| 158 | + break; |
|
| 159 | + default: |
|
| 160 | + // Normal fact/event |
|
| 161 | + $label = $fact->getLabel(); |
|
| 162 | + break; |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | echo '<tr class="', $styleadd, '">'; |
@@ -208,15 +208,15 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | switch ($fact->getTag()) { |
| 211 | - case '_BIRT_CHIL': |
|
| 212 | - echo '<br>', /* I18N: Abbreviation for "number %s" */ |
|
| 213 | - I18N::translate('#%s', ++$n_chil); |
|
| 214 | - break; |
|
| 215 | - case '_BIRT_GCHI': |
|
| 216 | - case '_BIRT_GCH1': |
|
| 217 | - case '_BIRT_GCH2': |
|
| 218 | - echo '<br>', I18N::translate('#%s', ++$n_gchi); |
|
| 219 | - break; |
|
| 211 | + case '_BIRT_CHIL': |
|
| 212 | + echo '<br>', /* I18N: Abbreviation for "number %s" */ |
|
| 213 | + I18N::translate('#%s', ++$n_chil); |
|
| 214 | + break; |
|
| 215 | + case '_BIRT_GCHI': |
|
| 216 | + case '_BIRT_GCH1': |
|
| 217 | + case '_BIRT_GCH2': |
|
| 218 | + echo '<br>', I18N::translate('#%s', ++$n_gchi); |
|
| 219 | + break; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | echo '</td><td class="optionbox ', $styleadd, ' wrap">'; |
@@ -237,92 +237,92 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | // Print the value of this fact/event |
| 239 | 239 | switch ($fact->getTag()) { |
| 240 | - case 'ADDR': |
|
| 241 | - echo $fact->getValue(); |
|
| 242 | - break; |
|
| 243 | - case 'AFN': |
|
| 244 | - echo '<div class="field"><a href="https://familysearch.org/search/tree/results#count=20&query=afn:', Filter::escapeUrl($fact->getValue()), '">', Filter::escapeHtml($fact->getValue()), '</a></div>'; |
|
| 245 | - break; |
|
| 246 | - case 'ASSO': |
|
| 247 | - // we handle this later, in format_asso_rela_record() |
|
| 248 | - break; |
|
| 249 | - case 'EMAIL': |
|
| 250 | - case 'EMAI': |
|
| 251 | - case '_EMAIL': |
|
| 252 | - echo '<div class="field"><a href="mailto:', Filter::escapeHtml($fact->getValue()), '">', Filter::escapeHtml($fact->getValue()), '</a></div>'; |
|
| 253 | - break; |
|
| 254 | - case 'FILE': |
|
| 255 | - if (Auth::isEditor($fact->getParent()->getTree())) { |
|
| 256 | - echo '<div class="field">', Filter::escapeHtml($fact->getValue()), '</div>'; |
|
| 257 | - } |
|
| 258 | - break; |
|
| 259 | - case 'RESN': |
|
| 260 | - echo '<div class="field">'; |
|
| 261 | - switch ($fact->getValue()) { |
|
| 262 | - case 'none': |
|
| 263 | - // Note: "1 RESN none" is not valid gedcom. |
|
| 264 | - // However, webtrees privacy rules will interpret it as "show an otherwise private record to public". |
|
| 265 | - echo '<i class="icon-resn-none"></i> ', I18N::translate('Show to visitors'); |
|
| 266 | - break; |
|
| 267 | - case 'privacy': |
|
| 268 | - echo '<i class="icon-class-none"></i> ', I18N::translate('Show to members'); |
|
| 269 | - break; |
|
| 270 | - case 'confidential': |
|
| 271 | - echo '<i class="icon-confidential-none"></i> ', I18N::translate('Show to managers'); |
|
| 272 | - break; |
|
| 273 | - case 'locked': |
|
| 274 | - echo '<i class="icon-locked-none"></i> ', I18N::translate('Only managers can edit'); |
|
| 275 | - break; |
|
| 276 | - default: |
|
| 277 | - echo Filter::escapeHtml($fact->getValue()); |
|
| 278 | - break; |
|
| 279 | - } |
|
| 240 | + case 'ADDR': |
|
| 241 | + echo $fact->getValue(); |
|
| 242 | + break; |
|
| 243 | + case 'AFN': |
|
| 244 | + echo '<div class="field"><a href="https://familysearch.org/search/tree/results#count=20&query=afn:', Filter::escapeUrl($fact->getValue()), '">', Filter::escapeHtml($fact->getValue()), '</a></div>'; |
|
| 245 | + break; |
|
| 246 | + case 'ASSO': |
|
| 247 | + // we handle this later, in format_asso_rela_record() |
|
| 248 | + break; |
|
| 249 | + case 'EMAIL': |
|
| 250 | + case 'EMAI': |
|
| 251 | + case '_EMAIL': |
|
| 252 | + echo '<div class="field"><a href="mailto:', Filter::escapeHtml($fact->getValue()), '">', Filter::escapeHtml($fact->getValue()), '</a></div>'; |
|
| 253 | + break; |
|
| 254 | + case 'FILE': |
|
| 255 | + if (Auth::isEditor($fact->getParent()->getTree())) { |
|
| 256 | + echo '<div class="field">', Filter::escapeHtml($fact->getValue()), '</div>'; |
|
| 257 | + } |
|
| 258 | + break; |
|
| 259 | + case 'RESN': |
|
| 260 | + echo '<div class="field">'; |
|
| 261 | + switch ($fact->getValue()) { |
|
| 262 | + case 'none': |
|
| 263 | + // Note: "1 RESN none" is not valid gedcom. |
|
| 264 | + // However, webtrees privacy rules will interpret it as "show an otherwise private record to public". |
|
| 265 | + echo '<i class="icon-resn-none"></i> ', I18N::translate('Show to visitors'); |
|
| 266 | + break; |
|
| 267 | + case 'privacy': |
|
| 268 | + echo '<i class="icon-class-none"></i> ', I18N::translate('Show to members'); |
|
| 269 | + break; |
|
| 270 | + case 'confidential': |
|
| 271 | + echo '<i class="icon-confidential-none"></i> ', I18N::translate('Show to managers'); |
|
| 272 | + break; |
|
| 273 | + case 'locked': |
|
| 274 | + echo '<i class="icon-locked-none"></i> ', I18N::translate('Only managers can edit'); |
|
| 275 | + break; |
|
| 276 | + default: |
|
| 277 | + echo Filter::escapeHtml($fact->getValue()); |
|
| 278 | + break; |
|
| 279 | + } |
|
| 280 | 280 | echo '</div>'; |
| 281 | 281 | break; |
| 282 | - case 'PUBL': // Publication details might contain URLs. |
|
| 283 | - echo '<div class="field">', Filter::expandUrls($fact->getValue()), '</div>'; |
|
| 284 | - break; |
|
| 285 | - case 'REPO': |
|
| 286 | - if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $fact->getValue(), $match)) { |
|
| 287 | - self::printRepositoryRecord($match[1]); |
|
| 288 | - } else { |
|
| 289 | - echo '<div class="error">', Filter::escapeHtml($fact->getValue()), '</div>'; |
|
| 290 | - } |
|
| 291 | - break; |
|
| 292 | - case 'URL': |
|
| 293 | - case '_URL': |
|
| 294 | - case 'WWW': |
|
| 295 | - echo '<div class="field"><a href="', Filter::escapeHtml($fact->getValue()), '">', Filter::escapeHtml($fact->getValue()), '</a></div>'; |
|
| 296 | - break; |
|
| 297 | - case 'TEXT': // 0 SOUR / 1 TEXT |
|
| 298 | - echo '<div class="field">', nl2br(Filter::escapeHtml($fact->getValue()), false), '</div>'; |
|
| 299 | - break; |
|
| 282 | + case 'PUBL': // Publication details might contain URLs. |
|
| 283 | + echo '<div class="field">', Filter::expandUrls($fact->getValue()), '</div>'; |
|
| 284 | + break; |
|
| 285 | + case 'REPO': |
|
| 286 | + if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $fact->getValue(), $match)) { |
|
| 287 | + self::printRepositoryRecord($match[1]); |
|
| 288 | + } else { |
|
| 289 | + echo '<div class="error">', Filter::escapeHtml($fact->getValue()), '</div>'; |
|
| 290 | + } |
|
| 291 | + break; |
|
| 292 | + case 'URL': |
|
| 293 | + case '_URL': |
|
| 294 | + case 'WWW': |
|
| 295 | + echo '<div class="field"><a href="', Filter::escapeHtml($fact->getValue()), '">', Filter::escapeHtml($fact->getValue()), '</a></div>'; |
|
| 296 | + break; |
|
| 297 | + case 'TEXT': // 0 SOUR / 1 TEXT |
|
| 298 | + echo '<div class="field">', nl2br(Filter::escapeHtml($fact->getValue()), false), '</div>'; |
|
| 299 | + break; |
|
| 300 | + default: |
|
| 301 | + // Display the value for all other facts/events |
|
| 302 | + switch ($fact->getValue()) { |
|
| 303 | + case '': |
|
| 304 | + // Nothing to display |
|
| 305 | + break; |
|
| 306 | + case 'N': |
|
| 307 | + // Not valid GEDCOM |
|
| 308 | + echo '<div class="field">', I18N::translate('No'), '</div>'; |
|
| 309 | + break; |
|
| 310 | + case 'Y': |
|
| 311 | + // Do not display "Yes". |
|
| 312 | + break; |
|
| 300 | 313 | default: |
| 301 | - // Display the value for all other facts/events |
|
| 302 | - switch ($fact->getValue()) { |
|
| 303 | - case '': |
|
| 304 | - // Nothing to display |
|
| 305 | - break; |
|
| 306 | - case 'N': |
|
| 307 | - // Not valid GEDCOM |
|
| 308 | - echo '<div class="field">', I18N::translate('No'), '</div>'; |
|
| 309 | - break; |
|
| 310 | - case 'Y': |
|
| 311 | - // Do not display "Yes". |
|
| 312 | - break; |
|
| 313 | - default: |
|
| 314 | - if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $fact->getValue(), $match)) { |
|
| 315 | - $target = GedcomRecord::getInstance($match[1], $fact->getParent()->getTree()); |
|
| 316 | - if ($target) { |
|
| 317 | - echo '<div><a href="', $target->getHtmlUrl(), '">', $target->getFullName(), '</a></div>'; |
|
| 318 | - } else { |
|
| 319 | - echo '<div class="error">', Filter::escapeHtml($fact->getValue()), '</div>'; |
|
| 320 | - } |
|
| 321 | - } else { |
|
| 322 | - echo '<div class="field"><span dir="auto">', Filter::escapeHtml($fact->getValue()), '</span></div>'; |
|
| 323 | - } |
|
| 324 | - break; |
|
| 325 | - } |
|
| 314 | + if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $fact->getValue(), $match)) { |
|
| 315 | + $target = GedcomRecord::getInstance($match[1], $fact->getParent()->getTree()); |
|
| 316 | + if ($target) { |
|
| 317 | + echo '<div><a href="', $target->getHtmlUrl(), '">', $target->getFullName(), '</a></div>'; |
|
| 318 | + } else { |
|
| 319 | + echo '<div class="error">', Filter::escapeHtml($fact->getValue()), '</div>'; |
|
| 320 | + } |
|
| 321 | + } else { |
|
| 322 | + echo '<div class="field"><span dir="auto">', Filter::escapeHtml($fact->getValue()), '</span></div>'; |
|
| 323 | + } |
|
| 324 | + break; |
|
| 325 | + } |
|
| 326 | 326 | break; |
| 327 | 327 | } |
| 328 | 328 | |
@@ -362,123 +362,123 @@ discard block |
||
| 362 | 362 | preg_match_all('/\n2 (' . WT_REGEX_TAG . ') (.+)/', $fact->getGedcom(), $matches, PREG_SET_ORDER); |
| 363 | 363 | foreach ($matches as $match) { |
| 364 | 364 | switch ($match[1]) { |
| 365 | - case 'DATE': |
|
| 366 | - case 'TIME': |
|
| 367 | - case 'AGE': |
|
| 368 | - case 'PLAC': |
|
| 369 | - case 'ADDR': |
|
| 370 | - case 'ALIA': |
|
| 371 | - case 'ASSO': |
|
| 372 | - case '_ASSO': |
|
| 373 | - case 'DESC': |
|
| 374 | - case 'RELA': |
|
| 375 | - case 'STAT': |
|
| 376 | - case 'TEMP': |
|
| 377 | - case 'TYPE': |
|
| 378 | - case 'FAMS': |
|
| 379 | - case 'CONT': |
|
| 380 | - // These were already shown at the beginning |
|
| 381 | - break; |
|
| 382 | - case 'NOTE': |
|
| 383 | - case 'OBJE': |
|
| 384 | - case 'SOUR': |
|
| 385 | - // These will be shown at the end |
|
| 386 | - break; |
|
| 387 | - case '_UID': |
|
| 388 | - case 'RIN': |
|
| 389 | - // These don't belong at level 2, so do not display them. |
|
| 390 | - // They are only shown when editing. |
|
| 391 | - break; |
|
| 392 | - case 'EVEN': // 0 SOUR / 1 DATA / 2 EVEN / 3 DATE / 3 PLAC |
|
| 393 | - $events = array(); |
|
| 394 | - foreach (preg_split('/ *, */', $match[2]) as $event) { |
|
| 395 | - $events[] = GedcomTag::getLabel($event); |
|
| 396 | - } |
|
| 397 | - if (count($events) == 1) { |
|
| 398 | - echo GedcomTag::getLabelValue('EVEN', $event); |
|
| 399 | - } else { |
|
| 400 | - echo GedcomTag::getLabelValue('EVEN', implode(I18N::$list_separator, $events)); |
|
| 401 | - } |
|
| 402 | - if (preg_match('/\n3 DATE (.+)/', $fact->getGedcom(), $date_match)) { |
|
| 403 | - $date = new Date($date_match[1]); |
|
| 404 | - echo GedcomTag::getLabelValue('DATE', $date->display()); |
|
| 405 | - } |
|
| 406 | - if (preg_match('/\n3 PLAC (.+)/', $fact->getGedcom(), $plac_match)) { |
|
| 407 | - echo GedcomTag::getLabelValue('PLAC', $plac_match[1]); |
|
| 408 | - } |
|
| 409 | - break; |
|
| 410 | - case 'FAMC': // 0 INDI / 1 ADOP / 2 FAMC / 3 ADOP |
|
| 411 | - $family = Family::getInstance(str_replace('@', '', $match[2]), $fact->getParent()->getTree()); |
|
| 412 | - if ($family) { |
|
| 413 | - echo GedcomTag::getLabelValue('FAM', '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a>'); |
|
| 414 | - if (preg_match('/\n3 ADOP (HUSB|WIFE|BOTH)/', $fact->getGedcom(), $match)) { |
|
| 415 | - echo GedcomTag::getLabelValue('ADOP', GedcomCodeAdop::getValue($match[1], $label_person)); |
|
| 416 | - } |
|
| 417 | - } else { |
|
| 418 | - echo GedcomTag::getLabelValue('FAM', '<span class="error">' . $match[2] . '</span>'); |
|
| 419 | - } |
|
| 420 | - break; |
|
| 421 | - case '_WT_USER': |
|
| 422 | - $user = User::findByIdentifier($match[2]); // may not exist |
|
| 423 | - if ($user) { |
|
| 424 | - echo GedcomTag::getLabelValue('_WT_USER', $user->getRealNameHtml()); |
|
| 425 | - } else { |
|
| 426 | - echo GedcomTag::getLabelValue('_WT_USER', Filter::escapeHtml($match[2])); |
|
| 427 | - } |
|
| 428 | - break; |
|
| 429 | - case 'RESN': |
|
| 430 | - switch ($match[2]) { |
|
| 431 | - case 'none': |
|
| 432 | - // Note: "2 RESN none" is not valid gedcom. |
|
| 433 | - // However, webtrees privacy rules will interpret it as "show an otherwise private fact to public". |
|
| 434 | - echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-none"></i> ' . I18N::translate('Show to visitors')); |
|
| 435 | - break; |
|
| 436 | - case 'privacy': |
|
| 437 | - echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-privacy"></i> ' . I18N::translate('Show to members')); |
|
| 438 | - break; |
|
| 439 | - case 'confidential': |
|
| 440 | - echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-confidential"></i> ' . I18N::translate('Show to managers')); |
|
| 441 | - break; |
|
| 442 | - case 'locked': |
|
| 443 | - echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-locked"></i> ' . I18N::translate('Only managers can edit')); |
|
| 444 | - break; |
|
| 445 | - default: |
|
| 446 | - echo GedcomTag::getLabelValue('RESN', Filter::escapeHtml($match[2])); |
|
| 447 | - break; |
|
| 448 | - } |
|
| 449 | - break; |
|
| 450 | - case 'CALN': |
|
| 451 | - echo GedcomTag::getLabelValue('CALN', Filter::expandUrls($match[2])); |
|
| 452 | - break; |
|
| 453 | - case 'FORM': // 0 OBJE / 1 FILE / 2 FORM / 3 TYPE |
|
| 454 | - echo GedcomTag::getLabelValue('FORM', $match[2]); |
|
| 455 | - if (preg_match('/\n3 TYPE (.+)/', $fact->getGedcom(), $type_match)) { |
|
| 456 | - echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($type_match[1])); |
|
| 365 | + case 'DATE': |
|
| 366 | + case 'TIME': |
|
| 367 | + case 'AGE': |
|
| 368 | + case 'PLAC': |
|
| 369 | + case 'ADDR': |
|
| 370 | + case 'ALIA': |
|
| 371 | + case 'ASSO': |
|
| 372 | + case '_ASSO': |
|
| 373 | + case 'DESC': |
|
| 374 | + case 'RELA': |
|
| 375 | + case 'STAT': |
|
| 376 | + case 'TEMP': |
|
| 377 | + case 'TYPE': |
|
| 378 | + case 'FAMS': |
|
| 379 | + case 'CONT': |
|
| 380 | + // These were already shown at the beginning |
|
| 381 | + break; |
|
| 382 | + case 'NOTE': |
|
| 383 | + case 'OBJE': |
|
| 384 | + case 'SOUR': |
|
| 385 | + // These will be shown at the end |
|
| 386 | + break; |
|
| 387 | + case '_UID': |
|
| 388 | + case 'RIN': |
|
| 389 | + // These don't belong at level 2, so do not display them. |
|
| 390 | + // They are only shown when editing. |
|
| 391 | + break; |
|
| 392 | + case 'EVEN': // 0 SOUR / 1 DATA / 2 EVEN / 3 DATE / 3 PLAC |
|
| 393 | + $events = array(); |
|
| 394 | + foreach (preg_split('/ *, */', $match[2]) as $event) { |
|
| 395 | + $events[] = GedcomTag::getLabel($event); |
|
| 396 | + } |
|
| 397 | + if (count($events) == 1) { |
|
| 398 | + echo GedcomTag::getLabelValue('EVEN', $event); |
|
| 399 | + } else { |
|
| 400 | + echo GedcomTag::getLabelValue('EVEN', implode(I18N::$list_separator, $events)); |
|
| 401 | + } |
|
| 402 | + if (preg_match('/\n3 DATE (.+)/', $fact->getGedcom(), $date_match)) { |
|
| 403 | + $date = new Date($date_match[1]); |
|
| 404 | + echo GedcomTag::getLabelValue('DATE', $date->display()); |
|
| 405 | + } |
|
| 406 | + if (preg_match('/\n3 PLAC (.+)/', $fact->getGedcom(), $plac_match)) { |
|
| 407 | + echo GedcomTag::getLabelValue('PLAC', $plac_match[1]); |
|
| 408 | + } |
|
| 409 | + break; |
|
| 410 | + case 'FAMC': // 0 INDI / 1 ADOP / 2 FAMC / 3 ADOP |
|
| 411 | + $family = Family::getInstance(str_replace('@', '', $match[2]), $fact->getParent()->getTree()); |
|
| 412 | + if ($family) { |
|
| 413 | + echo GedcomTag::getLabelValue('FAM', '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a>'); |
|
| 414 | + if (preg_match('/\n3 ADOP (HUSB|WIFE|BOTH)/', $fact->getGedcom(), $match)) { |
|
| 415 | + echo GedcomTag::getLabelValue('ADOP', GedcomCodeAdop::getValue($match[1], $label_person)); |
|
| 457 | 416 | } |
| 458 | - break; |
|
| 459 | - case 'URL': |
|
| 460 | - case '_URL': |
|
| 461 | - case 'WWW': |
|
| 462 | - $link = '<a href="' . Filter::escapeHtml($match[2]) . '">' . Filter::escapeHtml($match[2]) . '</a>'; |
|
| 463 | - echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], $link); |
|
| 464 | - break; |
|
| 417 | + } else { |
|
| 418 | + echo GedcomTag::getLabelValue('FAM', '<span class="error">' . $match[2] . '</span>'); |
|
| 419 | + } |
|
| 420 | + break; |
|
| 421 | + case '_WT_USER': |
|
| 422 | + $user = User::findByIdentifier($match[2]); // may not exist |
|
| 423 | + if ($user) { |
|
| 424 | + echo GedcomTag::getLabelValue('_WT_USER', $user->getRealNameHtml()); |
|
| 425 | + } else { |
|
| 426 | + echo GedcomTag::getLabelValue('_WT_USER', Filter::escapeHtml($match[2])); |
|
| 427 | + } |
|
| 428 | + break; |
|
| 429 | + case 'RESN': |
|
| 430 | + switch ($match[2]) { |
|
| 431 | + case 'none': |
|
| 432 | + // Note: "2 RESN none" is not valid gedcom. |
|
| 433 | + // However, webtrees privacy rules will interpret it as "show an otherwise private fact to public". |
|
| 434 | + echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-none"></i> ' . I18N::translate('Show to visitors')); |
|
| 435 | + break; |
|
| 436 | + case 'privacy': |
|
| 437 | + echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-privacy"></i> ' . I18N::translate('Show to members')); |
|
| 438 | + break; |
|
| 439 | + case 'confidential': |
|
| 440 | + echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-confidential"></i> ' . I18N::translate('Show to managers')); |
|
| 441 | + break; |
|
| 442 | + case 'locked': |
|
| 443 | + echo GedcomTag::getLabelValue('RESN', '<i class="icon-resn-locked"></i> ' . I18N::translate('Only managers can edit')); |
|
| 444 | + break; |
|
| 465 | 445 | default: |
| 466 | - if (!$fact->getParent()->getTree()->getPreference('HIDE_GEDCOM_ERRORS') || GedcomTag::isTag($match[1])) { |
|
| 467 | - if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $match[2], $xmatch)) { |
|
| 468 | - // Links |
|
| 469 | - $linked_record = GedcomRecord::getInstance($xmatch[1], $fact->getParent()->getTree()); |
|
| 470 | - if ($linked_record) { |
|
| 471 | - $link = '<a href="' . $linked_record->getHtmlUrl() . '">' . $linked_record->getFullName() . '</a>'; |
|
| 472 | - echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], $link); |
|
| 473 | - } else { |
|
| 474 | - echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], Filter::escapeHtml($match[2])); |
|
| 475 | - } |
|
| 446 | + echo GedcomTag::getLabelValue('RESN', Filter::escapeHtml($match[2])); |
|
| 447 | + break; |
|
| 448 | + } |
|
| 449 | + break; |
|
| 450 | + case 'CALN': |
|
| 451 | + echo GedcomTag::getLabelValue('CALN', Filter::expandUrls($match[2])); |
|
| 452 | + break; |
|
| 453 | + case 'FORM': // 0 OBJE / 1 FILE / 2 FORM / 3 TYPE |
|
| 454 | + echo GedcomTag::getLabelValue('FORM', $match[2]); |
|
| 455 | + if (preg_match('/\n3 TYPE (.+)/', $fact->getGedcom(), $type_match)) { |
|
| 456 | + echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($type_match[1])); |
|
| 457 | + } |
|
| 458 | + break; |
|
| 459 | + case 'URL': |
|
| 460 | + case '_URL': |
|
| 461 | + case 'WWW': |
|
| 462 | + $link = '<a href="' . Filter::escapeHtml($match[2]) . '">' . Filter::escapeHtml($match[2]) . '</a>'; |
|
| 463 | + echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], $link); |
|
| 464 | + break; |
|
| 465 | + default: |
|
| 466 | + if (!$fact->getParent()->getTree()->getPreference('HIDE_GEDCOM_ERRORS') || GedcomTag::isTag($match[1])) { |
|
| 467 | + if (preg_match('/^@(' . WT_REGEX_XREF . ')@$/', $match[2], $xmatch)) { |
|
| 468 | + // Links |
|
| 469 | + $linked_record = GedcomRecord::getInstance($xmatch[1], $fact->getParent()->getTree()); |
|
| 470 | + if ($linked_record) { |
|
| 471 | + $link = '<a href="' . $linked_record->getHtmlUrl() . '">' . $linked_record->getFullName() . '</a>'; |
|
| 472 | + echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], $link); |
|
| 476 | 473 | } else { |
| 477 | - // Non links |
|
| 478 | 474 | echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], Filter::escapeHtml($match[2])); |
| 479 | 475 | } |
| 476 | + } else { |
|
| 477 | + // Non links |
|
| 478 | + echo GedcomTag::getLabelValue($fact->getTag() . ':' . $match[1], Filter::escapeHtml($match[2])); |
|
| 480 | 479 | } |
| 481 | - break; |
|
| 480 | + } |
|
| 481 | + break; |
|
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | echo self::printFactSources($fact->getGedcom(), 2); |
@@ -820,23 +820,23 @@ discard block |
||
| 820 | 820 | foreach ($rmatches[1] as $rmatch) { |
| 821 | 821 | echo '<br><span class="label">', GedcomTag::getLabel('RESN'), ':</span> <span class="field">'; |
| 822 | 822 | switch ($rmatch) { |
| 823 | - case 'none': |
|
| 824 | - // Note: "2 RESN none" is not valid gedcom, and the GUI will not let you add it. |
|
| 825 | - // However, webtrees privacy rules will interpret it as "show an otherwise private fact to public". |
|
| 826 | - echo '<i class="icon-resn-none"></i> ', I18N::translate('Show to visitors'); |
|
| 827 | - break; |
|
| 828 | - case 'privacy': |
|
| 829 | - echo '<i class="icon-resn-privacy"></i> ', I18N::translate('Show to members'); |
|
| 830 | - break; |
|
| 831 | - case 'confidential': |
|
| 832 | - echo '<i class="icon-resn-confidential"></i> ', I18N::translate('Show to managers'); |
|
| 833 | - break; |
|
| 834 | - case 'locked': |
|
| 835 | - echo '<i class="icon-resn-locked"></i> ', I18N::translate('Only managers can edit'); |
|
| 836 | - break; |
|
| 837 | - default: |
|
| 838 | - echo $rmatch; |
|
| 839 | - break; |
|
| 823 | + case 'none': |
|
| 824 | + // Note: "2 RESN none" is not valid gedcom, and the GUI will not let you add it. |
|
| 825 | + // However, webtrees privacy rules will interpret it as "show an otherwise private fact to public". |
|
| 826 | + echo '<i class="icon-resn-none"></i> ', I18N::translate('Show to visitors'); |
|
| 827 | + break; |
|
| 828 | + case 'privacy': |
|
| 829 | + echo '<i class="icon-resn-privacy"></i> ', I18N::translate('Show to members'); |
|
| 830 | + break; |
|
| 831 | + case 'confidential': |
|
| 832 | + echo '<i class="icon-resn-confidential"></i> ', I18N::translate('Show to managers'); |
|
| 833 | + break; |
|
| 834 | + case 'locked': |
|
| 835 | + echo '<i class="icon-resn-locked"></i> ', I18N::translate('Only managers can edit'); |
|
| 836 | + break; |
|
| 837 | + default: |
|
| 838 | + echo $rmatch; |
|
| 839 | + break; |
|
| 840 | 840 | } |
| 841 | 841 | echo '</span>'; |
| 842 | 842 | } |
@@ -1086,23 +1086,23 @@ discard block |
||
| 1086 | 1086 | foreach ($matches[1] as $match) { |
| 1087 | 1087 | echo '<br><span class="label">', GedcomTag::getLabel('RESN'), ':</span> <span class="field">'; |
| 1088 | 1088 | switch ($match) { |
| 1089 | - case 'none': |
|
| 1090 | - // Note: "2 RESN none" is not valid gedcom, and the GUI will not let you add it. |
|
| 1091 | - // However, webtrees privacy rules will interpret it as "show an otherwise private fact to public". |
|
| 1092 | - echo '<i class="icon-resn-none"></i> ', I18N::translate('Show to visitors'); |
|
| 1093 | - break; |
|
| 1094 | - case 'privacy': |
|
| 1095 | - echo '<i class="icon-resn-privacy"></i> ', I18N::translate('Show to members'); |
|
| 1096 | - break; |
|
| 1097 | - case 'confidential': |
|
| 1098 | - echo '<i class="icon-resn-confidential"></i> ', I18N::translate('Show to managers'); |
|
| 1099 | - break; |
|
| 1100 | - case 'locked': |
|
| 1101 | - echo '<i class="icon-resn-locked"></i> ', I18N::translate('Only managers can edit'); |
|
| 1102 | - break; |
|
| 1103 | - default: |
|
| 1104 | - echo $match; |
|
| 1105 | - break; |
|
| 1089 | + case 'none': |
|
| 1090 | + // Note: "2 RESN none" is not valid gedcom, and the GUI will not let you add it. |
|
| 1091 | + // However, webtrees privacy rules will interpret it as "show an otherwise private fact to public". |
|
| 1092 | + echo '<i class="icon-resn-none"></i> ', I18N::translate('Show to visitors'); |
|
| 1093 | + break; |
|
| 1094 | + case 'privacy': |
|
| 1095 | + echo '<i class="icon-resn-privacy"></i> ', I18N::translate('Show to members'); |
|
| 1096 | + break; |
|
| 1097 | + case 'confidential': |
|
| 1098 | + echo '<i class="icon-resn-confidential"></i> ', I18N::translate('Show to managers'); |
|
| 1099 | + break; |
|
| 1100 | + case 'locked': |
|
| 1101 | + echo '<i class="icon-resn-locked"></i> ', I18N::translate('Only managers can edit'); |
|
| 1102 | + break; |
|
| 1103 | + default: |
|
| 1104 | + echo $match; |
|
| 1105 | + break; |
|
| 1106 | 1106 | } |
| 1107 | 1107 | echo '</span>'; |
| 1108 | 1108 | } |
@@ -1203,12 +1203,12 @@ discard block |
||
| 1203 | 1203 | } |
| 1204 | 1204 | |
| 1205 | 1205 | switch ($media->isPrimary()) { |
| 1206 | - case 'Y': |
|
| 1207 | - echo GedcomTag::getLabelValue('_PRIM', I18N::translate('yes')); |
|
| 1208 | - break; |
|
| 1209 | - case 'N': |
|
| 1210 | - echo GedcomTag::getLabelValue('_PRIM', I18N::translate('no')); |
|
| 1211 | - break; |
|
| 1206 | + case 'Y': |
|
| 1207 | + echo GedcomTag::getLabelValue('_PRIM', I18N::translate('yes')); |
|
| 1208 | + break; |
|
| 1209 | + case 'N': |
|
| 1210 | + echo GedcomTag::getLabelValue('_PRIM', I18N::translate('no')); |
|
| 1211 | + break; |
|
| 1212 | 1212 | } |
| 1213 | 1213 | echo FunctionsPrint::printFactNotes($media->getGedcom(), 1); |
| 1214 | 1214 | echo self::printFactSources($media->getGedcom(), 1); |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -1689,37 +1689,37 @@ discard block |
||
| 1689 | 1689 | |
| 1690 | 1690 | } |
| 1691 | 1691 | switch ($style) { |
| 1692 | - case 1: |
|
| 1693 | - return '<ul><li>' . implode('</li><li>', $html) . '</li></ul>'; |
|
| 1694 | - case 2: |
|
| 1695 | - return implode(I18N::$list_separator, $html); |
|
| 1696 | - case 3: |
|
| 1697 | - $i = 0; |
|
| 1698 | - $count = count($html); |
|
| 1699 | - if ($count > 36) { |
|
| 1700 | - $col = 4; |
|
| 1701 | - } elseif ($count > 18) { |
|
| 1702 | - $col = 3; |
|
| 1703 | - } elseif ($count > 6) { |
|
| 1704 | - $col = 2; |
|
| 1705 | - } else { |
|
| 1706 | - $col = 1; |
|
| 1707 | - } |
|
| 1708 | - $newcol = ceil($count / $col); |
|
| 1709 | - $html2 = '<table class="list_table"><tr>'; |
|
| 1710 | - $html2 .= '<td class="list_value" style="padding: 14px;">'; |
|
| 1711 | - |
|
| 1712 | - foreach ($html as $surns) { |
|
| 1713 | - $html2 .= $surns . '<br>'; |
|
| 1714 | - $i++; |
|
| 1715 | - if ($i == $newcol && $i < $count) { |
|
| 1716 | - $html2 .= '</td><td class="list_value" style="padding: 14px;">'; |
|
| 1717 | - $newcol = $i + ceil($count / $col); |
|
| 1718 | - } |
|
| 1692 | + case 1: |
|
| 1693 | + return '<ul><li>' . implode('</li><li>', $html) . '</li></ul>'; |
|
| 1694 | + case 2: |
|
| 1695 | + return implode(I18N::$list_separator, $html); |
|
| 1696 | + case 3: |
|
| 1697 | + $i = 0; |
|
| 1698 | + $count = count($html); |
|
| 1699 | + if ($count > 36) { |
|
| 1700 | + $col = 4; |
|
| 1701 | + } elseif ($count > 18) { |
|
| 1702 | + $col = 3; |
|
| 1703 | + } elseif ($count > 6) { |
|
| 1704 | + $col = 2; |
|
| 1705 | + } else { |
|
| 1706 | + $col = 1; |
|
| 1707 | + } |
|
| 1708 | + $newcol = ceil($count / $col); |
|
| 1709 | + $html2 = '<table class="list_table"><tr>'; |
|
| 1710 | + $html2 .= '<td class="list_value" style="padding: 14px;">'; |
|
| 1711 | + |
|
| 1712 | + foreach ($html as $surns) { |
|
| 1713 | + $html2 .= $surns . '<br>'; |
|
| 1714 | + $i++; |
|
| 1715 | + if ($i == $newcol && $i < $count) { |
|
| 1716 | + $html2 .= '</td><td class="list_value" style="padding: 14px;">'; |
|
| 1717 | + $newcol = $i + ceil($count / $col); |
|
| 1719 | 1718 | } |
| 1720 | - $html2 .= '</td></tr></table>'; |
|
| 1719 | + } |
|
| 1720 | + $html2 .= '</td></tr></table>'; |
|
| 1721 | 1721 | |
| 1722 | - return $html2; |
|
| 1722 | + return $html2; |
|
| 1723 | 1723 | } |
| 1724 | 1724 | } |
| 1725 | 1725 | /** |
@@ -1920,14 +1920,14 @@ discard block |
||
| 1920 | 1920 | |
| 1921 | 1921 | // Now we've filtered the list, we can sort by event, if required |
| 1922 | 1922 | switch ($sort_by) { |
| 1923 | - case 'anniv': |
|
| 1924 | - // Data is already sorted by anniversary date |
|
| 1925 | - break; |
|
| 1926 | - case 'alpha': |
|
| 1927 | - uasort($filtered_events, function (Fact $x, Fact $y) { |
|
| 1928 | - return GedcomRecord::compare($x->getParent(), $y->getParent()); |
|
| 1929 | - }); |
|
| 1930 | - break; |
|
| 1923 | + case 'anniv': |
|
| 1924 | + // Data is already sorted by anniversary date |
|
| 1925 | + break; |
|
| 1926 | + case 'alpha': |
|
| 1927 | + uasort($filtered_events, function (Fact $x, Fact $y) { |
|
| 1928 | + return GedcomRecord::compare($x->getParent(), $y->getParent()); |
|
| 1929 | + }); |
|
| 1930 | + break; |
|
| 1931 | 1931 | } |
| 1932 | 1932 | |
| 1933 | 1933 | foreach ($filtered_events as $fact) { |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |
@@ -1,18 +1,18 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees: online genealogy |
|
| 4 | - * Copyright (C) 2016 webtrees development team |
|
| 5 | - * This program is free software: you can redistribute it and/or modify |
|
| 6 | - * it under the terms of the GNU General Public License as published by |
|
| 7 | - * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | - * (at your option) any later version. |
|
| 9 | - * This program is distributed in the hope that it will be useful, |
|
| 10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | - * GNU General Public License for more details. |
|
| 13 | - * You should have received a copy of the GNU General Public License |
|
| 14 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | - */ |
|
| 3 | + * webtrees: online genealogy |
|
| 4 | + * Copyright (C) 2016 webtrees development team |
|
| 5 | + * This program is free software: you can redistribute it and/or modify |
|
| 6 | + * it under the terms of the GNU General Public License as published by |
|
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
|
| 8 | + * (at your option) any later version. |
|
| 9 | + * This program is distributed in the hope that it will be useful, |
|
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 | + * GNU General Public License for more details. |
|
| 13 | + * You should have received a copy of the GNU General Public License |
|
| 14 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 | + */ |
|
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Fisharebest\Webtrees\Theme\AdministrationTheme; |