@@ -400,9 +400,9 @@ discard block |
||
400 | 400 | public function exportClient(Request $request, Tree $tree): Response |
401 | 401 | { |
402 | 402 | // Validate user parameters |
403 | - $convert = (bool)$request->get('convert'); |
|
404 | - $zip = (bool)$request->get('zip'); |
|
405 | - $media = (bool)$request->get('media'); |
|
403 | + $convert = (bool) $request->get('convert'); |
|
404 | + $zip = (bool) $request->get('zip'); |
|
405 | + $media = (bool) $request->get('media'); |
|
406 | 406 | $media_path = $request->get('media-path'); |
407 | 407 | $privatize_export = $request->get('privatize_export'); |
408 | 408 | |
@@ -532,8 +532,8 @@ discard block |
||
532 | 532 | public function importAction(Request $request, Tree $tree): RedirectResponse |
533 | 533 | { |
534 | 534 | $source = $request->get('source'); |
535 | - $keep_media = (bool)$request->get('keep_media'); |
|
536 | - $WORD_WRAPPED_NOTES = (bool)$request->get('WORD_WRAPPED_NOTES'); |
|
535 | + $keep_media = (bool) $request->get('keep_media'); |
|
536 | + $WORD_WRAPPED_NOTES = (bool) $request->get('WORD_WRAPPED_NOTES'); |
|
537 | 537 | $GEDCOM_MEDIA_PATH = $request->get('GEDCOM_MEDIA_PATH'); |
538 | 538 | |
539 | 539 | // Save these choices as defaults |
@@ -1022,16 +1022,16 @@ discard block |
||
1022 | 1022 | public function preferencesUpdate(Request $request, Tree $tree): RedirectResponse |
1023 | 1023 | { |
1024 | 1024 | // Coming soon |
1025 | - if ((bool)$request->get('all_trees')) { |
|
1025 | + if ((bool) $request->get('all_trees')) { |
|
1026 | 1026 | FlashMessages::addMessage(I18N::translate('The preferences for all family trees have been updated.'), 'success'); |
1027 | 1027 | } |
1028 | - if ((bool)$request->get('new_trees')) { |
|
1028 | + if ((bool) $request->get('new_trees')) { |
|
1029 | 1029 | FlashMessages::addMessage(I18N::translate('The preferences for new family trees have been updated.'), 'success'); |
1030 | 1030 | } |
1031 | 1031 | |
1032 | 1032 | $tree->setPreference('ADVANCED_NAME_FACTS', implode(',', $request->get('ADVANCED_NAME_FACTS', []))); |
1033 | 1033 | $tree->setPreference('ADVANCED_PLAC_FACTS', implode(',', $request->get('ADVANCED_PLAC_FACTS', []))); |
1034 | - $tree->setPreference('ALLOW_THEME_DROPDOWN', (string)(bool)$request->get('ALLOW_THEME_DROPDOWN')); |
|
1034 | + $tree->setPreference('ALLOW_THEME_DROPDOWN', (string) (bool) $request->get('ALLOW_THEME_DROPDOWN')); |
|
1035 | 1035 | // For backwards compatibility with webtrees 1.x we store the two calendar formats in one variable |
1036 | 1036 | // e.g. "gregorian_and_jewish" |
1037 | 1037 | $tree->setPreference('CALENDAR_FORMAT', implode('_and_', array_unique([ |
@@ -1040,57 +1040,57 @@ discard block |
||
1040 | 1040 | ]))); |
1041 | 1041 | $tree->setPreference('CHART_BOX_TAGS', implode(',', $request->get('CHART_BOX_TAGS', []))); |
1042 | 1042 | $tree->setPreference('CONTACT_USER_ID', $request->get('CONTACT_USER_ID')); |
1043 | - $tree->setPreference('DEFAULT_PEDIGREE_GENERATIONS', (string)(int)$request->get('DEFAULT_PEDIGREE_GENERATIONS')); |
|
1044 | - $tree->setPreference('EXPAND_NOTES', (string)(bool)$request->get('EXPAND_NOTES')); |
|
1045 | - $tree->setPreference('EXPAND_SOURCES', (string)(bool)$request->get('EXPAND_SOURCES')); |
|
1043 | + $tree->setPreference('DEFAULT_PEDIGREE_GENERATIONS', (string) (int) $request->get('DEFAULT_PEDIGREE_GENERATIONS')); |
|
1044 | + $tree->setPreference('EXPAND_NOTES', (string) (bool) $request->get('EXPAND_NOTES')); |
|
1045 | + $tree->setPreference('EXPAND_SOURCES', (string) (bool) $request->get('EXPAND_SOURCES')); |
|
1046 | 1046 | $tree->setPreference('FAM_FACTS_ADD', implode(',', $request->get('FAM_FACTS_ADD', []))); |
1047 | 1047 | $tree->setPreference('FAM_FACTS_QUICK', implode(',', $request->get('FAM_FACTS_QUICK', []))); |
1048 | 1048 | $tree->setPreference('FAM_FACTS_UNIQUE', implode(',', $request->get('FAM_FACTS_UNIQUE', []))); |
1049 | - $tree->setPreference('FULL_SOURCES', (string)(bool)$request->get('FULL_SOURCES')); |
|
1049 | + $tree->setPreference('FULL_SOURCES', (string) (bool) $request->get('FULL_SOURCES')); |
|
1050 | 1050 | $tree->setPreference('FORMAT_TEXT', $request->get('FORMAT_TEXT')); |
1051 | - $tree->setPreference('GENERATE_UIDS', (string)(bool)$request->get('GENERATE_UIDS')); |
|
1051 | + $tree->setPreference('GENERATE_UIDS', (string) (bool) $request->get('GENERATE_UIDS')); |
|
1052 | 1052 | $tree->setPreference('GEONAMES_ACCOUNT', $request->get('GEONAMES_ACCOUNT')); |
1053 | - $tree->setPreference('HIDE_GEDCOM_ERRORS', (string)(bool)$request->get('HIDE_GEDCOM_ERRORS')); |
|
1053 | + $tree->setPreference('HIDE_GEDCOM_ERRORS', (string) (bool) $request->get('HIDE_GEDCOM_ERRORS')); |
|
1054 | 1054 | $tree->setPreference('INDI_FACTS_ADD', implode(',', $request->get('INDI_FACTS_ADD', []))); |
1055 | 1055 | $tree->setPreference('INDI_FACTS_QUICK', implode(',', $request->get('INDI_FACTS_QUICK', []))); |
1056 | 1056 | $tree->setPreference('INDI_FACTS_UNIQUE', implode(',', $request->get('INDI_FACTS_UNIQUE', []))); |
1057 | 1057 | $tree->setPreference('LANGUAGE', $request->get('LANGUAGE')); |
1058 | - $tree->setPreference('MAX_DESCENDANCY_GENERATIONS', (string)(int)$request->get('MAX_DESCENDANCY_GENERATIONS')); |
|
1059 | - $tree->setPreference('MAX_PEDIGREE_GENERATIONS', (string)(int)$request->get('MAX_PEDIGREE_GENERATIONS')); |
|
1058 | + $tree->setPreference('MAX_DESCENDANCY_GENERATIONS', (string) (int) $request->get('MAX_DESCENDANCY_GENERATIONS')); |
|
1059 | + $tree->setPreference('MAX_PEDIGREE_GENERATIONS', (string) (int) $request->get('MAX_PEDIGREE_GENERATIONS')); |
|
1060 | 1060 | $tree->setPreference('MEDIA_UPLOAD', $request->get('MEDIA_UPLOAD')); |
1061 | 1061 | $tree->setPreference('META_DESCRIPTION', $request->get('META_DESCRIPTION')); |
1062 | 1062 | $tree->setPreference('META_TITLE', $request->get('META_TITLE')); |
1063 | - $tree->setPreference('NO_UPDATE_CHAN', (string)(bool)$request->get('NO_UPDATE_CHAN')); |
|
1064 | - $tree->setPreference('PEDIGREE_LAYOUT', (string)(bool)$request->get('PEDIGREE_LAYOUT')); |
|
1063 | + $tree->setPreference('NO_UPDATE_CHAN', (string) (bool) $request->get('NO_UPDATE_CHAN')); |
|
1064 | + $tree->setPreference('PEDIGREE_LAYOUT', (string) (bool) $request->get('PEDIGREE_LAYOUT')); |
|
1065 | 1065 | $tree->setPreference('PEDIGREE_ROOT_ID', $request->get('PEDIGREE_ROOT_ID', WT_REGEX_XREF)); |
1066 | - $tree->setPreference('PEDIGREE_SHOW_GENDER', (string)(bool)$request->get('PEDIGREE_SHOW_GENDER')); |
|
1066 | + $tree->setPreference('PEDIGREE_SHOW_GENDER', (string) (bool) $request->get('PEDIGREE_SHOW_GENDER')); |
|
1067 | 1067 | $tree->setPreference('PREFER_LEVEL2_SOURCES', $request->get('PREFER_LEVEL2_SOURCES')); |
1068 | 1068 | $tree->setPreference('QUICK_REQUIRED_FACTS', implode(',', $request->get('QUICK_REQUIRED_FACTS', []))); |
1069 | 1069 | $tree->setPreference('QUICK_REQUIRED_FAMFACTS', implode(',', $request->get('QUICK_REQUIRED_FAMFACTS', []))); |
1070 | 1070 | $tree->setPreference('REPO_FACTS_ADD', implode(',', $request->get('REPO_FACTS_ADD', []))); |
1071 | 1071 | $tree->setPreference('REPO_FACTS_QUICK', implode(',', $request->get('REPO_FACTS_QUICK', []))); |
1072 | 1072 | $tree->setPreference('REPO_FACTS_UNIQUE', implode(',', $request->get('REPO_FACTS_UNIQUE', []))); |
1073 | - $tree->setPreference('SHOW_COUNTER', (string)(bool)$request->get('SHOW_COUNTER')); |
|
1074 | - $tree->setPreference('SHOW_EST_LIST_DATES', (string)(bool)$request->get('SHOW_EST_LIST_DATES')); |
|
1075 | - $tree->setPreference('SHOW_FACT_ICONS', (string)(bool)$request->get('SHOW_FACT_ICONS')); |
|
1076 | - $tree->setPreference('SHOW_GEDCOM_RECORD', (string)(bool)$request->get('SHOW_GEDCOM_RECORD')); |
|
1077 | - $tree->setPreference('SHOW_HIGHLIGHT_IMAGES', (string)(bool)$request->get('SHOW_HIGHLIGHT_IMAGES')); |
|
1078 | - $tree->setPreference('SHOW_LAST_CHANGE', (string)(bool)$request->get('SHOW_LAST_CHANGE')); |
|
1079 | - $tree->setPreference('SHOW_LDS_AT_GLANCE', (string)(bool)$request->get('SHOW_LDS_AT_GLANCE')); |
|
1073 | + $tree->setPreference('SHOW_COUNTER', (string) (bool) $request->get('SHOW_COUNTER')); |
|
1074 | + $tree->setPreference('SHOW_EST_LIST_DATES', (string) (bool) $request->get('SHOW_EST_LIST_DATES')); |
|
1075 | + $tree->setPreference('SHOW_FACT_ICONS', (string) (bool) $request->get('SHOW_FACT_ICONS')); |
|
1076 | + $tree->setPreference('SHOW_GEDCOM_RECORD', (string) (bool) $request->get('SHOW_GEDCOM_RECORD')); |
|
1077 | + $tree->setPreference('SHOW_HIGHLIGHT_IMAGES', (string) (bool) $request->get('SHOW_HIGHLIGHT_IMAGES')); |
|
1078 | + $tree->setPreference('SHOW_LAST_CHANGE', (string) (bool) $request->get('SHOW_LAST_CHANGE')); |
|
1079 | + $tree->setPreference('SHOW_LDS_AT_GLANCE', (string) (bool) $request->get('SHOW_LDS_AT_GLANCE')); |
|
1080 | 1080 | $tree->setPreference('SHOW_MEDIA_DOWNLOAD', $request->get('SHOW_MEDIA_DOWNLOAD')); |
1081 | 1081 | $tree->setPreference('SHOW_NO_WATERMARK', $request->get('SHOW_NO_WATERMARK')); |
1082 | - $tree->setPreference('SHOW_PARENTS_AGE', (string)(bool)$request->get('SHOW_PARENTS_AGE')); |
|
1082 | + $tree->setPreference('SHOW_PARENTS_AGE', (string) (bool) $request->get('SHOW_PARENTS_AGE')); |
|
1083 | 1083 | $tree->setPreference('SHOW_PEDIGREE_PLACES', $request->get('SHOW_PEDIGREE_PLACES')); |
1084 | - $tree->setPreference('SHOW_PEDIGREE_PLACES_SUFFIX', (string)(bool)$request->get('SHOW_PEDIGREE_PLACES_SUFFIX')); |
|
1084 | + $tree->setPreference('SHOW_PEDIGREE_PLACES_SUFFIX', (string) (bool) $request->get('SHOW_PEDIGREE_PLACES_SUFFIX')); |
|
1085 | 1085 | $tree->setPreference('SHOW_RELATIVES_EVENTS', implode(',', $request->get('SHOW_RELATIVES_EVENTS', []))); |
1086 | 1086 | $tree->setPreference('SOUR_FACTS_ADD', implode(',', $request->get('SOUR_FACTS_ADD', []))); |
1087 | 1087 | $tree->setPreference('SOUR_FACTS_QUICK', implode(',', $request->get('SOUR_FACTS_QUICK', []))); |
1088 | 1088 | $tree->setPreference('SOUR_FACTS_UNIQUE', implode(',', $request->get('SOUR_FACTS_UNIQUE', []))); |
1089 | - $tree->setPreference('SUBLIST_TRIGGER_I', (string)(int)$request->get('SUBLIST_TRIGGER_I', 200)); |
|
1089 | + $tree->setPreference('SUBLIST_TRIGGER_I', (string) (int) $request->get('SUBLIST_TRIGGER_I', 200)); |
|
1090 | 1090 | $tree->setPreference('SURNAME_LIST_STYLE', $request->get('SURNAME_LIST_STYLE')); |
1091 | 1091 | $tree->setPreference('SURNAME_TRADITION', $request->get('SURNAME_TRADITION')); |
1092 | 1092 | $tree->setPreference('THEME_DIR', $request->get('THEME_DIR')); |
1093 | - $tree->setPreference('USE_SILHOUETTE', (string)(bool)$request->get('USE_SILHOUETTE')); |
|
1093 | + $tree->setPreference('USE_SILHOUETTE', (string) (bool) $request->get('USE_SILHOUETTE')); |
|
1094 | 1094 | $tree->setPreference('WEBMASTER_USER_ID', $request->get('WEBMASTER_USER_ID')); |
1095 | 1095 | $tree->setPreference('WEBTREES_EMAIL', $request->get('WEBTREES_EMAIL')); |
1096 | 1096 | $tree->setPreference('title', $request->get('title')); |
@@ -1596,7 +1596,7 @@ discard block |
||
1596 | 1596 | |
1597 | 1597 | foreach ($gedcom_files as $gedcom_file) { |
1598 | 1598 | // Only import files that have changed |
1599 | - $filemtime = (string)filemtime(WT_DATA_DIR . $gedcom_file); |
|
1599 | + $filemtime = (string) filemtime(WT_DATA_DIR . $gedcom_file); |
|
1600 | 1600 | |
1601 | 1601 | $tree = Tree::findByName($gedcom_file) ?? Tree::create($gedcom_file, $gedcom_file); |
1602 | 1602 | |
@@ -1629,7 +1629,7 @@ discard block |
||
1629 | 1629 | */ |
1630 | 1630 | public function unconnected(Request $request, Tree $tree, User $user): Response |
1631 | 1631 | { |
1632 | - $associates = (bool)$request->get('associates'); |
|
1632 | + $associates = (bool) $request->get('associates'); |
|
1633 | 1633 | |
1634 | 1634 | if ($associates) { |
1635 | 1635 | $sql = "SELECT l_from, l_to FROM `##link` WHERE l_file = :tree_id AND l_type IN ('FAMS', 'FAMC', 'ASSO', '_ASSO')"; |
@@ -14,17 +14,17 @@ discard block |
||
14 | 14 | <div class="row form-group"> |
15 | 15 | <label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label"> |
16 | 16 | <?= /* I18N: A configuration setting */ |
17 | - I18N::translate('Data folder') ?> |
|
17 | + I18N::translate('Data folder') ?> |
|
18 | 18 | </label> |
19 | 19 | <div class="col-sm-9"> |
20 | 20 | <input type="text" class="form-control" dir="ltr" id="INDEX_DIRECTORY" name="INDEX_DIRECTORY" value="<?= e(Site::getPreference('INDEX_DIRECTORY')) ?>" maxlength="255" placeholder="data/" required> |
21 | 21 | <p class="small text-muted"> |
22 | 22 | <?= /* I18N: Help text for the "Data folder" site configuration setting */ |
23 | - I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?> |
|
23 | + I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?> |
|
24 | 24 | </p> |
25 | 25 | <p class="small text-muted"> |
26 | 26 | <?= /* I18N: “Apache” is a software program. */ |
27 | - I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?> |
|
27 | + I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?> |
|
28 | 28 | </p> |
29 | 29 | <p class="small text-muted"> |
30 | 30 | <?= I18N::translate('If you select a different folder, you must also move all files (except config.ini.php, index.php, and .htaccess) from the existing folder to the new folder.') ?> |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | <div class="row form-group"> |
40 | 40 | <label for="MEMORY_LIMIT" class="col-sm-3 col-form-label"> |
41 | 41 | <?= /* I18N: A configuration setting */ |
42 | - I18N::translate('Memory limit') ?> |
|
42 | + I18N::translate('Memory limit') ?> |
|
43 | 43 | </label> |
44 | 44 | <div class="col-sm-9"> |
45 | 45 | <input type="text" class="form-control" id="MEMORY_LIMIT" name="MEMORY_LIMIT" value="<?= e(Site::getPreference('MEMORY_LIMIT')) ?>" pattern="[0-9]+[KMG]" placeholder="<?= get_cfg_var('memory_limit') ?>" maxlength="255"> |
46 | 46 | <p class="small text-muted"> |
47 | 47 | <?= /* I18N: %s is an amount of memory, such as 32MB */ |
48 | - I18N::translate('By default, your server allows scripts to use %s of memory.', get_cfg_var('memory_limit')) ?> |
|
48 | + I18N::translate('By default, your server allows scripts to use %s of memory.', get_cfg_var('memory_limit')) ?> |
|
49 | 49 | <?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?> |
50 | 50 | <?= I18N::translate('Leave this blank to use the default value.') ?> |
51 | 51 | </p> |
@@ -56,16 +56,16 @@ discard block |
||
56 | 56 | <div class="row form-group"> |
57 | 57 | <label for="MAX_EXECUTION_TIME" class="col-sm-3 col-form-label"> |
58 | 58 | <?= /* I18N: A configuration setting */ |
59 | - I18N::translate('PHP time limit') ?> |
|
59 | + I18N::translate('PHP time limit') ?> |
|
60 | 60 | </label> |
61 | 61 | <div class="col-sm-9"> |
62 | 62 | <input type="text" class="form-control" id="MAX_EXECUTION_TIME" name="MAX_EXECUTION_TIME" value="<?= e(Site::getPreference('MAX_EXECUTION_TIME')) ?>" pattern="[0-9]*" placeholder="<?= get_cfg_var('max_execution_time') ?>" maxlength="255"> |
63 | 63 | <p class="small text-muted"> |
64 | 64 | <?= I18N::plural( |
65 | - 'By default, your server allows scripts to run for %s second.', |
|
66 | - 'By default, your server allows scripts to run for %s seconds.', |
|
67 | - get_cfg_var('max_execution_time'), I18N::number((float) get_cfg_var('max_execution_time'))); |
|
68 | - ?> |
|
65 | + 'By default, your server allows scripts to run for %s second.', |
|
66 | + 'By default, your server allows scripts to run for %s seconds.', |
|
67 | + get_cfg_var('max_execution_time'), I18N::number((float) get_cfg_var('max_execution_time'))); |
|
68 | + ?> |
|
69 | 69 | <?= I18N::translate('You can request a higher or lower limit, although the server may ignore this request.') ?> |
70 | 70 | <?= I18N::translate('Leave this blank to use the default value.') ?> |
71 | 71 | </p> |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | <div class="row form-group"> |
90 | 90 | <label for="THEME_DIR" class="col-sm-3 col-form-label"> |
91 | 91 | <?= /* I18N: A configuration setting */ |
92 | - I18N::translate('Default theme') ?> |
|
92 | + I18N::translate('Default theme') ?> |
|
93 | 93 | </label> |
94 | 94 | <div class="col-sm-9"> |
95 | 95 | <?= Bootstrap4::select($all_themes, Site::getPreference('THEME_DIR', 'webtrees'), ['id' => 'THEME_DIR', 'name' => 'THEME_DIR']) ?> |
96 | 96 | <p class="small text-muted"> |
97 | 97 | <?= /* I18N: Help text for the "Default theme" site configuration setting */ |
98 | - I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> |
|
98 | + I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> |
|
99 | 99 | </p> |
100 | 100 | <p class="small text-muted"> |
101 | 101 | <?= I18N::translate('Themes can be selected at three levels: user, family tree, and website. User preferences take priority over family tree preferences, which in turn take priority over the website preferences. Selecting “default theme” at one level will use the theme at the next level.') ?> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | <div class="row"> |
109 | 109 | <legend class="col-form-label col-sm-3"> |
110 | 110 | <?= /* I18N: A configuration setting */ |
111 | - I18N::translate('Allow users to select their own theme') ?> |
|
111 | + I18N::translate('Allow users to select their own theme') ?> |
|
112 | 112 | </legend> |
113 | 113 | <div class="col-sm-9"> |
114 | 114 | <?= Bootstrap4::radioButtons('ALLOW_USER_THEMES', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_USER_THEMES'), true) ?> |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | <div class="row"> |
122 | 122 | <legend class="col-form-label col-sm-3"> |
123 | 123 | <?= /* I18N: A configuration setting */ |
124 | - I18N::translate('Show list of family trees') ?> |
|
124 | + I18N::translate('Show list of family trees') ?> |
|
125 | 125 | </legend> |
126 | 126 | <div class="col-sm-9"> |
127 | 127 | <?= Bootstrap4::radioButtons('ALLOW_CHANGE_GEDCOM', FunctionsEdit::optionsNoYes(), (string) (int) Site::getPreference('ALLOW_CHANGE_GEDCOM'), true) ?> |
128 | 128 | <p class="small text-muted"> |
129 | 129 | <?= /* I18N: Help text for the “Show list of family trees” site configuration setting */ |
130 | - I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?> |
|
130 | + I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?> |
|
131 | 131 | </p> |
132 | 132 | </div> |
133 | 133 | </div> |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | // init chart data |
71 | 71 | $marr_by_age = []; |
72 | 72 | for ($age = 0; $age <= $max_age; $age++) { |
73 | - $marr_by_age[$age] = ''; |
|
73 | + $marr_by_age[$age] = ''; |
|
74 | 74 | } |
75 | 75 | $birt_by_decade = []; |
76 | 76 | $marr_by_decade = []; |
77 | 77 | for ($year = 1550; $year < 2030; $year += 10) { |
78 | - $birt_by_decade[$year] = ''; |
|
79 | - $marr_by_decade[$year] = ''; |
|
78 | + $birt_by_decade[$year] = ''; |
|
79 | + $marr_by_decade[$year] = ''; |
|
80 | 80 | } |
81 | 81 | ?> |
82 | 82 | |
@@ -244,18 +244,18 @@ discard block |
||
244 | 244 | |
245 | 245 | <!-- Husband age --> |
246 | 246 | <?php |
247 | - $mdate = $family->getMarriageDate(); |
|
248 | - $hdate = $husb->getBirthDate(); |
|
249 | - if ($hdate->isOK() && $mdate->isOK()) { |
|
250 | - if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { |
|
251 | - $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); |
|
252 | - } |
|
253 | - $hage = Date::getAgeYears($hdate, $mdate); |
|
254 | - if ($hage >= 0 && $hage <= $max_age) { |
|
255 | - $marr_by_age[$hage] .= $husb->getSex(); |
|
256 | - } |
|
257 | - } |
|
258 | - ?> |
|
247 | + $mdate = $family->getMarriageDate(); |
|
248 | + $hdate = $husb->getBirthDate(); |
|
249 | + if ($hdate->isOK() && $mdate->isOK()) { |
|
250 | + if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { |
|
251 | + $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); |
|
252 | + } |
|
253 | + $hage = Date::getAgeYears($hdate, $mdate); |
|
254 | + if ($hage >= 0 && $hage <= $max_age) { |
|
255 | + $marr_by_age[$hage] .= $husb->getSex(); |
|
256 | + } |
|
257 | + } |
|
258 | + ?> |
|
259 | 259 | <td class="center" data-sort="<?= Date::getAgeDays($hdate, $mdate) ?>"> |
260 | 260 | <?= Date::getAge($hdate, $mdate) ?> |
261 | 261 | </td> |
@@ -280,17 +280,17 @@ discard block |
||
280 | 280 | |
281 | 281 | <!-- Wife age --> |
282 | 282 | <?php |
283 | - $wdate = $wife->getBirthDate(); |
|
284 | - if ($wdate->isOK() && $mdate->isOK()) { |
|
285 | - if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { |
|
286 | - $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); |
|
287 | - } |
|
288 | - $wage = Date::getAgeYears($wdate, $mdate); |
|
289 | - if ($wage >= 0 && $wage <= $max_age) { |
|
290 | - $marr_by_age[$wage] .= $wife->getSex(); |
|
291 | - } |
|
292 | - } |
|
293 | - ?> |
|
283 | + $wdate = $wife->getBirthDate(); |
|
284 | + if ($wdate->isOK() && $mdate->isOK()) { |
|
285 | + if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { |
|
286 | + $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); |
|
287 | + } |
|
288 | + $wage = Date::getAgeYears($wdate, $mdate); |
|
289 | + if ($wage >= 0 && $wage <= $max_age) { |
|
290 | + $marr_by_age[$wage] .= $wife->getSex(); |
|
291 | + } |
|
292 | + } |
|
293 | + ?> |
|
294 | 294 | |
295 | 295 | <td class="center" data-sort="<?= Date::getAgeDays($wdate, $mdate) ?>"> |
296 | 296 | <?= Date::getAge($wdate, $mdate) ?> |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | if (preg_match('/^(\d+) B\.C\.$/', $year, $match)) { |
77 | - return - (int) $match[1]; |
|
77 | + return -(int) $match[1]; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | return (int) $year; |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $content = $stats->embedTags($content); |
77 | 77 | |
78 | 78 | if ($show_timestamp === '1') { |
79 | - $content .= '<br>' . FunctionsDate::formatTimestamp((int)$this->getBlockSetting($block_id, 'timestamp', (string) WT_TIMESTAMP) + WT_TIMESTAMP_OFFSET); |
|
79 | + $content .= '<br>' . FunctionsDate::formatTimestamp((int) $this->getBlockSetting($block_id, 'timestamp', (string) WT_TIMESTAMP) + WT_TIMESTAMP_OFFSET); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | if ($template) { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $latest_version = $this->fetchLatestVersion(); |
77 | 77 | |
78 | - list(, , $url) = explode('|', $latest_version . '||'); |
|
78 | + list(,, $url) = explode('|', $latest_version . '||'); |
|
79 | 79 | |
80 | 80 | return $url; |
81 | 81 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | if ($response->getStatusCode() === Response::HTTP_OK) { |
107 | 107 | Site::setPreference('LATEST_WT_VERSION', $response->getBody()->getContents()); |
108 | - Site::setPreference('LATEST_WT_VERSION_TIMESTAMP', (string)WT_TIMESTAMP); |
|
108 | + Site::setPreference('LATEST_WT_VERSION_TIMESTAMP', (string) WT_TIMESTAMP); |
|
109 | 109 | } |
110 | 110 | } catch (RequestException $ex) { |
111 | 111 | DebugBar::addThrowable($ex); |