@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $this->checkModuleIsActive($tree, 'descendancy_chart'); |
103 | 103 | |
104 | - $xref = $request->get('xref'); |
|
104 | + $xref = $request->get('xref'); |
|
105 | 105 | $individual = Individual::getInstance($xref, $tree); |
106 | 106 | |
107 | 107 | $this->checkIndividualAccess($individual); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $descendants = $this->descendants($individual, $generations, []); |
120 | 120 | |
121 | - switch($chart_style) { |
|
121 | + switch ($chart_style) { |
|
122 | 122 | case self::CHART_STYLE_LIST: |
123 | 123 | default: |
124 | 124 | return $this->descendantsList($individual, $generations); |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | * @return Response |
316 | 316 | */ |
317 | 317 | private function descendantsFamilies(Tree $tree, array $descendants): Response { |
318 | - $families = []; |
|
318 | + $families = []; |
|
319 | 319 | foreach ($descendants as $individual) { |
320 | 320 | foreach ($individual->getChildFamilies() as $family) { |
321 | 321 | $families[$family->getXref()] = $family; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $count_media = Database::prepare( |
15 | 15 | "SELECT l_to, COUNT(*) FROM `##media` JOIN `##link` ON l_from = m_id AND l_file = m_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" |
16 | 16 | )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); |
17 | -$count_sources = Database::prepare( |
|
17 | +$count_sources = Database::prepare( |
|
18 | 18 | "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" |
19 | 19 | )->execute(['tree_id' => $tree->getTreeId()])->fetchAssoc(); |
20 | 20 | ?> |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | $chart_url .= '|1:||' . rawurlencode(I18N::percentage($vmax / $count)); // y axis |
26 | 26 | $chart_url .= '|2:||'; |
27 | -$step = $vmax; |
|
27 | +$step = $vmax; |
|
28 | 28 | for ($d = $vmax; $d > 0; $d--) { |
29 | 29 | if ($vmax < ($d * 10 + 1) && ($vmax % $d) == 0) { |
30 | 30 | $step = $d; |
@@ -43,14 +43,14 @@ |
||
43 | 43 | <?php endforeach ?> |
44 | 44 | </td> |
45 | 45 | |
46 | - <td class="text-center" data-sort="<?= array_sum(array_map(function(array $x) { return count($x); }, $surns)) ?>"> |
|
46 | + <td class="text-center" data-sort="<?= array_sum(array_map(function (array $x) { return count($x); }, $surns)) ?>"> |
|
47 | 47 | <?php foreach ($surns as $indis): ?> |
48 | 48 | <?= I18N::number(count($indis)) ?> |
49 | 49 | <br> |
50 | 50 | <?php endforeach ?> |
51 | 51 | |
52 | 52 | <?php if (count($surns) > 1): ?> |
53 | - <?= I18N::number(array_sum(array_map(function(array $x) { return count($x); }, $surns))) ?> |
|
53 | + <?= I18N::number(array_sum(array_map(function (array $x) { return count($x); }, $surns))) ?> |
|
54 | 54 | <?php endif ?> |
55 | 55 | </td> |
56 | 56 | </tr> |
@@ -12,7 +12,8 @@ discard block |
||
12 | 12 | <th> |
13 | 13 | <?php if ($route == 'family-list'):?> |
14 | 14 | <?= I18N::translate('Spouses') ?> |
15 | - <?php else: ?> |
|
15 | + <?php else { |
|
16 | + : ?> |
|
16 | 17 | <?= I18N::translate('Individuals') ?> |
17 | 18 | <?php endif ?> |
18 | 19 | </th> |
@@ -43,7 +44,9 @@ discard block |
||
43 | 44 | <?php endforeach ?> |
44 | 45 | </td> |
45 | 46 | |
46 | - <td class="text-center" data-sort="<?= array_sum(array_map(function(array $x) { return count($x); }, $surns)) ?>"> |
|
47 | + <td class="text-center" data-sort="<?= array_sum(array_map(function(array $x) { return count($x); |
|
48 | +} |
|
49 | +}, $surns)) ?>"> |
|
47 | 50 | <?php foreach ($surns as $indis): ?> |
48 | 51 | <?= I18N::number(count($indis)) ?> |
49 | 52 | <br> |
@@ -319,8 +319,11 @@ |
||
319 | 319 | <?php if (!isset($unique_indis[$individual->getXref()]) && $age_at_death >= 0 && $age_at_death <= $max_age): ?> |
320 | 320 | <?php $deat_by_age[$age_at_death] .= $individual->getSex(); ?> |
321 | 321 | <?php endif ?> |
322 | - <?php else: ?> |
|
323 | - <?php $age_at_death = ''; ?> |
|
322 | + <?php else { |
|
323 | + : ?> |
|
324 | + <?php $age_at_death = ''; |
|
325 | +} |
|
326 | +?> |
|
324 | 327 | <?php $age_at_death_sort = PHP_INT_MAX; ?> |
325 | 328 | <?php endif ?> |
326 | 329 | <td class="center" data-sort="<?= e($age_at_death_sort) ?>"> |
@@ -200,7 +200,8 @@ discard block |
||
200 | 200 | <div class="tab-pane fade show active" role="tabpanel" id="individuals"> |
201 | 201 | <?php if (empty($myindilist)): ?> |
202 | 202 | <p><?= I18N::translate('No results found.') ?></p> |
203 | - <?php else: ?> |
|
203 | + <?php else { |
|
204 | + : ?> |
|
204 | 205 | <?= view('lists/individuals-table', ['individuals' => $myindilist, 'sosa' => false, 'tree' => $WT_TREE]) ?> |
205 | 206 | <?php endif ?> |
206 | 207 | </div> |
@@ -216,6 +217,7 @@ discard block |
||
216 | 217 | <?php |
217 | 218 | } |
218 | 219 | echo '<h4><a href="placelist.php?display=list">', I18N::translate('Show all places in a list'), '</a></h4>'; |
220 | +} |
|
219 | 221 | |
220 | 222 | if ($gm_module && $gm_module->getPreference('GM_PLACE_HIERARCHY')) { |
221 | 223 | $gm_module->mapScripts($numfound, $level, $parent, $linklevels, $place_names); |
@@ -8,13 +8,13 @@ |
||
8 | 8 | |
9 | 9 | <?php if ($source->isPendingDeletion()): ?> |
10 | 10 | <?php if (Auth::isModerator($source->getTree())): ?> |
11 | - <?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This source 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($source->getXref()) . '\', \'' . e($source->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($source->getXref()) . '\', \'' . e($source->getTree()->getName()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
11 | + <?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This source 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($source->getXref()) . '\', \'' . e($source->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($source->getXref()) . '\', \'' . e($source->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($source->getTree())): ?> |
13 | 13 | <?= view('alerts/warning-dissmissible', ['alert' => I18N::translate('This source 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 ($source->isPendingAddition()): ?> |
16 | 16 | <?php if (Auth::isModerator($source->getTree())): ?> |
17 | - <?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate( 'This source 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($source->getXref()) . '\', \'' . e($source->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(\'' . $source->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>' ) . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
|
17 | + <?= view('alerts/warning-dissmissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This source 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($source->getXref()) . '\', \'' . e($source->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(\'' . $source->getXref() . '\');">' . 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($source->getTree())): ?> |
19 | 19 | <?= view('alerts/warning-dissmissible', ['alert' => I18N::translate('This source has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
20 | 20 | <?php endif ?> |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | public function updateRecord(GedcomRecord $record): string { |
70 | 70 | $old_gedcom = $record->getGedcom(); |
71 | - $tree = $record->getTree(); |
|
71 | + $tree = $record->getTree(); |
|
72 | 72 | |
73 | 73 | $SURNAME_TRADITION = $tree->getPreference('SURNAME_TRADITION'); |
74 | 74 |
@@ -173,7 +173,7 @@ |
||
173 | 173 | /** @var Tree $tree */ |
174 | 174 | $tree = $request->attributes->get('tree'); |
175 | 175 | |
176 | - $q = $request->get('q'); |
|
176 | + $q = $request->get('q'); |
|
177 | 177 | $instance = $request->get('instance'); |
178 | 178 | $treeview = new TreeView($instance); |
179 | 179 |