@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | |
232 | 232 | // Create a source, to indicate the source of the data. |
233 | 233 | $filetext .= "0 @WEBTREES@ SOUR\n1 TITL " . WT_BASE_URL . "\n"; |
234 | - $author = User::find($tree->getPreference('CONTACT_EMAIL')); |
|
234 | + $author = User::find($tree->getPreference('CONTACT_EMAIL')); |
|
235 | 235 | if ($author !== null) { |
236 | 236 | $filetext .= '1 AUTH ' . $author->getRealName() . "\n"; |
237 | 237 | } |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | |
609 | 609 | $xref = $request->get('xref'); |
610 | 610 | |
611 | - $media = Media::getInstance($xref, $tree); |
|
611 | + $media = Media::getInstance($xref, $tree); |
|
612 | 612 | |
613 | 613 | if ($media === null) { |
614 | 614 | throw new NotFoundHttpException; |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | /** @var Tree $tree */ |
650 | 650 | $tree = $request->attributes->get('tree'); |
651 | 651 | |
652 | - $xref = $request->get('xref'); |
|
652 | + $xref = $request->get('xref'); |
|
653 | 653 | |
654 | 654 | $media = Media::getInstance($xref, $tree); |
655 | 655 | |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | |
674 | 674 | $xref = $request->get('xref'); |
675 | 675 | |
676 | - $note = Note::getInstance($xref, $tree); |
|
676 | + $note = Note::getInstance($xref, $tree); |
|
677 | 677 | |
678 | 678 | if ($note === null) { |
679 | 679 | throw new NotFoundHttpException; |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | /** @var Tree $tree */ |
715 | 715 | $tree = $request->attributes->get('tree'); |
716 | 716 | |
717 | - $xref = $request->get('xref'); |
|
717 | + $xref = $request->get('xref'); |
|
718 | 718 | |
719 | 719 | $note = Note::getInstance($xref, $tree); |
720 | 720 | |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | |
739 | 739 | $xref = $request->get('xref'); |
740 | 740 | |
741 | - $repository = Repository::getInstance($xref, $tree); |
|
741 | + $repository = Repository::getInstance($xref, $tree); |
|
742 | 742 | |
743 | 743 | if ($repository === null) { |
744 | 744 | throw new NotFoundHttpException; |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | /** @var Tree $tree */ |
780 | 780 | $tree = $request->attributes->get('tree'); |
781 | 781 | |
782 | - $xref = $request->get('xref'); |
|
782 | + $xref = $request->get('xref'); |
|
783 | 783 | |
784 | 784 | $repository = Repository::getInstance($xref, $tree); |
785 | 785 | |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | |
804 | 804 | $xref = $request->get('xref'); |
805 | 805 | |
806 | - $source = Source::getInstance($xref, $tree); |
|
806 | + $source = Source::getInstance($xref, $tree); |
|
807 | 807 | |
808 | 808 | if ($source === null) { |
809 | 809 | throw new NotFoundHttpException; |
@@ -889,7 +889,7 @@ discard block |
||
889 | 889 | $records = array_filter($records); |
890 | 890 | |
891 | 891 | // Group and sort. |
892 | - uasort($records, function(GedcomRecord $x, GedcomRecord $y) { |
|
892 | + uasort($records, function (GedcomRecord $x, GedcomRecord $y) { |
|
893 | 893 | return $x::RECORD_TYPE <=> $y::RECORD_TYPE ?: GedcomRecord::compare($x, $y); |
894 | 894 | }); |
895 | 895 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | echo view('cards/add-source-citation', [ |
94 | 94 | 'level' => 2, |
95 | 95 | 'full_citations' => $controller->tree()->getPreference('FULL_SOURCES'), |
96 | - ]); } |
|
96 | + ]); } |
|
97 | 97 | if ($level1type !== 'OBJE') { |
98 | 98 | if ($controller->tree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($controller->tree())) { |
99 | 99 | echo view('cards/add-media-object', [ |
@@ -223,7 +223,7 @@ |
||
223 | 223 | /** @var Tree $tree */ |
224 | 224 | $tree = $request->attributes->get('tree'); |
225 | 225 | |
226 | - $xref = $request->get('xref', ''); |
|
226 | + $xref = $request->get('xref', ''); |
|
227 | 227 | |
228 | 228 | $individual = Individual::getInstance($xref, $tree); |
229 | 229 |
@@ -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; |
@@ -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 |