@@ -770,13 +770,15 @@ |
||
| 770 | 770 | <p> |
| 771 | 771 | <?php if ($ucnt): ?> |
| 772 | 772 | <input type="submit" value="<?= I18N::translate('delete') ?>"> |
| 773 | - <?php else: ?> |
|
| 773 | + <?php else { |
|
| 774 | + : ?> |
|
| 774 | 775 | <?= I18N::translate('Nothing found to cleanup') ?> |
| 775 | 776 | <?php endif ?> |
| 776 | 777 | </p> |
| 777 | 778 | </form> |
| 778 | 779 | <?php |
| 779 | 780 | break; |
| 781 | +} |
|
| 780 | 782 | |
| 781 | 783 | case 'cleanup2': |
| 782 | 784 | foreach (User::all() as $user) { |
@@ -235,7 +235,8 @@ discard block |
||
| 235 | 235 | <?php // Reset - otherwise we might "undo all changes", which refreshes the ?> |
| 236 | 236 | <?php // page, which makes them all again! ?> |
| 237 | 237 | <script>reset_reload();</script> |
| 238 | - <?php else: ?> |
|
| 238 | + <?php else { |
|
| 239 | + : ?> |
|
| 239 | 240 | <hr> |
| 240 | 241 | <div id="batch_update2" class="col-sm-12"> |
| 241 | 242 | <?php if ($this->curr_xref): ?> |
@@ -273,6 +274,7 @@ discard block |
||
| 273 | 274 | foreach (array_keys($this->all_xrefs) as $key) { |
| 274 | 275 | if ($key > $xref) { |
| 275 | 276 | $record = self::getLatestRecord($key, $this->all_xrefs[$key]); |
| 277 | +} |
|
| 276 | 278 | if ($this->PLUGIN->doesRecordNeedUpdate($key, $record)) { |
| 277 | 279 | return $key; |
| 278 | 280 | } |
@@ -382,7 +382,8 @@ discard block |
||
| 382 | 382 | <a href="<?= e($individual->url()) ?>#tab-stories"> |
| 383 | 383 | <?= $individual->getFullName() ?> |
| 384 | 384 | </a> |
| 385 | - <?php else: ?> |
|
| 385 | + <?php else { |
|
| 386 | + : ?> |
|
| 386 | 387 | <?= $story->xref ?> |
| 387 | 388 | <?php endif ?> |
| 388 | 389 | </td> |
@@ -411,6 +412,7 @@ discard block |
||
| 411 | 412 | */ |
| 412 | 413 | private function showList() { |
| 413 | 414 | global $controller, $WT_TREE; |
| 415 | +} |
|
| 414 | 416 | |
| 415 | 417 | $controller = new PageController; |
| 416 | 418 | $controller |
@@ -3,9 +3,12 @@ |
||
| 3 | 3 | |
| 4 | 4 | <?php if ($summary !== ''): ?> |
| 5 | 5 | <span class="details_label"><?= $summary ?></span> |
| 6 | -<?php else: ?> |
|
| 6 | +<?php else { |
|
| 7 | + : ?> |
|
| 7 | 8 | <?php foreach ($facts as $fact): ?> |
| 8 | - <?php $record = $fact->getParent(); ?> |
|
| 9 | + <?php $record = $fact->getParent(); |
|
| 10 | +} |
|
| 11 | +?> |
|
| 9 | 12 | <a href="<?= e($record->url()) ?>" class="list_item name2"> |
| 10 | 13 | <?= $record->getFullName() ?> |
| 11 | 14 | </a> |
@@ -111,24 +111,24 @@ |
||
| 111 | 111 | * @return Individual[] |
| 112 | 112 | */ |
| 113 | 113 | protected function allAncestors(Individual $individual): array { |
| 114 | - /** @var Individual[] $ancestors */ |
|
| 115 | - $ancestors = [ |
|
| 116 | - 1 => $individual, |
|
| 117 | - ]; |
|
| 114 | + /** @var Individual[] $ancestors */ |
|
| 115 | + $ancestors = [ |
|
| 116 | + 1 => $individual, |
|
| 117 | + ]; |
|
| 118 | 118 | |
| 119 | - do { |
|
| 120 | - $sosa = key($ancestors); |
|
| 119 | + do { |
|
| 120 | + $sosa = key($ancestors); |
|
| 121 | 121 | |
| 122 | 122 | $family = $ancestors[$sosa]->getPrimaryChildFamily(); |
| 123 | 123 | |
| 124 | 124 | if ($family !== null) { |
| 125 | - if ($family->getHusband() !== null) { |
|
| 126 | - $ancestors[$sosa * 2] = $family->getHusband(); |
|
| 127 | - } |
|
| 128 | - if ($family->getWife() !== null) { |
|
| 129 | - $ancestors[$sosa * 2 + 1] = $family->getWife(); |
|
| 130 | - } |
|
| 131 | - } |
|
| 125 | + if ($family->getHusband() !== null) { |
|
| 126 | + $ancestors[$sosa * 2] = $family->getHusband(); |
|
| 127 | + } |
|
| 128 | + if ($family->getWife() !== null) { |
|
| 129 | + $ancestors[$sosa * 2 + 1] = $family->getWife(); |
|
| 130 | + } |
|
| 131 | + } |
|
| 132 | 132 | } while (next($ancestors)); |
| 133 | 133 | |
| 134 | 134 | return $ancestors; |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | |
| 6 | 6 | <?= view('admin/breadcrumbs', [ |
| 7 | 7 | 'links' => [route('admin-control-panel') => I18N::translate('Control panel'), |
| 8 | - route('admin-modules') => I18N::translate('Module administration'), |
|
| 8 | + route('admin-modules') => I18N::translate('Module administration'), |
|
| 9 | 9 | $title |
| 10 | 10 | ]]) ?> |
| 11 | 11 | |
@@ -21,13 +21,13 @@ |
||
| 21 | 21 | <div class="center"> |
| 22 | 22 | <?php if ($showeventslink): ?> |
| 23 | 23 | <a class="formField" href= <?= e(route('place-hierarchy', |
| 24 | - ['ged' => $tree->getName(), 'parent' => $parent, 'action' => 'hierarchy-e'] |
|
| 25 | - ) |
|
| 26 | - ) ?>><?= I18N::translate('View table of events occurring in %s', $place) ?></a> |
|
| 24 | + ['ged' => $tree->getName(), 'parent' => $parent, 'action' => 'hierarchy-e'] |
|
| 25 | + ) |
|
| 26 | + ) ?>><?= I18N::translate('View table of events occurring in %s', $place) ?></a> |
|
| 27 | 27 | | |
| 28 | 28 | <?php endif ?> |
| 29 | 29 | <a href="<?= e(route('place-hierarchy', ['ged' => $tree->getName(), 'action' => key($nextaction)])) |
| 30 | - ?>"><?= current($nextaction) ?></a> |
|
| 30 | + ?>"><?= current($nextaction) ?></a> |
|
| 31 | 31 | </div> |
| 32 | 32 | </div> |
| 33 | 33 | </div> |
@@ -6,10 +6,10 @@ |
||
| 6 | 6 | |
| 7 | 7 | <h3><?= $title ?></h3> |
| 8 | 8 | <form id="upload_form" method="post" enctype="multipart/form-data" action="<?= |
| 9 | - e(route('admin-module',[ |
|
| 10 | - 'module' => $module, |
|
| 11 | - 'action' => 'AdminImport', |
|
| 12 | - ])) ?>"> |
|
| 9 | + e(route('admin-module',[ |
|
| 10 | + 'module' => $module, |
|
| 11 | + 'action' => 'AdminImport', |
|
| 12 | + ])) ?>"> |
|
| 13 | 13 | <?= csrf_field() ?> |
| 14 | 14 | <input type="hidden" name="parent_id" value="<?= $parent_id ?>"> |
| 15 | 15 | <input type="hidden" name="inactive" value="<?= $inactive ?>"> |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | </div> |
| 20 | 20 | <form method="POST" |
| 21 | 21 | action="<?=e(route('admin-module', |
| 22 | - ['module' => $module, 'action' => 'AdminPlaces', 'parent_id' => $parent_id])) ?>"> |
|
| 22 | + ['module' => $module, 'action' => 'AdminPlaces', 'parent_id' => $parent_id])) ?>"> |
|
| 23 | 23 | |
| 24 | 24 | <?= csrf_field() ?> |
| 25 | 25 | <?= Bootstrap4::checkbox( |
@@ -54,12 +54,12 @@ discard block |
||
| 54 | 54 | <tr> |
| 55 | 55 | <td> |
| 56 | 56 | <a href="<?= e(route('admin-module', |
| 57 | - ['module' => $module, |
|
| 58 | - 'action' => 'AdminPlaces', |
|
| 59 | - 'parent_id' => $place->pl_id, |
|
| 60 | - 'inactive' => $inactive] |
|
| 61 | - ) |
|
| 62 | - ) ?>"> |
|
| 57 | + ['module' => $module, |
|
| 58 | + 'action' => 'AdminPlaces', |
|
| 59 | + 'parent_id' => $place->pl_id, |
|
| 60 | + 'inactive' => $inactive] |
|
| 61 | + ) |
|
| 62 | + ) ?>"> |
|
| 63 | 63 | <?= e($place->pl_place) ?> |
| 64 | 64 | <span class="badge badge-pill badge-<?= $place->badge ?>"> |
| 65 | 65 | <?= I18N::number($place->child_count) ?> |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | </td> |
| 69 | 69 | <td> |
| 70 | 70 | <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : |
| 71 | - strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> |
|
| 71 | + strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> |
|
| 72 | 72 | </td> |
| 73 | 73 | <td> |
| 74 | 74 | <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : |
| 75 | - strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> |
|
| 75 | + strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> |
|
| 76 | 76 | </td> |
| 77 | 77 | <td> |
| 78 | 78 | <?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?> |