@@ -157,7 +157,7 @@ |
||
157 | 157 | */ |
158 | 158 | public function getCount(Tree $tree, $page, $parameter): int |
159 | 159 | { |
160 | - return (int)Database::prepare( |
|
160 | + return (int) Database::prepare( |
|
161 | 161 | "SELECT page_count FROM `##hit_counter` WHERE gedcom_id = :tree_id AND page_name = :page AND page_parameter = :parameter" |
162 | 162 | )->execute([ |
163 | 163 | 'tree_id' => $tree->getTreeId(), |
@@ -9,14 +9,14 @@ |
||
9 | 9 | </a> |
10 | 10 | <?php endif ?> |
11 | 11 | |
12 | -<?php if($value): ?> |
|
12 | +<?php if ($value): ?> |
|
13 | 13 | <span> |
14 | 14 | <?= $value ?> |
15 | 15 | </span> |
16 | 16 | <?php endif ?> |
17 | 17 | |
18 | 18 | <div> |
19 | - <?php if($addtag): ?> |
|
19 | + <?php if ($addtag): ?> |
|
20 | 20 | <?= GedcomTag::getLabel('BIRT') ?>: |
21 | 21 | <?php endif ?> |
22 | 22 | <?= $date ?> |
@@ -9,14 +9,14 @@ |
||
9 | 9 | </a> |
10 | 10 | <?php endif ?> |
11 | 11 | |
12 | -<?php if($value): ?> |
|
12 | +<?php if ($value): ?> |
|
13 | 13 | <span> |
14 | 14 | <?= $value ?> |
15 | 15 | </span> |
16 | 16 | <?php endif ?> |
17 | 17 | |
18 | 18 | <div> |
19 | - <?php if($addtag): ?> |
|
19 | + <?php if ($addtag): ?> |
|
20 | 20 | <?= GedcomTag::getLabel('BIRT') ?>: |
21 | 21 | <?php endif ?> |
22 | 22 | <?= $date ?> |
@@ -342,9 +342,11 @@ |
||
342 | 342 | 'fqpn', |
343 | 343 | ]; |
344 | 344 | |
345 | - if ($serverfile !== '') { // first choice is file on server |
|
345 | + if ($serverfile !== '') { |
|
346 | +// first choice is file on server |
|
346 | 347 | $filename = WT_DATA_DIR . 'places/' . $serverfile; |
347 | - } elseif ($_FILES['localfile']['error'] === UPLOAD_ERR_OK) { // 2nd choice is local file |
|
348 | + } elseif ($_FILES['localfile']['error'] === UPLOAD_ERR_OK) { |
|
349 | +// 2nd choice is local file |
|
348 | 350 | $filename = $_FILES['localfile']['tmp_name']; |
349 | 351 | } |
350 | 352 |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $breadcrumbs[] = I18N::translate('Add'); |
107 | 107 | } else { |
108 | 108 | $breadcrumbs[] = I18N::translate('Edit'); |
109 | - $title .= ' — ' . I18N::translate('Edit'); |
|
109 | + $title .= ' — ' . I18N::translate('Edit'); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return $this->viewResponse('admin/location-edit', [ |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public function exportLocations(Request $request): Response |
242 | 242 | { |
243 | - $parent_id = (int)$request->get('parent_id'); |
|
243 | + $parent_id = (int) $request->get('parent_id'); |
|
244 | 244 | $format = $request->get('format'); |
245 | 245 | $maxlevel = (int) Database::prepare("SELECT max(pl_level) FROM `##placelocation`")->execute()->fetchOne(); |
246 | 246 | $startfqpn = []; |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | public function importLocations(Request $request): Response |
300 | 300 | { |
301 | - $parent_id = (int) $request->get('parent_id'); |
|
301 | + $parent_id = (int) $request->get('parent_id'); |
|
302 | 302 | |
303 | 303 | $files = array_merge( |
304 | 304 | glob(WT_DATA_DIR . 'places/*.csv'), |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | } |
352 | 352 | |
353 | 353 | if (is_file($filename)) { |
354 | - $string = file_get_contents($filename); |
|
354 | + $string = file_get_contents($filename); |
|
355 | 355 | |
356 | 356 | // Check the filetype |
357 | 357 | if (stripos($string, 'FeatureCollection') !== false) { |
@@ -401,10 +401,10 @@ discard block |
||
401 | 401 | usort( |
402 | 402 | $places, |
403 | 403 | function (array $a, array $b) { |
404 | - if ((int)$a['pl_level'] === (int)$b['pl_level']) { |
|
404 | + if ((int) $a['pl_level'] === (int) $b['pl_level']) { |
|
405 | 405 | return I18N::strcasecmp($a['fqpn'], $b['fqpn']); |
406 | 406 | } else { |
407 | - return (int)$a['pl_level'] - (int)$b['pl_level']; |
|
407 | + return (int) $a['pl_level'] - (int) $b['pl_level']; |
|
408 | 408 | } |
409 | 409 | } |
410 | 410 | ); |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | "INSERT INTO `##placelocation` (pl_id, pl_parent_id, pl_level, pl_place)" . |
522 | 522 | " VALUES (:id, :parent, :level, :place)" |
523 | 523 | ); |
524 | - $checkRecordQry = Database::prepare( |
|
524 | + $checkRecordQry = Database::prepare( |
|
525 | 525 | "SELECT pl1.pl_id" . |
526 | 526 | " FROM `##placelocation` AS pl1" . |
527 | 527 | " LEFT JOIN `##placelocation` AS pl2 ON (pl1.pl_parent_id = pl2.pl_id)" . |
@@ -377,7 +377,7 @@ |
||
377 | 377 | |
378 | 378 | // convert separate place fields into a comma separated placename |
379 | 379 | $fqdn = implode(Place::GEDCOM_SEPARATOR, array_filter(array_reverse( |
380 | - \array_slice($row, 1, $fields - 5)))); |
|
380 | + \array_slice($row, 1, $fields - 5)))); |
|
381 | 381 | |
382 | 382 | $places[] = [ |
383 | 383 | 'pl_level' => $row[0], |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | </legend> |
56 | 56 | <div class="col-sm-8"> |
57 | 57 | <?= Bootstrap4::radioButtons( |
58 | - 'cleardatabase', |
|
59 | - [I18N::translate('no'), I18N::translate('yes')], |
|
60 | - '0', |
|
61 | - true |
|
62 | - ) ?> |
|
58 | + 'cleardatabase', |
|
59 | + [I18N::translate('no'), I18N::translate('yes')], |
|
60 | + '0', |
|
61 | + true |
|
62 | + ) ?> |
|
63 | 63 | </div> |
64 | 64 | </div> |
65 | 65 | </fieldset> |
@@ -72,14 +72,14 @@ discard block |
||
72 | 72 | </legend> |
73 | 73 | <div class="col-sm-8"> |
74 | 74 | <?= Bootstrap4::select( |
75 | - [ |
|
76 | - 'addupdate' => I18N::translate('Add new, and update existing records'), |
|
77 | - 'add' => I18N::translate('Only add new records'), |
|
78 | - 'update' => I18N::translate('Only update existing records'), |
|
79 | - ], |
|
80 | - '0', |
|
81 | - ['id' => 'import-options', 'name' => 'import-options'] |
|
82 | - ) ?> |
|
75 | + [ |
|
76 | + 'addupdate' => I18N::translate('Add new, and update existing records'), |
|
77 | + 'add' => I18N::translate('Only add new records'), |
|
78 | + 'update' => I18N::translate('Only update existing records'), |
|
79 | + ], |
|
80 | + '0', |
|
81 | + ['id' => 'import-options', 'name' => 'import-options'] |
|
82 | + ) ?> |
|
83 | 83 | </div> |
84 | 84 | </div> |
85 | 85 | </fieldset> |
@@ -23,7 +23,7 @@ |
||
23 | 23 | </div> |
24 | 24 | <select id="serverfile" name="serverfile" class="form-control"> |
25 | 25 | <option selected value=""></option> |
26 | - <?php foreach($files as $file): ?> |
|
26 | + <?php foreach ($files as $file): ?> |
|
27 | 27 | <option value="<?= e($file) ?>"> |
28 | 28 | <?= e($file) ?> |
29 | 29 | </option> |
@@ -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 ?> |
@@ -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', |