@@ -8,13 +8,13 @@ |
||
| 8 | 8 | |
| 9 | 9 | <?php if ($media->isPendingDeletion()): ?> |
| 10 | 10 | <?php if (Auth::isModerator($media->getTree())): ?> |
| 11 | - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This media object has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 11 | + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 12 | 12 | <?php elseif (Auth::isEditor($media->getTree())): ?> |
| 13 | 13 | <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This media object has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
| 14 | 14 | <?php endif ?> |
| 15 | 15 | <?php elseif ($media->isPendingAddition()): ?> |
| 16 | 16 | <?php if (Auth::isModerator($media->getTree())): ?> |
| 17 | - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This media object has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>' ) . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 17 | + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This media object has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($media->getXref()) . '\', \'' . e($media->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 18 | 18 | <?php elseif (Auth::isEditor($media->getTree())): ?> |
| 19 | 19 | <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This media object has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
| 20 | 20 | <?php endif ?> |
@@ -7,13 +7,13 @@ |
||
| 7 | 7 | |
| 8 | 8 | <?php if ($record->isPendingDeletion()): ?> |
| 9 | 9 | <?php if (Auth::isModerator($record->getTree())): ?> |
| 10 | - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 10 | + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 11 | 11 | <?php elseif (Auth::isEditor($record->getTree())): ?> |
| 12 | 12 | <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
| 13 | 13 | <?php endif ?> |
| 14 | 14 | <?php elseif ($record->isPendingAddition()): ?> |
| 15 | 15 | <?php if (Auth::isModerator($record->getTree())): ?> |
| 16 | - <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>' ) . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 16 | + <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" onclick="accept_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->getXref()) . '\', \'' . e($record->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
| 17 | 17 | <?php elseif (Auth::isEditor($record->getTree())): ?> |
| 18 | 18 | <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
| 19 | 19 | <?php endif ?> |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | <button type="submit" class="btn btn-primary"> |
| 27 | 27 | <?= view('icons/save') ?> |
| 28 | 28 | <?= /* I18N: A button label. */ |
| 29 | - I18N::translate('continue') ?> |
|
| 29 | + I18N::translate('continue') ?> |
|
| 30 | 30 | </button> |
| 31 | 31 | |
| 32 | 32 | <?= I18N::translate('Caution! This may take a long time. Be patient.') ?> |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | </label> |
| 26 | 26 | <div class="col-sm-9 wt-page-options-value"> |
| 27 | 27 | <?= |
| 28 | - Bootstrap4::select( |
|
| 29 | - FunctionsEdit::numericOptions(range(2, $maxgenerations)), |
|
| 30 | - $generations, |
|
| 31 | - ['id' => 'generations', 'name' => 'generations'] |
|
| 32 | - ) |
|
| 33 | - ?> |
|
| 28 | + Bootstrap4::select( |
|
| 29 | + FunctionsEdit::numericOptions(range(2, $maxgenerations)), |
|
| 30 | + $generations, |
|
| 31 | + ['id' => 'generations', 'name' => 'generations'] |
|
| 32 | + ) |
|
| 33 | + ?> |
|
| 34 | 34 | </div> |
| 35 | 35 | </div> |
| 36 | 36 | |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | <div class="col-sm-3 wt-page-options-label"></div> |
| 39 | 39 | <div class="col-sm-9 wt-page-options-value"> |
| 40 | 40 | <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ |
| 41 | - I18N::translate('view') |
|
| 42 | - ?>"> |
|
| 41 | + I18N::translate('view') |
|
| 42 | + ?>"> |
|
| 43 | 43 | </div> |
| 44 | 44 | </div> |
| 45 | 45 | </form> |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $note = false; |
| 61 | 61 | |
| 62 | 62 | if ($showmap) { |
| 63 | - $note = true; |
|
| 63 | + $note = true; |
|
| 64 | 64 | $content .= view('place-map', [ |
| 65 | 65 | 'module' => self::MAP_MODULE, |
| 66 | 66 | 'ref' => $fqpn, |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | switch ($action) { |
| 73 | 73 | case 'list': |
| 74 | 74 | $nextaction = ['hierarchy' => I18N::translate('Show place hierarchy')]; |
| 75 | - $content .= view('place-list', $this->getList($tree)); |
|
| 75 | + $content .= view('place-list', $this->getList($tree)); |
|
| 76 | 76 | break; |
| 77 | 77 | case 'hierarchy': |
| 78 | 78 | case 'hierarchy-e': |
| 79 | 79 | $nextaction = ['list' => I18N::translate('Show all places in a list')]; |
| 80 | 80 | $data = $this->getHierarchy($tree, $place, $parent); |
| 81 | - $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
| 81 | + $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
| 82 | 82 | if (null === $data || $action === 'hierarchy-e') { |
| 83 | 83 | $content .= view('place-events', $this->getEvents($tree, $place)); |
| 84 | 84 | } |
@@ -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)" . |