@@ -75,27 +75,27 @@ discard block |
||
75 | 75 | <a class="btn btn-primary" href="<?= e(route('map-data', ['parent_id' => $parent_id])) ?>"> |
76 | 76 | <?= FontAwesome::decorativeIcon('add') ?> |
77 | 77 | <?= /* I18N: A button label. */ |
78 | - I18N::translate('add place') ?> |
|
78 | + I18N::translate('add place') ?> |
|
79 | 79 | </a> |
80 | 80 | <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" |
81 | 81 | data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
82 | 82 | <?= FontAwesome::decorativeIcon('download') ?> |
83 | 83 | <?= /* I18N: A button label. */ |
84 | - I18N::translate('export file') ?> |
|
84 | + I18N::translate('export file') ?> |
|
85 | 85 | </button> |
86 | 86 | <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> |
87 | 87 | <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'csv'])) ?>"> |
88 | 88 | csv |
89 | 89 | </a> |
90 | 90 | <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'geojson'] |
91 | - )) ?>"> |
|
91 | + )) ?>"> |
|
92 | 92 | geoJSON |
93 | 93 | </a> |
94 | 94 | </div> |
95 | 95 | <a class="btn btn-primary" href="<?= e(route('locations-import', ['parent_id' => $parent_id])) ?>"> |
96 | 96 | <?= FontAwesome::decorativeIcon('upload') ?> |
97 | 97 | <?= /* I18N: A button label. */ |
98 | - I18N::translate('import file') ?> |
|
98 | + I18N::translate('import file') ?> |
|
99 | 99 | </a> |
100 | 100 | </td> |
101 | 101 | </tr> |
@@ -111,16 +111,16 @@ discard block |
||
111 | 111 | </label> |
112 | 112 | <div class="col-sm-6"> |
113 | 113 | <?= Bootstrap4::select( |
114 | - Tree::getNameList(), |
|
115 | - '', |
|
116 | - ['id' => 'ged', 'name' => 'ged'] |
|
117 | - ) ?> |
|
114 | + Tree::getNameList(), |
|
115 | + '', |
|
116 | + ['id' => 'ged', 'name' => 'ged'] |
|
117 | + ) ?> |
|
118 | 118 | </div> |
119 | 119 | <div class="col-sm-2"> |
120 | 120 | <button type="submit" class="btn btn-primary"> |
121 | 121 | <?= view('icons/upload') ?> |
122 | 122 | <?= /* I18N: A button label. */ |
123 | - I18N::translate('import') ?> |
|
123 | + I18N::translate('import') ?> |
|
124 | 124 | </button> |
125 | 125 | </div> |
126 | 126 | </div> |
@@ -32,12 +32,10 @@ |
||
32 | 32 | </a> |
33 | 33 | </th> |
34 | 34 | <td> |
35 | - <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : |
|
36 | - strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> |
|
35 | + <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> |
|
37 | 36 | </td> |
38 | 37 | <td> |
39 | - <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : |
|
40 | - strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> |
|
38 | + <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> |
|
41 | 39 | </td> |
42 | 40 | <td> |
43 | 41 | <?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?> |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'type' => 'radio', |
101 | 101 | 'name' => $name, |
102 | 102 | 'value' => $value, |
103 | - 'checked' => (string)$value === (string)$selected, |
|
103 | + 'checked' => (string) $value === (string) $selected, |
|
104 | 104 | ] + $attributes); |
105 | 105 | |
106 | 106 | $html .= |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | foreach ($options as $value => $option) { |
130 | 130 | $option_attributes = self::attributes([ |
131 | 131 | 'value' => $value, |
132 | - 'selected' => (string)$value === (string)$selected, |
|
132 | + 'selected' => (string) $value === (string) $selected, |
|
133 | 133 | ]); |
134 | 134 | |
135 | 135 | $html .= '<option ' . $option_attributes . '>' . e($option) . '</option>'; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | foreach ($options as $value => $option) { |
162 | 162 | $option_attributes = self::attributes([ |
163 | 163 | 'value' => $value, |
164 | - 'selected' => in_array((string)$value, $selected), |
|
164 | + 'selected' => in_array((string) $value, $selected), |
|
165 | 165 | ]); |
166 | 166 | |
167 | 167 | $html .= '<option ' . $option_attributes . '>' . e($option) . '</option>'; |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | break; |
483 | 483 | case self::Z_AXIS_SEX: |
484 | 484 | $z_axis = $this->axisSexes(); |
485 | - foreach(array_keys($z_axis) as $sex) { |
|
485 | + foreach (array_keys($z_axis) as $sex) { |
|
486 | 486 | $rows = $stats->statsAgeQuery(false, 'DEAT', $sex); |
487 | 487 | foreach ($rows as $row) { |
488 | 488 | foreach ($row as $age) { |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $z_axis = $this->axisAll(); |
593 | 593 | // The stats query doesn't have an "all" function, so query M/F/U separately |
594 | 594 | foreach (['M', 'F', 'U'] as $sex) { |
595 | - $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
595 | + $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
596 | 596 | $indi = []; |
597 | 597 | foreach ($rows as $row) { |
598 | 598 | if (!in_array($row['d_gid'], $indi)) { |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | case self::Z_AXIS_SEX: |
606 | 606 | $z_axis = $this->axisSexes(); |
607 | 607 | foreach (array_keys($z_axis) as $sex) { |
608 | - $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
608 | + $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
609 | 609 | $indi = []; |
610 | 610 | foreach ($rows as $row) { |
611 | 611 | if (!in_array($row['d_gid'], $indi)) { |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | // The stats query doesn't have an "all" function, so query M/F/U separately |
622 | 622 | foreach (['M', 'F', 'U'] as $sex) { |
623 | 623 | $prev_boundary = 0; |
624 | - $indi = []; |
|
624 | + $indi = []; |
|
625 | 625 | foreach (array_keys($z_axis) as $boundary) { |
626 | 626 | $rows = $stats->statsMarrAgeQuery(false, $sex, $prev_boundary, $boundary); |
627 | 627 | foreach ($rows as $row) { |
@@ -826,7 +826,8 @@ |
||
826 | 826 | * |
827 | 827 | * @return int|string |
828 | 828 | */ |
829 | - private function findAxisEntry($value, $axis) { |
|
829 | + private function findAxisEntry($value, $axis) |
|
830 | + { |
|
830 | 831 | if (is_numeric($value)) { |
831 | 832 | $value = (int) $value; |
832 | 833 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | </div> |
29 | 29 | <div id="card-tree-content-<?= $managed_tree->getTreeId() ?>" class="collapse<?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? ' show' : '' ?>" role="tabpanel" aria-labelledby="panel-tree-header-<?= $managed_tree->getTreeId() ?>"> |
30 | 30 | <div class="card-body"> |
31 | - <?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1" )->execute([$managed_tree->getTreeId()])->fetchOne() ?> |
|
31 | + <?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1")->execute([$managed_tree->getTreeId()])->fetchOne() ?> |
|
32 | 32 | <?php if ($importing): ?> |
33 | 33 | <div id="import<?= $managed_tree->getTreeId() ?>" class="col-xs-12"> |
34 | 34 | <div class="progress"> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | </label> |
75 | 75 | <div class="col-sm-9 wt-page-options-value"> |
76 | 76 | <?= FunctionsEdit::formControlIndividual($tree, $default_individual, ['id' => 'root-id', |
77 | - 'name' => 'root_id', 'aria-describedby' => 'root-id-description']) ?> |
|
77 | + 'name' => 'root_id', 'aria-describedby' => 'root-id-description']) ?> |
|
78 | 78 | <p class="small text-muted" id="root-id-description"> |
79 | 79 | <?= I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> |
80 | 80 | </p> |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | <?= Bootstrap4::select($themes, $user->getPreference('theme'), ['id' => 'theme', 'name' => 'theme', 'aria-describedby' => 'theme-description']) ?> |
150 | 150 | <p class="small text-muted" id="theme-description"> |
151 | 151 | <?= /* I18N: Help text for the "Default theme" site configuration setting */ |
152 | - I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> |
|
152 | + I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?> |
|
153 | 153 | </p> |
154 | 154 | </div> |
155 | 155 | </div> |
@@ -241,7 +241,7 @@ |
||
241 | 241 | ], |
242 | 242 | 'CEME' => [ |
243 | 243 | // CEME is NOT a valid 5.5.1 tag |
244 | - //'BURI', |
|
244 | + //'BURI', |
|
245 | 245 | ], |
246 | 246 | 'RELA' => [ |
247 | 247 | 'ASSO', |
@@ -840,9 +840,9 @@ |
||
840 | 840 | } |
841 | 841 | |
842 | 842 | foreach ([ |
843 | - 'main' => $main_blocks, |
|
844 | - 'side' => $side_blocks, |
|
845 | - ] as $location => $updated_blocks) { |
|
843 | + 'main' => $main_blocks, |
|
844 | + 'side' => $side_blocks, |
|
845 | + ] as $location => $updated_blocks) { |
|
846 | 846 | foreach ($updated_blocks as $block_order => $block_id) { |
847 | 847 | if (is_numeric($block_id)) { |
848 | 848 | // Updated block |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function treePageBlockEdit(Request $request, Tree $tree): Response |
48 | 48 | { |
49 | - $block_id = (int)$request->get('block_id'); |
|
49 | + $block_id = (int) $request->get('block_id'); |
|
50 | 50 | $block = $this->treeBlock($request); |
51 | 51 | $title = $block->getTitle() . ' — ' . I18N::translate('Preferences'); |
52 | 52 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function treePageBlockUpdate(Request $request, Tree $tree): RedirectResponse |
71 | 71 | { |
72 | - $block_id = (int)$request->get('block_id'); |
|
72 | + $block_id = (int) $request->get('block_id'); |
|
73 | 73 | $block = $this->treeBlock($request); |
74 | 74 | |
75 | 75 | $block->configureBlock($tree, $block_id); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | private function treeBlock(Request $request, User $user): ModuleBlockInterface |
89 | 89 | { |
90 | - $block_id = (int)$request->get('block_id'); |
|
90 | + $block_id = (int) $request->get('block_id'); |
|
91 | 91 | |
92 | 92 | $block_info = Database::prepare( |
93 | 93 | "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id" |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function userPageBlockEdit(Request $request, Tree $tree): Response |
124 | 124 | { |
125 | - $block_id = (int)$request->get('block_id'); |
|
125 | + $block_id = (int) $request->get('block_id'); |
|
126 | 126 | $block = $this->userBlock($request); |
127 | 127 | $title = $block->getTitle() . ' — ' . I18N::translate('Preferences'); |
128 | 128 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function userPageBlockUpdate(Request $request, Tree $tree): RedirectResponse |
147 | 147 | { |
148 | - $block_id = (int)$request->get('block_id'); |
|
148 | + $block_id = (int) $request->get('block_id'); |
|
149 | 149 | $block = $this->userBlock($request); |
150 | 150 | |
151 | 151 | $block->configureBlock($tree, $block_id); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | private function userBlock(Request $request, User $user): ModuleBlockInterface |
165 | 165 | { |
166 | - $block_id = (int)$request->get('block_id'); |
|
166 | + $block_id = (int) $request->get('block_id'); |
|
167 | 167 | |
168 | 168 | $block_info = Database::prepare( |
169 | 169 | "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id" |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | throw new NotFoundHttpException($block_info->module_name . ' is not a block'); |
182 | 182 | } |
183 | 183 | |
184 | - $block_owner_id = (int)$block_info->user_id; |
|
184 | + $block_owner_id = (int) $block_info->user_id; |
|
185 | 185 | |
186 | 186 | if ($block_owner_id !== $user->getUserId() && !Auth::isAdmin()) { |
187 | 187 | throw new AccessDeniedHttpException('You are not allowed to edit this block'); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | */ |
228 | 228 | public function treePageBlock(Request $request, Tree $tree): Response |
229 | 229 | { |
230 | - $block_id = (int)$request->get('block_id'); |
|
230 | + $block_id = (int) $request->get('block_id'); |
|
231 | 231 | |
232 | 232 | $block = Database::prepare( |
233 | 233 | "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id = :tree_id AND user_id IS NULL" |
@@ -293,8 +293,8 @@ discard block |
||
293 | 293 | */ |
294 | 294 | public function treePageDefaultUpdate(Request $request): RedirectResponse |
295 | 295 | { |
296 | - $main_blocks = (array)$request->get('main'); |
|
297 | - $side_blocks = (array)$request->get('side'); |
|
296 | + $main_blocks = (array) $request->get('main'); |
|
297 | + $side_blocks = (array) $request->get('side'); |
|
298 | 298 | |
299 | 299 | $this->updateTreeBlocks(-1, $main_blocks, $side_blocks); |
300 | 300 | |
@@ -338,14 +338,14 @@ discard block |
||
338 | 338 | */ |
339 | 339 | public function treePageUpdate(Request $request, Tree $tree): RedirectResponse |
340 | 340 | { |
341 | - $defaults = (bool)$request->get('defaults'); |
|
341 | + $defaults = (bool) $request->get('defaults'); |
|
342 | 342 | |
343 | 343 | if ($defaults) { |
344 | 344 | $main_blocks = $this->getBlocksForTreePage(-1, AUth::PRIV_NONE, 'main'); |
345 | 345 | $side_blocks = $this->getBlocksForTreePage(-1, Auth::PRIV_NONE, 'side'); |
346 | 346 | } else { |
347 | - $main_blocks = (array)$request->get('main'); |
|
348 | - $side_blocks = (array)$request->get('side'); |
|
347 | + $main_blocks = (array) $request->get('main'); |
|
348 | + $side_blocks = (array) $request->get('side'); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | $this->updateTreeBlocks($tree->getTreeId(), $main_blocks, $side_blocks); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | */ |
393 | 393 | public function userPageBlock(Request $request, Tree $tree, User $user): Response |
394 | 394 | { |
395 | - $block_id = (int)$request->get('block_id'); |
|
395 | + $block_id = (int) $request->get('block_id'); |
|
396 | 396 | |
397 | 397 | $block = Database::prepare( |
398 | 398 | "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id IS NULL AND user_id = :user_id" |
@@ -457,8 +457,8 @@ discard block |
||
457 | 457 | */ |
458 | 458 | public function userPageDefaultUpdate(Request $request): RedirectResponse |
459 | 459 | { |
460 | - $main_blocks = (array)$request->get('main'); |
|
461 | - $side_blocks = (array)$request->get('side'); |
|
460 | + $main_blocks = (array) $request->get('main'); |
|
461 | + $side_blocks = (array) $request->get('side'); |
|
462 | 462 | |
463 | 463 | $this->updateUserBlocks(-1, $main_blocks, $side_blocks); |
464 | 464 | |
@@ -504,14 +504,14 @@ discard block |
||
504 | 504 | */ |
505 | 505 | public function userPageUpdate(Request $request, Tree $tree, User $user): RedirectResponse |
506 | 506 | { |
507 | - $defaults = (bool)$request->get('defaults'); |
|
507 | + $defaults = (bool) $request->get('defaults'); |
|
508 | 508 | |
509 | 509 | if ($defaults) { |
510 | 510 | $main_blocks = $this->getBlocksForUserPage(-1, -1, AUth::PRIV_NONE, 'main'); |
511 | 511 | $side_blocks = $this->getBlocksForUserPage(-1, -1, Auth::PRIV_NONE, 'side'); |
512 | 512 | } else { |
513 | - $main_blocks = (array)$request->get('main'); |
|
514 | - $side_blocks = (array)$request->get('side'); |
|
513 | + $main_blocks = (array) $request->get('main'); |
|
514 | + $side_blocks = (array) $request->get('side'); |
|
515 | 515 | } |
516 | 516 | |
517 | 517 | $this->updateUserBlocks($user->getUserId(), $main_blocks, $side_blocks); |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | */ |
529 | 529 | public function userPageUserEdit(Request $request): Response |
530 | 530 | { |
531 | - $user_id = (int)$request->get('user_id'); |
|
531 | + $user_id = (int) $request->get('user_id'); |
|
532 | 532 | $user = User::find($user_id); |
533 | 533 | $main_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'main'); |
534 | 534 | $side_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'side'); |
@@ -557,9 +557,9 @@ discard block |
||
557 | 557 | */ |
558 | 558 | public function userPageUserUpdate(Request $request): RedirectResponse |
559 | 559 | { |
560 | - $user_id = (int)$request->get('user_id'); |
|
561 | - $main_blocks = (array)$request->get('main'); |
|
562 | - $side_blocks = (array)$request->get('side'); |
|
560 | + $user_id = (int) $request->get('user_id'); |
|
561 | + $main_blocks = (array) $request->get('main'); |
|
562 | + $side_blocks = (array) $request->get('side'); |
|
563 | 563 | |
564 | 564 | $this->updateUserBlocks($user_id, $main_blocks, $side_blocks); |
565 | 565 |
@@ -13,18 +13,18 @@ |
||
13 | 13 | <?= csrf_field() ?> |
14 | 14 | <ul class="fa-ul"> |
15 | 15 | <?php |
16 | - foreach ($entries as $entry) { |
|
17 | - if (in_array($entry, $protected)) { |
|
18 | - echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>'; |
|
19 | - } else { |
|
20 | - echo '<li><span class="fa-li">' . view('icons/delete') . '</span>'; |
|
21 | - echo '<label>'; |
|
22 | - echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> '; |
|
23 | - echo e($entry); |
|
24 | - echo '</label></li>'; |
|
25 | - } |
|
26 | - } |
|
27 | - ?> |
|
16 | + foreach ($entries as $entry) { |
|
17 | + if (in_array($entry, $protected)) { |
|
18 | + echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>'; |
|
19 | + } else { |
|
20 | + echo '<li><span class="fa-li">' . view('icons/delete') . '</span>'; |
|
21 | + echo '<label>'; |
|
22 | + echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> '; |
|
23 | + echo e($entry); |
|
24 | + echo '</label></li>'; |
|
25 | + } |
|
26 | + } |
|
27 | + ?> |
|
28 | 28 | </ul> |
29 | 29 | |
30 | 30 | <button class="btn btn-danger" type="submit"> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | <p> |
9 | 9 | <?= /* I18N: FAQ = “Frequently Asked Question” */ |
10 | - I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?> |
|
10 | + I18N::translate('FAQs are lists of questions and answers, which allow you to explain the site’s rules, policies, and procedures to your visitors. Questions are typically concerned with privacy, copyright, user-accounts, unsuitable content, requirement for source-citations, etc.') ?> |
|
11 | 11 | <?= I18N::translate('You may use HTML to format the answer and to add links to other websites.') ?> |
12 | 12 | </p> |
13 | 13 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <a href="<?= e(route('module', ['module' => 'faq', 'action' => 'AdminEdit', 'ged' => $tree->getName()])) ?>" class="btn btn-link"> |
29 | 29 | <?= view('icons/add') ?> |
30 | 30 | <?= /* I18N: FAQ = “Frequently Asked Question” */ |
31 | - I18N::translate('Add an FAQ') ?> |
|
31 | + I18N::translate('Add an FAQ') ?> |
|
32 | 32 | </a> |
33 | 33 | </p> |
34 | 34 |