@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $recursion = (int) $request->get('recursion', '0'); |
106 | 106 | $ancestors = (bool) $request->get('ancestors', '0'); |
107 | 107 | |
108 | - $max_recursion = (int) $tree->getPreference('RELATIONSHIP_RECURSION', RelationshipsChartModule::DEFAULT_RECURSION); |
|
108 | + $max_recursion = (int) $tree->getPreference('RELATIONSHIP_RECURSION', RelationshipsChartModule::DEFAULT_RECURSION); |
|
109 | 109 | |
110 | 110 | $recursion = min($recursion, $max_recursion); |
111 | 111 | |
@@ -153,14 +153,14 @@ discard block |
||
153 | 153 | case 'sis': |
154 | 154 | case 'sib': |
155 | 155 | $table[$x + 1][$y] = '<div style="background:url(' . Theme::theme()->parameter('image-hline') . ') repeat-x center; width: 94px; text-align: center"><div class="hline-text" style="height: 32px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px;">' . FontAwesome::decorativeIcon('arrow-end') . '</div></div>'; |
156 | - $x += 2; |
|
156 | + $x += 2; |
|
157 | 157 | break; |
158 | 158 | case 'son': |
159 | 159 | case 'dau': |
160 | 160 | case 'chi': |
161 | 161 | if ($n > 2 && preg_match('/fat|mot|par/', $relationships[$n - 2])) { |
162 | 162 | $table[$x + 1][$y - 1] = '<div style="background:url(' . $diagonal2 . '); width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: end;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: start;">' . FontAwesome::decorativeIcon('arrow-down') . '</div></div>'; |
163 | - $x += 2; |
|
163 | + $x += 2; |
|
164 | 164 | } else { |
165 | 165 | $table[$x][$y - 1] = '<div style="background:url(' . Theme::theme() |
166 | 166 | ->parameter('image-vline') . ') repeat-y center; height: 64px; text-align: center;"><div class="vline-text" style="display: inline-block; width:50%; line-height: 64px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width:50%; line-height: 64px;">' . FontAwesome::decorativeIcon('arrow-down') . '</div></div>'; |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | case 'par': |
173 | 173 | if ($n > 2 && preg_match('/son|dau|chi/', $relationships[$n - 2])) { |
174 | 174 | $table[$x + 1][$y + 1] = '<div style="background:url(' . $diagonal1 . '); background-position: top right; width: 64px; height: 64px; text-align: center;"><div style="height: 32px; text-align: start;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="height: 32px; text-align: end;">' . FontAwesome::decorativeIcon('arrow-down') . '</div></div>'; |
175 | - $x += 2; |
|
175 | + $x += 2; |
|
176 | 176 | } else { |
177 | 177 | $table[$x][$y + 1] = '<div style="background:url(' . Theme::theme() |
178 | 178 | ->parameter('image-vline') . ') repeat-y center; height: 64px; text-align:center; "><div class="vline-text" style="display: inline-block; width: 50%; line-height: 32px;">' . Functions::getRelationshipNameFromPath($relationships[$n], Individual::getInstance($path[$n - 1], $tree), Individual::getInstance($path[$n + 1], $tree)) . '</div><div style="display: inline-block; width: 50%; line-height: 32px">' . FontAwesome::decorativeIcon('arrow-up') . '</div></div>'; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * You should have received a copy of the GNU General Public License |
14 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | */ |
16 | -declare(strict_types = 1); |
|
16 | +declare(strict_types=1); |
|
17 | 17 | |
18 | 18 | namespace Fisharebest\Webtrees; |
19 | 19 |
@@ -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 ?> |
@@ -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 ?> |
@@ -67,12 +67,10 @@ discard block |
||
67 | 67 | </a> |
68 | 68 | </td> |
69 | 69 | <td> |
70 | - <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : |
|
71 | - strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> |
|
70 | + <?= ($place->pl_lati === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> |
|
72 | 71 | </td> |
73 | 72 | <td> |
74 | - <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : |
|
75 | - strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> |
|
73 | + <?= ($place->pl_long === null) ? FontAwesome::decorativeIcon('warning') : strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> |
|
76 | 74 | </td> |
77 | 75 | <td> |
78 | 76 | <?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?> |
@@ -194,7 +192,7 @@ discard block |
||
194 | 192 | </tfoot> |
195 | 193 | </table> |
196 | 194 | |
197 | -<form method="POST" action="<?= e(route('admin-module',[ |
|
195 | +<form method="POST" action="<?= e(route('admin-module', [ |
|
198 | 196 | 'module' => $module, |
199 | 197 | 'action' => 'AdminImportPlaces' |
200 | 198 | ])) ?>"> |
@@ -10,13 +10,13 @@ |
||
10 | 10 | |
11 | 11 | <?php if ($media->isPendingDeletion()): ?> |
12 | 12 | <?php if (Auth::isModerator($media->getTree())): ?> |
13 | - <?= view('alerts/warning-dissmissible', ['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')]) ?> |
|
13 | + <?= view('alerts/warning-dissmissible', ['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')]) ?> |
|
14 | 14 | <?php elseif (Auth::isEditor($media->getTree())): ?> |
15 | 15 | <?= view('alerts/warning-dissmissible', ['alert' => I18N::translate('This media object has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
16 | 16 | <?php endif ?> |
17 | 17 | <?php elseif ($media->isPendingAddition()): ?> |
18 | 18 | <?php if (Auth::isModerator($media->getTree())): ?> |
19 | - <?= view('alerts/warning-dissmissible', ['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')]) ?> |
|
19 | + <?= view('alerts/warning-dissmissible', ['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')]) ?> |
|
20 | 20 | <?php elseif (Auth::isEditor($media->getTree())): ?> |
21 | 21 | <?= view('alerts/warning-dissmissible', ['alert' => I18N::translate('This media object has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> |
22 | 22 | <?php endif ?> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * You should have received a copy of the GNU General Public License |
14 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | */ |
16 | -declare(strict_types = 1); |
|
16 | +declare(strict_types=1); |
|
17 | 17 | |
18 | 18 | namespace Fisharebest\Webtrees; |
19 | 19 | |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | * @param array $record |
31 | 31 | * @throws \Exception |
32 | 32 | */ |
33 | - public function __construct($gedcomName, $record=[]) { |
|
33 | + public function __construct($gedcomName, $record = []) { |
|
34 | 34 | $tmp = $this->getRecordFromName($gedcomName); |
35 | 35 | if ($tmp !== null) { |
36 | 36 | $this->record = $tmp; |
37 | 37 | } elseif (!empty($record)) { |
38 | - $this->record = (object)$record; |
|
38 | + $this->record = (object) $record; |
|
39 | 39 | } else { |
40 | - $this->record = (object)[ |
|
40 | + $this->record = (object) [ |
|
41 | 41 | 'fqpn' => '', |
42 | 42 | 'pl_id' => 0, |
43 | 43 | 'pl_parent_id' => 0, |
@@ -67,8 +67,7 @@ discard block |
||
67 | 67 | switch ($format) { |
68 | 68 | case 'signed': |
69 | 69 | return $this->record->pl_lati ? |
70 | - (float)strtr($this->record->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) : |
|
71 | - $this->record->pl_lati; |
|
70 | + (float) strtr($this->record->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) : $this->record->pl_lati; |
|
72 | 71 | default: |
73 | 72 | return $this->record->pl_lati; |
74 | 73 | } |
@@ -83,8 +82,7 @@ discard block |
||
83 | 82 | switch ($format) { |
84 | 83 | case 'signed': |
85 | 84 | return $this->record->pl_long ? |
86 | - (float)strtr($this->record->pl_long, ['E' => '', 'W' => '-', ',' => '.']) : |
|
87 | - $this->record->pl_long; |
|
85 | + (float) strtr($this->record->pl_long, ['E' => '', 'W' => '-', ',' => '.']) : $this->record->pl_long; |
|
88 | 86 | default: |
89 | 87 | return $this->record->pl_long; |
90 | 88 | } |
@@ -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> |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | |
604 | 604 | foreach ($search_terms as $n => $q) { |
605 | 605 | $queryregex[] = preg_quote(I18N::strtoupper($q), '/'); |
606 | - $sql .= " AND f_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
606 | + $sql .= " AND f_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
607 | 607 | $args['collate_' . $n] = I18N::collation(); |
608 | 608 | $args['query_' . $n] = Database::escapeLike($q); |
609 | 609 | } |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | * @return Family[] |
651 | 651 | */ |
652 | 652 | private function searchFamilyNames(array $search_terms, array $search_trees): array { |
653 | - $sql = |
|
653 | + $sql = |
|
654 | 654 | "SELECT DISTINCT f_id AS xref, f_file AS gedcom_id, f_gedcom AS gedcom" . |
655 | 655 | " FROM `##families`" . |
656 | 656 | " LEFT JOIN `##name` husb ON f_husb = husb.n_id AND f_file = husb.n_file" . |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | $args = []; |
660 | 660 | |
661 | 661 | foreach ($search_terms as $n => $q) { |
662 | - $sql .= " AND (husb.n_full COLLATE :husb_collate_" . $n . " LIKE CONCAT('%', :husb_query_" . $n . ", '%') OR wife.n_full COLLATE :wife_collate_" . $n . " LIKE CONCAT('%', :wife_query_" . $n . ", '%'))"; |
|
662 | + $sql .= " AND (husb.n_full COLLATE :husb_collate_" . $n . " LIKE CONCAT('%', :husb_query_" . $n . ", '%') OR wife.n_full COLLATE :wife_collate_" . $n . " LIKE CONCAT('%', :wife_query_" . $n . ", '%'))"; |
|
663 | 663 | $args['husb_collate_' . $n] = I18N::collation(); |
664 | 664 | $args['husb_query_' . $n] = Database::escapeLike($q); |
665 | 665 | $args['wife_collate_' . $n] = I18N::collation(); |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | |
711 | 711 | foreach ($search_terms as $n => $q) { |
712 | 712 | $queryregex[] = preg_quote(I18N::strtoupper($q), '/'); |
713 | - $sql .= " AND i_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
713 | + $sql .= " AND i_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
714 | 714 | $args['collate_' . $n] = I18N::collation(); |
715 | 715 | $args['query_' . $n] = Database::escapeLike($q); |
716 | 716 | } |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | } |
856 | 856 | |
857 | 857 | // Add the where clause |
858 | - $sql .= " WHERE ind.i_file=?"; |
|
858 | + $sql .= " WHERE ind.i_file=?"; |
|
859 | 859 | $bind[] = $this->tree()->getTreeId(); |
860 | 860 | |
861 | 861 | foreach ($fields as $field_name => $field_value) { |
@@ -866,15 +866,15 @@ discard block |
||
866 | 866 | case 'GIVN': |
867 | 867 | switch ($modifiers[$field_name]) { |
868 | 868 | case 'EXACT': |
869 | - $sql .= " AND i_n.n_givn=?"; |
|
869 | + $sql .= " AND i_n.n_givn=?"; |
|
870 | 870 | $bind[] = $field_value; |
871 | 871 | break; |
872 | 872 | case 'BEGINS': |
873 | - $sql .= " AND i_n.n_givn LIKE CONCAT(?, '%')"; |
|
873 | + $sql .= " AND i_n.n_givn LIKE CONCAT(?, '%')"; |
|
874 | 874 | $bind[] = $field_value; |
875 | 875 | break; |
876 | 876 | case 'CONTAINS': |
877 | - $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')"; |
|
877 | + $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')"; |
|
878 | 878 | $bind[] = $field_value; |
879 | 879 | break; |
880 | 880 | case 'SDX_STD': |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | $sql .= ' AND (' . implode(' OR ', $sdx) . ')'; |
889 | 889 | } else { |
890 | 890 | // No phonetic content? Use a substring match |
891 | - $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')"; |
|
891 | + $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')"; |
|
892 | 892 | $bind[] = $field_value; |
893 | 893 | } |
894 | 894 | break; |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | $sql .= ' AND (' . implode(' OR ', $sdx) . ')'; |
905 | 905 | } else { |
906 | 906 | // No phonetic content? Use a substring match |
907 | - $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')"; |
|
907 | + $sql .= " AND i_n.n_givn LIKE CONCAT('%', ?, '%')"; |
|
908 | 908 | $bind[] = $field_value; |
909 | 909 | } |
910 | 910 | break; |
@@ -913,15 +913,15 @@ discard block |
||
913 | 913 | case 'SURN': |
914 | 914 | switch ($modifiers[$field_name]) { |
915 | 915 | case 'EXACT': |
916 | - $sql .= " AND i_n.n_surname=?"; |
|
916 | + $sql .= " AND i_n.n_surname=?"; |
|
917 | 917 | $bind[] = $field_value; |
918 | 918 | break; |
919 | 919 | case 'BEGINS': |
920 | - $sql .= " AND i_n.n_surname LIKE CONCAT(?, '%')"; |
|
920 | + $sql .= " AND i_n.n_surname LIKE CONCAT(?, '%')"; |
|
921 | 921 | $bind[] = $field_value; |
922 | 922 | break; |
923 | 923 | case 'CONTAINS': |
924 | - $sql .= " AND i_n.n_surname LIKE CONCAT('%', ?, '%')"; |
|
924 | + $sql .= " AND i_n.n_surname LIKE CONCAT('%', ?, '%')"; |
|
925 | 925 | $bind[] = $field_value; |
926 | 926 | break; |
927 | 927 | case 'SDX_STD': |
@@ -935,7 +935,7 @@ discard block |
||
935 | 935 | $sql .= " AND (" . implode(' OR ', $sdx) . ")"; |
936 | 936 | } else { |
937 | 937 | // No phonetic content? Use a substring match |
938 | - $sql .= " AND i_n.n_surn LIKE CONCAT('%', ?, '%')"; |
|
938 | + $sql .= " AND i_n.n_surn LIKE CONCAT('%', ?, '%')"; |
|
939 | 939 | $bind[] = $field_value; |
940 | 940 | } |
941 | 941 | break; |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | break; |
953 | 953 | } else { |
954 | 954 | // No phonetic content? Use a substring match |
955 | - $sql .= " AND i_n.n_surn LIKE CONCAT('%', ?, '%')"; |
|
955 | + $sql .= " AND i_n.n_surn LIKE CONCAT('%', ?, '%')"; |
|
956 | 956 | $bind[] = $field_value; |
957 | 957 | } |
958 | 958 | } |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | case '_MARNM': |
962 | 962 | case '_HEB': |
963 | 963 | case '_AKA': |
964 | - $sql .= " AND i_n.n_type=? AND i_n.n_full LIKE CONCAT('%', ?, '%')"; |
|
964 | + $sql .= " AND i_n.n_type=? AND i_n.n_full LIKE CONCAT('%', ?, '%')"; |
|
965 | 965 | $bind[] = $parts[1]; |
966 | 966 | $bind[] = $field_value; |
967 | 967 | break; |
@@ -971,7 +971,7 @@ discard block |
||
971 | 971 | $date = new Date($field_value); |
972 | 972 | if ($date->isOK()) { |
973 | 973 | $delta = 365 * ($modifiers[$field_name] ?? 0); |
974 | - $sql .= " AND i_d.d_fact=? AND i_d.d_julianday1>=? AND i_d.d_julianday2<=?"; |
|
974 | + $sql .= " AND i_d.d_fact=? AND i_d.d_julianday1>=? AND i_d.d_julianday2<=?"; |
|
975 | 975 | $bind[] = $parts[0]; |
976 | 976 | $bind[] = $date->minimumJulianDay() - $delta; |
977 | 977 | $bind[] = $date->maximumJulianDay() + $delta; |
@@ -981,7 +981,7 @@ discard block |
||
981 | 981 | $date = new Date($field_value); |
982 | 982 | if ($date->isOK()) { |
983 | 983 | $delta = 365 * $modifiers[$field_name]; |
984 | - $sql .= " AND f_d.d_fact=? AND f_d.d_julianday1>=? AND f_d.d_julianday2<=?"; |
|
984 | + $sql .= " AND f_d.d_fact=? AND f_d.d_julianday1>=? AND f_d.d_julianday2<=?"; |
|
985 | 985 | $bind[] = $parts[1]; |
986 | 986 | $bind[] = $date->minimumJulianDay() - $delta; |
987 | 987 | $bind[] = $date->maximumJulianDay() + $delta; |
@@ -989,12 +989,12 @@ discard block |
||
989 | 989 | } elseif ($parts[1] === 'PLAC') { |
990 | 990 | // *:PLAC |
991 | 991 | // SQL can only link a place to a person/family, not to an event. |
992 | - $sql .= " AND i_p.place LIKE CONCAT('%', ?, '%')"; |
|
992 | + $sql .= " AND i_p.place LIKE CONCAT('%', ?, '%')"; |
|
993 | 993 | $bind[] = $field_value; |
994 | 994 | } elseif ($parts[0] === 'FAMS' && $parts[2] === 'PLAC') { |
995 | 995 | // FAMS:*:PLAC |
996 | 996 | // SQL can only link a place to a person/family, not to an event. |
997 | - $sql .= " AND f_p.place LIKE CONCAT('%', ?, '%')"; |
|
997 | + $sql .= " AND f_p.place LIKE CONCAT('%', ?, '%')"; |
|
998 | 998 | $bind[] = $field_value; |
999 | 999 | } elseif ($parts[0] === 'FAMC' && $parts[2] === 'NAME') { |
1000 | 1000 | $table = $parts[1] === 'HUSB' ? 'f_n' : 'm_n'; |
@@ -1003,15 +1003,15 @@ discard block |
||
1003 | 1003 | case 'GIVN': |
1004 | 1004 | switch ($modifiers[$field_name]) { |
1005 | 1005 | case 'EXACT': |
1006 | - $sql .= " AND {$table}.n_givn=?"; |
|
1006 | + $sql .= " AND {$table}.n_givn=?"; |
|
1007 | 1007 | $bind[] = $field_value; |
1008 | 1008 | break; |
1009 | 1009 | case 'BEGINS': |
1010 | - $sql .= " AND {$table}.n_givn LIKE CONCAT(?, '%')"; |
|
1010 | + $sql .= " AND {$table}.n_givn LIKE CONCAT(?, '%')"; |
|
1011 | 1011 | $bind[] = $field_value; |
1012 | 1012 | break; |
1013 | 1013 | case 'CONTAINS': |
1014 | - $sql .= " AND {$table}.n_givn LIKE CONCAT('%', ?, '%')"; |
|
1014 | + $sql .= " AND {$table}.n_givn LIKE CONCAT('%', ?, '%')"; |
|
1015 | 1015 | $bind[] = $field_value; |
1016 | 1016 | break; |
1017 | 1017 | case 'SDX_STD': |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | $sql .= ' AND (' . implode(' OR ', $sdx) . ')'; |
1026 | 1026 | } else { |
1027 | 1027 | // No phonetic content? Use a substring match |
1028 | - $sql .= " AND {$table}.n_givn = LIKE CONCAT('%', ?, '%')"; |
|
1028 | + $sql .= " AND {$table}.n_givn = LIKE CONCAT('%', ?, '%')"; |
|
1029 | 1029 | $bind[] = $field_value; |
1030 | 1030 | } |
1031 | 1031 | break; |
@@ -1042,7 +1042,7 @@ discard block |
||
1042 | 1042 | break; |
1043 | 1043 | } else { |
1044 | 1044 | // No phonetic content? Use a substring match |
1045 | - $sql .= " AND {$table}.n_givn = LIKE CONCAT('%', ?, '%')"; |
|
1045 | + $sql .= " AND {$table}.n_givn = LIKE CONCAT('%', ?, '%')"; |
|
1046 | 1046 | $bind[] = $field_value; |
1047 | 1047 | } |
1048 | 1048 | } |
@@ -1050,15 +1050,15 @@ discard block |
||
1050 | 1050 | case 'SURN': |
1051 | 1051 | switch ($modifiers[$field_name]) { |
1052 | 1052 | case 'EXACT': |
1053 | - $sql .= " AND {$table}.n_surname=?"; |
|
1053 | + $sql .= " AND {$table}.n_surname=?"; |
|
1054 | 1054 | $bind[] = $field_value; |
1055 | 1055 | break; |
1056 | 1056 | case 'BEGINS': |
1057 | - $sql .= " AND {$table}.n_surname LIKE CONCAT(?, '%')"; |
|
1057 | + $sql .= " AND {$table}.n_surname LIKE CONCAT(?, '%')"; |
|
1058 | 1058 | $bind[] = $field_value; |
1059 | 1059 | break; |
1060 | 1060 | case 'CONTAINS': |
1061 | - $sql .= " AND {$table}.n_surname LIKE CONCAT('%', ?, '%')"; |
|
1061 | + $sql .= " AND {$table}.n_surname LIKE CONCAT('%', ?, '%')"; |
|
1062 | 1062 | $bind[] = $field_value; |
1063 | 1063 | break; |
1064 | 1064 | case 'SDX_STD': |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | $sql .= ' AND (' . implode(' OR ', $sdx) . ')'; |
1073 | 1073 | } else { |
1074 | 1074 | // No phonetic content? Use a substring match |
1075 | - $sql .= " AND {$table}.n_surn = LIKE CONCAT('%', ?, '%')"; |
|
1075 | + $sql .= " AND {$table}.n_surn = LIKE CONCAT('%', ?, '%')"; |
|
1076 | 1076 | $bind[] = $field_value; |
1077 | 1077 | } |
1078 | 1078 | break; |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | $sql .= ' AND (' . implode(' OR ', $sdx) . ')'; |
1089 | 1089 | } else { |
1090 | 1090 | // No phonetic content? Use a substring match |
1091 | - $sql .= " AND {$table}.n_surn = LIKE CONCAT('%', ?, '%')"; |
|
1091 | + $sql .= " AND {$table}.n_surn = LIKE CONCAT('%', ?, '%')"; |
|
1092 | 1092 | $bind[] = $field_value; |
1093 | 1093 | } |
1094 | 1094 | break; |
@@ -1097,17 +1097,17 @@ discard block |
||
1097 | 1097 | } |
1098 | 1098 | } elseif ($parts[0] === 'FAMS') { |
1099 | 1099 | // e.g. searches for occupation, religion, note, etc. |
1100 | - $sql .= " AND fam.f_gedcom REGEXP CONCAT('\n[0-9] ', ?, '(.*\n[0-9] CONT)* [^\n]*', ?)"; |
|
1100 | + $sql .= " AND fam.f_gedcom REGEXP CONCAT('\n[0-9] ', ?, '(.*\n[0-9] CONT)* [^\n]*', ?)"; |
|
1101 | 1101 | $bind[] = $parts[1]; |
1102 | 1102 | $bind[] = $field_value; |
1103 | 1103 | } elseif ($parts[1] === 'TYPE') { |
1104 | 1104 | // e.g. FACT:TYPE or EVEN:TYPE |
1105 | - $sql .= " AND ind.i_gedcom REGEXP CONCAT('\n1 ', ?, '.*(\n[2-9] .*)*\n2 TYPE .*', ?)"; |
|
1105 | + $sql .= " AND ind.i_gedcom REGEXP CONCAT('\n1 ', ?, '.*(\n[2-9] .*)*\n2 TYPE .*', ?)"; |
|
1106 | 1106 | $bind[] = $parts[0]; |
1107 | 1107 | $bind[] = $field_value; |
1108 | 1108 | } else { |
1109 | 1109 | // e.g. searches for occupation, religion, note, etc. |
1110 | - $sql .= " AND ind.i_gedcom REGEXP CONCAT('\n[0-9] ', ?, '(.*\n[0-9] CONT)* [^\n]*', ?)"; |
|
1110 | + $sql .= " AND ind.i_gedcom REGEXP CONCAT('\n[0-9] ', ?, '(.*\n[0-9] CONT)* [^\n]*', ?)"; |
|
1111 | 1111 | $bind[] = $parts[0]; |
1112 | 1112 | $bind[] = $field_value; |
1113 | 1113 | } |
@@ -1185,7 +1185,7 @@ discard block |
||
1185 | 1185 | $sql .= ")"; |
1186 | 1186 | |
1187 | 1187 | if ($givn_sdx !== '') { |
1188 | - $sql .= " AND ("; |
|
1188 | + $sql .= " AND ("; |
|
1189 | 1189 | $givn_sdx = explode(':', $givn_sdx); |
1190 | 1190 | foreach ($givn_sdx as $n => $sdx) { |
1191 | 1191 | $sql .= $n > 0 ? " OR " : ""; |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | } |
1204 | 1204 | |
1205 | 1205 | if ($surn_sdx !== '') { |
1206 | - $sql .= " AND ("; |
|
1206 | + $sql .= " AND ("; |
|
1207 | 1207 | $surn_sdx = explode(':', $surn_sdx); |
1208 | 1208 | foreach ($surn_sdx as $n => $sdx) { |
1209 | 1209 | $sql .= $n ? " OR " : ""; |
@@ -1221,7 +1221,7 @@ discard block |
||
1221 | 1221 | } |
1222 | 1222 | |
1223 | 1223 | if ($plac_sdx !== '') { |
1224 | - $sql .= " AND ("; |
|
1224 | + $sql .= " AND ("; |
|
1225 | 1225 | $plac_sdx = explode(':', $plac_sdx); |
1226 | 1226 | foreach ($plac_sdx as $n => $sdx) { |
1227 | 1227 | $sql .= $n ? " OR " : ""; |
@@ -1267,7 +1267,7 @@ discard block |
||
1267 | 1267 | |
1268 | 1268 | foreach ($search_terms as $n => $q) { |
1269 | 1269 | $queryregex[] = preg_quote(I18N::strtoupper($q), '/'); |
1270 | - $sql .= " AND o_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
1270 | + $sql .= " AND o_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
1271 | 1271 | $args['collate_' . $n] = I18N::collation(); |
1272 | 1272 | $args['query_' . $n] = Database::escapeLike($q); |
1273 | 1273 | } |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | |
1323 | 1323 | foreach ($search_terms as $n => $q) { |
1324 | 1324 | $queryregex[] = preg_quote(I18N::strtoupper($q), '/'); |
1325 | - $sql .= " AND o_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
1325 | + $sql .= " AND o_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
1326 | 1326 | $args['collate_' . $n] = I18N::collation(); |
1327 | 1327 | $args['query_' . $n] = Database::escapeLike($q); |
1328 | 1328 | } |
@@ -1377,7 +1377,7 @@ discard block |
||
1377 | 1377 | |
1378 | 1378 | foreach ($search_terms as $n => $q) { |
1379 | 1379 | $queryregex[] = preg_quote(I18N::strtoupper($q), '/'); |
1380 | - $sql .= " AND s_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
1380 | + $sql .= " AND s_gedcom COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')"; |
|
1381 | 1381 | $args['collate_' . $n] = I18N::collation(); |
1382 | 1382 | $args['query_' . $n] = Database::escapeLike($q); |
1383 | 1383 | } |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | $osm_module = Module::getModuleByName(self::MAP_MODULE); |
51 | 51 | $method = 'assets'; |
52 | 52 | $showmap = $osm_module && |
53 | - (bool)$osm_module->getPreference('place_hierarchy') && |
|
53 | + (bool) $osm_module->getPreference('place_hierarchy') && |
|
54 | 54 | method_exists($osm_module, $method) && |
55 | 55 | strpos($action, 'hierarchy') === 0; |
56 | 56 | $data = null; |
57 | 57 | $note = false; |
58 | 58 | |
59 | 59 | if ($showmap) { |
60 | - $note = true; |
|
60 | + $note = true; |
|
61 | 61 | $content .= view('modules/openstreetmap/map', |
62 | 62 | [ |
63 | 63 | 'assets' => $osm_module->$method(), |
@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | |
71 | 71 | switch ($action) { |
72 | 72 | case 'list': |
73 | - $nextaction = ['hierarchy' => I18N::translate('Show place hierarchy')]; |
|
74 | - $content .= view('place-list', $this->getList($tree)); |
|
73 | + $nextaction = ['hierarchy' => I18N::translate('Show place hierarchy')]; |
|
74 | + $content .= view('place-list', $this->getList($tree)); |
|
75 | 75 | break; |
76 | 76 | case 'hierarchy': |
77 | 77 | case 'hierarchy-e': |
78 | 78 | $nextaction = ['list' => I18N::translate('Show all places in a list')]; |
79 | 79 | $data = $this->getHierarchy($tree, $place, $parent); |
80 | - $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
80 | + $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
81 | 81 | if (null === $data || $action === 'hierarchy-e') { |
82 | 82 | $content .= view('place-events', $this->getEvents($tree, $place)); |
83 | 83 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | return |
119 | 119 | [ |
120 | - 'columns' => array_chunk($list_places, (int)ceil($numfound / $divisor)), |
|
120 | + 'columns' => array_chunk($list_places, (int) ceil($numfound / $divisor)), |
|
121 | 121 | ]; |
122 | 122 | } |
123 | 123 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | [ |
140 | 140 | 'tree' => $tree, |
141 | 141 | 'col_class' => "w-" . ($divisor === 2 ? "25" : "50"), |
142 | - 'columns' => array_chunk($child_places, (int)ceil($numfound / $divisor)), |
|
142 | + 'columns' => array_chunk($child_places, (int) ceil($numfound / $divisor)), |
|
143 | 143 | 'place' => $place, |
144 | 144 | 'parent' => $parent, |
145 | 145 | ]; |