@@ -131,7 +131,8 @@ |
||
131 | 131 | * @param Family $family |
132 | 132 | * @param Individual $individual |
133 | 133 | */ |
134 | -function print_navigator_family(Family $family, Individual $individual) { |
|
134 | +function print_navigator_family(Family $family, Individual $individual) |
|
135 | +{ |
|
135 | 136 | foreach ($family->getSpouses() as $spouse) { |
136 | 137 | ?> |
137 | 138 | <tr class="fact_value"> |
@@ -769,8 +769,11 @@ |
||
769 | 769 | <p> |
770 | 770 | <?php if ($ucnt): ?> |
771 | 771 | <input type="submit" value="<?php echo I18N::translate('delete'); ?>"> |
772 | - <?php else: ?> |
|
773 | - <?php echo I18N::translate('Nothing found to cleanup'); ?> |
|
772 | + <?php else { |
|
773 | + : ?> |
|
774 | + <?php echo I18N::translate('Nothing found to cleanup'); |
|
775 | +} |
|
776 | +?> |
|
774 | 777 | <?php endif; ?> |
775 | 778 | </p> |
776 | 779 | </form> |
@@ -103,7 +103,8 @@ discard block |
||
103 | 103 | <?php if ($ancestors_only === '1'): ?> |
104 | 104 | <input type="hidden" name="ancestors" value="1"> |
105 | 105 | <?php echo I18N::translate('Find relationships via ancestors') ?> |
106 | - <?php else: ?> |
|
106 | + <?php else { |
|
107 | + : ?> |
|
107 | 108 | <label> |
108 | 109 | <input type="radio" name="ancestors" value="0" <?php echo $ancestors == 0 ? 'checked' : '' ?>> |
109 | 110 | <?php echo I18N::translate('Find any relationship') ?> |
@@ -113,14 +114,17 @@ discard block |
||
113 | 114 | <input type="radio" name="ancestors" value="1" <?php echo $ancestors == 1 ? 'checked' : '' ?>> |
114 | 115 | <?php echo I18N::translate('Find relationships via ancestors') ?> |
115 | 116 | </label> |
116 | - <?php endif; ?> |
|
117 | + <?php endif; |
|
118 | +} |
|
119 | +?> |
|
117 | 120 | |
118 | 121 | <hr> |
119 | 122 | |
120 | 123 | <?php if ($max_recursion == 0): ?> |
121 | 124 | <?php echo I18N::translate('Find the closest relationships') ?> |
122 | 125 | <input type="hidden" name="recursion" value="0"> |
123 | - <?php else: ?> |
|
126 | + <?php else { |
|
127 | + : ?> |
|
124 | 128 | <label> |
125 | 129 | <input type="radio" name="recursion" value="0" <?php echo $recursion == 0 ? 'checked' : '' ?>> |
126 | 130 | <?php echo I18N::translate('Find the closest relationships') ?> |
@@ -132,7 +136,9 @@ discard block |
||
132 | 136 | <?php echo I18N::translate('Find all possible relationships') ?> |
133 | 137 | <?php else: ?> |
134 | 138 | <?php echo I18N::translate('Find other relationships') ?> |
135 | - <?php endif; ?> |
|
139 | + <?php endif; |
|
140 | +} |
|
141 | +?> |
|
136 | 142 | </label> |
137 | 143 | <?php endif; ?> |
138 | 144 | </td> |
@@ -176,9 +176,12 @@ discard block |
||
176 | 176 | <a href="<?php echo $module->getConfigLink() ?>"> |
177 | 177 | <?php echo $module->getTitle() ?> <i class="fa fa-cogs"></i> |
178 | 178 | </a> |
179 | - <?php else: ?> |
|
179 | + <?php else { |
|
180 | + : ?> |
|
180 | 181 | <?php echo $module->getTitle() ?> |
181 | - <?php endif; ?> |
|
182 | + <?php endif; |
|
183 | +} |
|
184 | +?> |
|
182 | 185 | <?php if (!in_array($module->getName(), Module::getCoreModuleNames())): ?> |
183 | 186 | <br> |
184 | 187 | <?php endif; ?> |
@@ -202,23 +205,32 @@ discard block |
||
202 | 205 | <td class="text-center text-muted hidden-xs"> |
203 | 206 | <?php if ($module instanceof ModuleMenuInterface): ?> |
204 | 207 | <i class="fa fa-list-ul" title="<?php echo I18N::translate('Menu') ?>"></i> |
205 | - <?php else: ?> |
|
208 | + <?php else { |
|
209 | + : ?> |
|
206 | 210 | - |
207 | - <?php endif; ?> |
|
211 | + <?php endif; |
|
212 | +} |
|
213 | +?> |
|
208 | 214 | </td> |
209 | 215 | <td class="text-center text-muted hidden-xs"> |
210 | 216 | <?php if ($module instanceof ModuleTabInterface): ?> |
211 | 217 | <i class="fa fa-folder" title="<?php echo I18N::translate('Tab') ?>"></i> |
212 | - <?php else: ?> |
|
218 | + <?php else { |
|
219 | + : ?> |
|
213 | 220 | - |
214 | - <?php endif; ?> |
|
221 | + <?php endif; |
|
222 | +} |
|
223 | +?> |
|
215 | 224 | </td> |
216 | 225 | <td class="text-center text-muted hidden-xs"> |
217 | 226 | <?php if ($module instanceof ModuleSidebarInterface): ?> |
218 | 227 | <i class="fa fa-th-large" title="<?php echo I18N::translate('Sidebar') ?>"></i> |
219 | - <?php else: ?> |
|
228 | + <?php else { |
|
229 | + : ?> |
|
220 | 230 | - |
221 | - <?php endif; ?> |
|
231 | + <?php endif; |
|
232 | +} |
|
233 | +?> |
|
222 | 234 | </td> |
223 | 235 | <td class="text-center text-muted hidden-xs"> |
224 | 236 | <?php if ($module instanceof ModuleBlockInterface): ?> |
@@ -228,30 +240,42 @@ discard block |
||
228 | 240 | <?php if ($module->isUserBlock()): ?> |
229 | 241 | <i class="fa fa-tree" title="<?php echo I18N::translate('Home page') ?>"></i> |
230 | 242 | <?php endif; ?> |
231 | - <?php else: ?> |
|
243 | + <?php else { |
|
244 | + : ?> |
|
232 | 245 | - |
233 | - <?php endif; ?> |
|
246 | + <?php endif; |
|
247 | +} |
|
248 | +?> |
|
234 | 249 | </td> |
235 | 250 | <td class="text-center text-muted hidden-xs"> |
236 | 251 | <?php if ($module instanceof ModuleChartInterface): ?> |
237 | 252 | <i class="fa fa-share-alt" title="<?php echo I18N::translate('Chart') ?>"></i> |
238 | - <?php else: ?> |
|
253 | + <?php else { |
|
254 | + : ?> |
|
239 | 255 | - |
240 | - <?php endif; ?> |
|
256 | + <?php endif; |
|
257 | +} |
|
258 | +?> |
|
241 | 259 | </td> |
242 | 260 | <td class="text-center text-muted hidden-xs"> |
243 | 261 | <?php if ($module instanceof ModuleReportInterface): ?> |
244 | 262 | <i class="fa fa-file" title="<?php echo I18N::translate('Report') ?>"></i> |
245 | - <?php else: ?> |
|
263 | + <?php else { |
|
264 | + : ?> |
|
246 | 265 | - |
247 | - <?php endif; ?> |
|
266 | + <?php endif; |
|
267 | +} |
|
268 | +?> |
|
248 | 269 | </td> |
249 | 270 | <td class="text-center text-muted hidden"> |
250 | 271 | <?php if ($module instanceof ModuleThemeInterface): ?> |
251 | 272 | <i class="fa fa-check" title="<?php echo I18N::translate('Theme') ?>"></i> |
252 | - <?php else: ?> |
|
273 | + <?php else { |
|
274 | + : ?> |
|
253 | 275 | - |
254 | - <?php endif; ?> |
|
276 | + <?php endif; |
|
277 | +} |
|
278 | +?> |
|
255 | 279 | </td> |
256 | 280 | </tr> |
257 | 281 | <?php endforeach; ?> |
@@ -154,10 +154,22 @@ discard block |
||
154 | 154 | <input type="text" id="value<?php echo $i; ?>" name="values[<?php echo $i; ?>]" value="<?php echo Filter::escapeHtml($controller->getValue($i)); ?>"<?php echo substr($controller->getField($i), -4) == 'PLAC' ? 'data-autocomplete-type="PLAC"' : ''; ?>> |
155 | 155 | <?php if (preg_match("/^NAME:/", $currentFieldSearch) > 0) { ?> |
156 | 156 | <select name="fields[<?php echo $i; ?>]"> |
157 | - <option value="<?php echo $currentField; ?>:EXACT" <?php if (preg_match("/:EXACT$/", $currentFieldSearch) > 0) echo 'selected'; ?>><?php echo I18N::translate('Exact'); ?></option> |
|
158 | - <option value="<?php echo $currentField; ?>:BEGINS" <?php if (preg_match("/:BEGINS$/", $currentFieldSearch) > 0) echo 'selected'; ?>><?php echo I18N::translate('Begins with'); ?></option> |
|
159 | - <option value="<?php echo $currentField; ?>:CONTAINS" <?php if (preg_match("/:CONTAINS$/", $currentFieldSearch) > 0) echo 'selected'; ?>><?php echo I18N::translate('Contains'); ?></option> |
|
160 | - <option value="<?php echo $currentField; ?>:SDX" <?php if (preg_match("/:SDX$/", $currentFieldSearch) > 0) echo 'selected'; ?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
157 | + <option value="<?php echo $currentField; ?>:EXACT" <?php if (preg_match("/:EXACT$/", $currentFieldSearch) > 0) { |
|
158 | + echo 'selected'; |
|
159 | +} |
|
160 | +?>><?php echo I18N::translate('Exact'); ?></option> |
|
161 | + <option value="<?php echo $currentField; ?>:BEGINS" <?php if (preg_match("/:BEGINS$/", $currentFieldSearch) > 0) { |
|
162 | + echo 'selected'; |
|
163 | +} |
|
164 | +?>><?php echo I18N::translate('Begins with'); ?></option> |
|
165 | + <option value="<?php echo $currentField; ?>:CONTAINS" <?php if (preg_match("/:CONTAINS$/", $currentFieldSearch) > 0) { |
|
166 | + echo 'selected'; |
|
167 | +} |
|
168 | +?>><?php echo I18N::translate('Contains'); ?></option> |
|
169 | + <option value="<?php echo $currentField; ?>:SDX" <?php if (preg_match("/:SDX$/", $currentFieldSearch) > 0) { |
|
170 | + echo 'selected'; |
|
171 | +} |
|
172 | +?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
161 | 173 | </select> |
162 | 174 | <?php } else { ?> |
163 | 175 | <input type="hidden" name="fields[<?php echo $i; ?>]" value="<?php echo $controller->getField($i); ?>"> |
@@ -166,9 +178,18 @@ discard block |
||
166 | 178 | ?> |
167 | 179 | <select name="plusminus[<?php echo $i; ?>]"> |
168 | 180 | <option value=""><?php echo I18N::translate('Exact date'); ?></option> |
169 | - <option value="2" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 2) echo 'selected'; ?>><?php echo I18N::plural('±%s year', '±%s years', 2, I18N::number(2)); ?></option> |
|
170 | - <option value="5" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 5) echo 'selected'; ?>><?php echo I18N::plural('±%s year', '±%s years', 5, I18N::number(5)); ?></option> |
|
171 | - <option value="10" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 10) echo 'selected'; ?>><?php echo I18N::plural('±%s year', '±%s years', 10, I18N::number(10)); ?></option> |
|
181 | + <option value="2" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 2) { |
|
182 | + echo 'selected'; |
|
183 | +} |
|
184 | +?>><?php echo I18N::plural('±%s year', '±%s years', 2, I18N::number(2)); ?></option> |
|
185 | + <option value="5" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 5) { |
|
186 | + echo 'selected'; |
|
187 | +} |
|
188 | +?>><?php echo I18N::plural('±%s year', '±%s years', 5, I18N::number(5)); ?></option> |
|
189 | + <option value="10" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 10) { |
|
190 | + echo 'selected'; |
|
191 | +} |
|
192 | +?>><?php echo I18N::plural('±%s year', '±%s years', 10, I18N::number(10)); ?></option> |
|
172 | 193 | </select> |
173 | 194 | <?php } ?> |
174 | 195 | </td> |
@@ -216,10 +237,22 @@ discard block |
||
216 | 237 | <td class="list_value"> |
217 | 238 | <input type="text" name="values[<?php echo $j; ?>]" value="<?php echo $controller->getValue($controller->getIndex('FAMC:HUSB:NAME:GIVN:' . $fatherGivnOption)); ?>"> |
218 | 239 | <select name="fields[<?php echo $j; ?>]"> |
219 | - <option value="FAMC:HUSB:NAME:GIVN:EXACT" <?php if ($fatherGivnOption == 'EXACT') echo 'selected'; ?>><?php echo I18N::translate('Exact'); ?></option> |
|
220 | - <option value="FAMC:HUSB:NAME:GIVN:BEGINS" <?php if ($fatherGivnOption == 'BEGINS') echo 'selected'; ?>><?php echo I18N::translate('Begins with'); ?></option> |
|
221 | - <option value="FAMC:HUSB:NAME:GIVN:CONTAINS" <?php if ($fatherGivnOption == 'CONTAINS') echo 'selected'; ?>><?php echo I18N::translate('Contains'); ?></option> |
|
222 | - <option value="FAMC:HUSB:NAME:GIVN:SDX" <?php if ($fatherGivnOption == 'SDX') echo 'selected'; ?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
240 | + <option value="FAMC:HUSB:NAME:GIVN:EXACT" <?php if ($fatherGivnOption == 'EXACT') { |
|
241 | + echo 'selected'; |
|
242 | +} |
|
243 | +?>><?php echo I18N::translate('Exact'); ?></option> |
|
244 | + <option value="FAMC:HUSB:NAME:GIVN:BEGINS" <?php if ($fatherGivnOption == 'BEGINS') { |
|
245 | + echo 'selected'; |
|
246 | +} |
|
247 | +?>><?php echo I18N::translate('Begins with'); ?></option> |
|
248 | + <option value="FAMC:HUSB:NAME:GIVN:CONTAINS" <?php if ($fatherGivnOption == 'CONTAINS') { |
|
249 | + echo 'selected'; |
|
250 | +} |
|
251 | +?>><?php echo I18N::translate('Contains'); ?></option> |
|
252 | + <option value="FAMC:HUSB:NAME:GIVN:SDX" <?php if ($fatherGivnOption == 'SDX') { |
|
253 | + echo 'selected'; |
|
254 | +} |
|
255 | +?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
223 | 256 | </select> |
224 | 257 | </td> |
225 | 258 | </tr> |
@@ -231,10 +264,22 @@ discard block |
||
231 | 264 | <td class="list_value"> |
232 | 265 | <input type="text" name="values[<?php echo $j; ?>]" value="<?php echo $controller->getValue($controller->getIndex('FAMC:HUSB:NAME:SURN:' . $fatherSurnOption)); ?>"> |
233 | 266 | <select name="fields[<?php echo $j; ?>]"> |
234 | - <option value="FAMC:HUSB:NAME:SURN:EXACT" <?php if ($fatherSurnOption == 'EXACT') echo 'selected'; ?>><?php echo I18N::translate('Exact'); ?></option> |
|
235 | - <option value="FAMC:HUSB:NAME:SURN:BEGINS" <?php if ($fatherSurnOption == 'BEGINS') echo 'selected'; ?>><?php echo I18N::translate('Begins with'); ?></option> |
|
236 | - <option value="FAMC:HUSB:NAME:SURN:CONTAINS" <?php if ($fatherSurnOption == 'CONTAINS') echo 'selected'; ?>><?php echo I18N::translate('Contains'); ?></option> |
|
237 | - <option value="FAMC:HUSB:NAME:SURN:SDX" <?php if ($fatherSurnOption == 'SDX') echo 'selected'; ?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
267 | + <option value="FAMC:HUSB:NAME:SURN:EXACT" <?php if ($fatherSurnOption == 'EXACT') { |
|
268 | + echo 'selected'; |
|
269 | +} |
|
270 | +?>><?php echo I18N::translate('Exact'); ?></option> |
|
271 | + <option value="FAMC:HUSB:NAME:SURN:BEGINS" <?php if ($fatherSurnOption == 'BEGINS') { |
|
272 | + echo 'selected'; |
|
273 | +} |
|
274 | +?>><?php echo I18N::translate('Begins with'); ?></option> |
|
275 | + <option value="FAMC:HUSB:NAME:SURN:CONTAINS" <?php if ($fatherSurnOption == 'CONTAINS') { |
|
276 | + echo 'selected'; |
|
277 | +} |
|
278 | +?>><?php echo I18N::translate('Contains'); ?></option> |
|
279 | + <option value="FAMC:HUSB:NAME:SURN:SDX" <?php if ($fatherSurnOption == 'SDX') { |
|
280 | + echo 'selected'; |
|
281 | +} |
|
282 | +?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
238 | 283 | </select> |
239 | 284 | </td> |
240 | 285 | </tr> |
@@ -252,10 +297,22 @@ discard block |
||
252 | 297 | <td class="list_value"> |
253 | 298 | <input type="text" name="values[<?php echo $j; ?>]" value="<?php echo $controller->getValue($controller->getIndex('FAMC:WIFE:NAME:GIVN:' . $motherGivnOption)); ?>"> |
254 | 299 | <select name="fields[<?php echo $j; ?>]"> |
255 | - <option value="FAMC:WIFE:NAME:GIVN:EXACT" <?php if ($motherGivnOption == 'EXACT') echo 'selected'; ?>><?php echo I18N::translate('Exact'); ?></option> |
|
256 | - <option value="FAMC:WIFE:NAME:GIVN:BEGINS" <?php if ($motherGivnOption == 'BEGINS') echo 'selected'; ?>><?php echo I18N::translate('Begins with'); ?></option> |
|
257 | - <option value="FAMC:WIFE:NAME:GIVN:CONTAINS" <?php if ($motherGivnOption == 'CONTAINS') echo 'selected'; ?>><?php echo I18N::translate('Contains'); ?></option> |
|
258 | - <option value="FAMC:WIFE:NAME:GIVN:SDX" <?php if ($motherGivnOption == 'SDX') echo 'selected'; ?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
300 | + <option value="FAMC:WIFE:NAME:GIVN:EXACT" <?php if ($motherGivnOption == 'EXACT') { |
|
301 | + echo 'selected'; |
|
302 | +} |
|
303 | +?>><?php echo I18N::translate('Exact'); ?></option> |
|
304 | + <option value="FAMC:WIFE:NAME:GIVN:BEGINS" <?php if ($motherGivnOption == 'BEGINS') { |
|
305 | + echo 'selected'; |
|
306 | +} |
|
307 | +?>><?php echo I18N::translate('Begins with'); ?></option> |
|
308 | + <option value="FAMC:WIFE:NAME:GIVN:CONTAINS" <?php if ($motherGivnOption == 'CONTAINS') { |
|
309 | + echo 'selected'; |
|
310 | +} |
|
311 | +?>><?php echo I18N::translate('Contains'); ?></option> |
|
312 | + <option value="FAMC:WIFE:NAME:GIVN:SDX" <?php if ($motherGivnOption == 'SDX') { |
|
313 | + echo 'selected'; |
|
314 | +} |
|
315 | +?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
259 | 316 | </select> |
260 | 317 | </td> |
261 | 318 | <?php $j++; ?> |
@@ -267,10 +324,22 @@ discard block |
||
267 | 324 | <td class="list_value"> |
268 | 325 | <input type="text" name="values[<?php echo $j; ?>]" value="<?php echo $controller->getValue($controller->getIndex('FAMC:WIFE:NAME:SURN:' . $motherSurnOption)); ?>"> |
269 | 326 | <select name="fields[<?php echo $j; ?>]"> |
270 | - <option value="FAMC:WIFE:NAME:SURN:EXACT" <?php if ($motherSurnOption == 'EXACT') echo 'selected'; ?>><?php echo I18N::translate('Exact'); ?></option> |
|
271 | - <option value="FAMC:WIFE:NAME:SURN:BEGINS" <?php if ($motherSurnOption == 'BEGINS') echo 'selected'; ?>><?php echo I18N::translate('Begins with'); ?></option> |
|
272 | - <option value="FAMC:WIFE:NAME:SURN:CONTAINS" <?php if ($motherSurnOption == 'CONTAINS') 'selected'; ?>><?php echo I18N::translate('Contains'); ?></option> |
|
273 | - <option value="FAMC:WIFE:NAME:SURN:SDX" <?php if ($motherSurnOption == 'SDX') echo 'selected'; ?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
327 | + <option value="FAMC:WIFE:NAME:SURN:EXACT" <?php if ($motherSurnOption == 'EXACT') { |
|
328 | + echo 'selected'; |
|
329 | +} |
|
330 | +?>><?php echo I18N::translate('Exact'); ?></option> |
|
331 | + <option value="FAMC:WIFE:NAME:SURN:BEGINS" <?php if ($motherSurnOption == 'BEGINS') { |
|
332 | + echo 'selected'; |
|
333 | +} |
|
334 | +?>><?php echo I18N::translate('Begins with'); ?></option> |
|
335 | + <option value="FAMC:WIFE:NAME:SURN:CONTAINS" <?php if ($motherSurnOption == 'CONTAINS') { |
|
336 | + 'selected'; |
|
337 | +} |
|
338 | +?>><?php echo I18N::translate('Contains'); ?></option> |
|
339 | + <option value="FAMC:WIFE:NAME:SURN:SDX" <?php if ($motherSurnOption == 'SDX') { |
|
340 | + echo 'selected'; |
|
341 | +} |
|
342 | +?>><?php echo I18N::translate('Sounds like'); ?></option> |
|
274 | 343 | </select> |
275 | 344 | </td> |
276 | 345 | <?php $j++; ?> |
@@ -129,46 +129,46 @@ |
||
129 | 129 | return; |
130 | 130 | } |
131 | 131 | switch ($controller->chart_style) { |
132 | - case 0: |
|
133 | - // List |
|
134 | - echo '<ul id="ancestry_chart" class="chart_common">'; |
|
135 | - $controller->printChildAscendancy($controller->root, 1, $controller->generations - 1); |
|
136 | - echo '</ul>'; |
|
137 | - echo '<br>'; |
|
138 | - break; |
|
139 | - case 1: |
|
140 | - echo '<div id="ancestry_booklet">'; |
|
141 | - // Booklet |
|
142 | - // first page : show indi facts |
|
143 | - FunctionsPrint::printPedigreePerson($controller->root, $controller->showFull()); |
|
144 | - // process the tree |
|
145 | - $ancestors = $controller->sosaAncestors($controller->generations - 1); |
|
146 | - $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders |
|
132 | + case 0: |
|
133 | + // List |
|
134 | + echo '<ul id="ancestry_chart" class="chart_common">'; |
|
135 | + $controller->printChildAscendancy($controller->root, 1, $controller->generations - 1); |
|
136 | + echo '</ul>'; |
|
137 | + echo '<br>'; |
|
138 | + break; |
|
139 | + case 1: |
|
140 | + echo '<div id="ancestry_booklet">'; |
|
141 | + // Booklet |
|
142 | + // first page : show indi facts |
|
143 | + FunctionsPrint::printPedigreePerson($controller->root, $controller->showFull()); |
|
144 | + // process the tree |
|
145 | + $ancestors = $controller->sosaAncestors($controller->generations - 1); |
|
146 | + $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders |
|
147 | 147 | |
148 | - foreach ($ancestors as $sosa => $individual) { |
|
149 | - foreach ($individual->getChildFamilies() as $family) { |
|
150 | - FunctionsCharts::printSosaFamily($family->getXref(), $individual->getXref(), $sosa, '', '', '', $controller->show_cousins, $controller->showFull()); |
|
148 | + foreach ($ancestors as $sosa => $individual) { |
|
149 | + foreach ($individual->getChildFamilies() as $family) { |
|
150 | + FunctionsCharts::printSosaFamily($family->getXref(), $individual->getXref(), $sosa, '', '', '', $controller->show_cousins, $controller->showFull()); |
|
151 | + } |
|
151 | 152 | } |
152 | - } |
|
153 | - echo '</div>'; |
|
154 | - break; |
|
155 | - case 2: |
|
156 | - // Individual list |
|
157 | - $ancestors = $controller->sosaAncestors($controller->generations); |
|
158 | - $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders |
|
159 | - echo '<div id="ancestry-list">', FunctionsPrintLists::individualTable($ancestors, 'sosa'), '</div>'; |
|
160 | - break; |
|
161 | - case 3: |
|
162 | - // Family list |
|
163 | - $ancestors = $controller->sosaAncestors($controller->generations - 1); |
|
164 | - $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders |
|
165 | - $families = array(); |
|
166 | - foreach ($ancestors as $individual) { |
|
167 | - foreach ($individual->getChildFamilies() as $family) { |
|
168 | - $families[$family->getXref()] = $family; |
|
153 | + echo '</div>'; |
|
154 | + break; |
|
155 | + case 2: |
|
156 | + // Individual list |
|
157 | + $ancestors = $controller->sosaAncestors($controller->generations); |
|
158 | + $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders |
|
159 | + echo '<div id="ancestry-list">', FunctionsPrintLists::individualTable($ancestors, 'sosa'), '</div>'; |
|
160 | + break; |
|
161 | + case 3: |
|
162 | + // Family list |
|
163 | + $ancestors = $controller->sosaAncestors($controller->generations - 1); |
|
164 | + $ancestors = array_filter($ancestors); // The SOSA array includes empty placeholders |
|
165 | + $families = array(); |
|
166 | + foreach ($ancestors as $individual) { |
|
167 | + foreach ($individual->getChildFamilies() as $family) { |
|
168 | + $families[$family->getXref()] = $family; |
|
169 | + } |
|
169 | 170 | } |
170 | - } |
|
171 | - echo '<div id="ancestry-list">', FunctionsPrintLists::familyTable($families), '</div>'; |
|
172 | - break; |
|
171 | + echo '<div id="ancestry-list">', FunctionsPrintLists::familyTable($families), '</div>'; |
|
172 | + break; |
|
173 | 173 | } |
174 | 174 | echo '</div>'; |
@@ -38,34 +38,34 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | switch (Filter::post('action')) { |
41 | - case 'accept-changes': |
|
42 | - // Accept all the pending changes for a record |
|
43 | - $record = GedcomRecord::getInstance(Filter::post('xref', WT_REGEX_XREF), $WT_TREE); |
|
44 | - if ($record && Auth::isModerator($record->getTree()) && $record->canShow() && $record->canEdit()) { |
|
45 | - if ($record->isPendingDeletion()) { |
|
46 | - FlashMessages::addMessage(/* I18N: %s is the name of a genealogy record */ |
|
47 | - I18N::translate('“%s” has been deleted.', $record->getFullName())); |
|
41 | + case 'accept-changes': |
|
42 | + // Accept all the pending changes for a record |
|
43 | + $record = GedcomRecord::getInstance(Filter::post('xref', WT_REGEX_XREF), $WT_TREE); |
|
44 | + if ($record && Auth::isModerator($record->getTree()) && $record->canShow() && $record->canEdit()) { |
|
45 | + if ($record->isPendingDeletion()) { |
|
46 | + FlashMessages::addMessage(/* I18N: %s is the name of a genealogy record */ |
|
47 | + I18N::translate('“%s” has been deleted.', $record->getFullName())); |
|
48 | + } else { |
|
49 | + FlashMessages::addMessage(/* I18N: %s is the name of a genealogy record */ |
|
50 | + I18N::translate('The changes to “%s” have been accepted.', $record->getFullName())); |
|
51 | + } |
|
52 | + FunctionsImport::acceptAllChanges($record->getXref(), $record->getTree()->getTreeId()); |
|
48 | 53 | } else { |
49 | - FlashMessages::addMessage(/* I18N: %s is the name of a genealogy record */ |
|
50 | - I18N::translate('The changes to “%s” have been accepted.', $record->getFullName())); |
|
54 | + http_response_code(406); |
|
51 | 55 | } |
52 | - FunctionsImport::acceptAllChanges($record->getXref(), $record->getTree()->getTreeId()); |
|
53 | - } else { |
|
54 | - http_response_code(406); |
|
55 | - } |
|
56 | - break; |
|
56 | + break; |
|
57 | 57 | |
58 | - case 'copy-fact': |
|
59 | - // Copy a fact to the clipboard |
|
60 | - $xref = Filter::post('xref', WT_REGEX_XREF); |
|
61 | - $fact_id = Filter::post('fact_id'); |
|
58 | + case 'copy-fact': |
|
59 | + // Copy a fact to the clipboard |
|
60 | + $xref = Filter::post('xref', WT_REGEX_XREF); |
|
61 | + $fact_id = Filter::post('fact_id'); |
|
62 | 62 | |
63 | - $record = GedcomRecord::getInstance($xref, $WT_TREE); |
|
63 | + $record = GedcomRecord::getInstance($xref, $WT_TREE); |
|
64 | 64 | |
65 | - if ($record && $record->canEdit()) { |
|
66 | - foreach ($record->getFacts() as $fact) { |
|
67 | - if ($fact->getFactId() == $fact_id) { |
|
68 | - switch ($fact->getTag()) { |
|
65 | + if ($record && $record->canEdit()) { |
|
66 | + foreach ($record->getFacts() as $fact) { |
|
67 | + if ($fact->getFactId() == $fact_id) { |
|
68 | + switch ($fact->getTag()) { |
|
69 | 69 | case 'NOTE': |
70 | 70 | case 'SOUR': |
71 | 71 | case 'OBJE': |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | default: |
75 | 75 | $type = $record::RECORD_TYPE; // paste only to the same record type |
76 | 76 | break; |
77 | - } |
|
77 | + } |
|
78 | 78 | $clipboard = Session::get('clipboard'); |
79 | 79 | if (!is_array($clipboard)) { |
80 | 80 | $clipboard = array(); |
@@ -96,158 +96,158 @@ discard block |
||
96 | 96 | } |
97 | 97 | break; |
98 | 98 | |
99 | - case 'paste-fact': |
|
100 | - // Paste a fact from the clipboard |
|
101 | - $xref = Filter::post('xref', WT_REGEX_XREF); |
|
102 | - $fact_id = Filter::post('fact_id'); |
|
103 | - $record = GedcomRecord::getInstance($xref, $WT_TREE); |
|
104 | - $clipboard = Session::get('clipboard'); |
|
99 | + case 'paste-fact': |
|
100 | + // Paste a fact from the clipboard |
|
101 | + $xref = Filter::post('xref', WT_REGEX_XREF); |
|
102 | + $fact_id = Filter::post('fact_id'); |
|
103 | + $record = GedcomRecord::getInstance($xref, $WT_TREE); |
|
104 | + $clipboard = Session::get('clipboard'); |
|
105 | 105 | |
106 | - if ($record && $record->canEdit() && isset($clipboard[$fact_id])) { |
|
107 | - $record->createFact($clipboard[$fact_id]['factrec'], true); |
|
108 | - } |
|
109 | - break; |
|
110 | - |
|
111 | - case 'delete-fact': |
|
112 | - $xref = Filter::post('xref', WT_REGEX_XREF); |
|
113 | - $fact_id = Filter::post('fact_id'); |
|
114 | - |
|
115 | - $record = GedcomRecord::getInstance($xref, $WT_TREE); |
|
116 | - if ($record && $record->canShow() && $record->canEdit()) { |
|
117 | - foreach ($record->getFacts() as $fact) { |
|
118 | - if ($fact->getFactId() == $fact_id && $fact->canShow() && $fact->canEdit()) { |
|
119 | - $record->deleteFact($fact_id, true); |
|
120 | - break 2; |
|
106 | + if ($record && $record->canEdit() && isset($clipboard[$fact_id])) { |
|
107 | + $record->createFact($clipboard[$fact_id]['factrec'], true); |
|
108 | + } |
|
109 | + break; |
|
110 | + |
|
111 | + case 'delete-fact': |
|
112 | + $xref = Filter::post('xref', WT_REGEX_XREF); |
|
113 | + $fact_id = Filter::post('fact_id'); |
|
114 | + |
|
115 | + $record = GedcomRecord::getInstance($xref, $WT_TREE); |
|
116 | + if ($record && $record->canShow() && $record->canEdit()) { |
|
117 | + foreach ($record->getFacts() as $fact) { |
|
118 | + if ($fact->getFactId() == $fact_id && $fact->canShow() && $fact->canEdit()) { |
|
119 | + $record->deleteFact($fact_id, true); |
|
120 | + break 2; |
|
121 | + } |
|
121 | 122 | } |
122 | 123 | } |
123 | - } |
|
124 | - |
|
125 | - // Can’t find the record/fact, or don’t have permission to delete it. |
|
126 | - http_response_code(406); |
|
127 | - break; |
|
128 | 124 | |
129 | - case 'delete-record': |
|
130 | - $record = GedcomRecord::getInstance(Filter::post('xref', WT_REGEX_XREF), $WT_TREE); |
|
131 | - if ($record && Auth::isEditor($record->getTree()) && $record->canShow() && $record->canEdit()) { |
|
132 | - // Delete links to this record |
|
133 | - foreach (FunctionsDb::fetchAllLinks($record->getXref(), $record->getTree()->getTreeId()) as $xref) { |
|
134 | - $linker = GedcomRecord::getInstance($xref, $WT_TREE); |
|
135 | - $old_gedcom = $linker->getGedcom(); |
|
136 | - $new_gedcom = FunctionsEdit::removeLinks($old_gedcom, $record->getXref()); |
|
137 | - // FunctionsDb::fetch_all_links() does not take account of pending changes. The links (or even the |
|
138 | - // record itself) may have already been deleted. |
|
139 | - if ($old_gedcom !== $new_gedcom) { |
|
140 | - // If we have removed a link from a family to an individual, and it has only one member |
|
141 | - if (preg_match('/^0 @' . WT_REGEX_XREF . '@ FAM/', $new_gedcom) && preg_match_all('/\n1 (HUSB|WIFE|CHIL) @(' . WT_REGEX_XREF . ')@/', $new_gedcom, $match) == 1) { |
|
142 | - // Delete the family |
|
143 | - $family = GedcomRecord::getInstance($xref, $WT_TREE); |
|
144 | - FlashMessages::addMessage(/* I18N: %s is the name of a family group, e.g. “Husband name + Wife name” */ I18N::translate('The family “%s” has been deleted because it only has one member.', $family->getFullName())); |
|
145 | - $family->deleteRecord(); |
|
146 | - // Delete any remaining link to this family |
|
147 | - if ($match) { |
|
148 | - $relict = GedcomRecord::getInstance($match[2][0], $WT_TREE); |
|
149 | - $new_gedcom = $relict->getGedcom(); |
|
150 | - $new_gedcom = FunctionsEdit::removeLinks($new_gedcom, $linker->getXref()); |
|
151 | - $relict->updateRecord($new_gedcom, false); |
|
152 | - FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $relict->getFullName(), $family->getFullName())); |
|
125 | + // Can’t find the record/fact, or don’t have permission to delete it. |
|
126 | + http_response_code(406); |
|
127 | + break; |
|
128 | + |
|
129 | + case 'delete-record': |
|
130 | + $record = GedcomRecord::getInstance(Filter::post('xref', WT_REGEX_XREF), $WT_TREE); |
|
131 | + if ($record && Auth::isEditor($record->getTree()) && $record->canShow() && $record->canEdit()) { |
|
132 | + // Delete links to this record |
|
133 | + foreach (FunctionsDb::fetchAllLinks($record->getXref(), $record->getTree()->getTreeId()) as $xref) { |
|
134 | + $linker = GedcomRecord::getInstance($xref, $WT_TREE); |
|
135 | + $old_gedcom = $linker->getGedcom(); |
|
136 | + $new_gedcom = FunctionsEdit::removeLinks($old_gedcom, $record->getXref()); |
|
137 | + // FunctionsDb::fetch_all_links() does not take account of pending changes. The links (or even the |
|
138 | + // record itself) may have already been deleted. |
|
139 | + if ($old_gedcom !== $new_gedcom) { |
|
140 | + // If we have removed a link from a family to an individual, and it has only one member |
|
141 | + if (preg_match('/^0 @' . WT_REGEX_XREF . '@ FAM/', $new_gedcom) && preg_match_all('/\n1 (HUSB|WIFE|CHIL) @(' . WT_REGEX_XREF . ')@/', $new_gedcom, $match) == 1) { |
|
142 | + // Delete the family |
|
143 | + $family = GedcomRecord::getInstance($xref, $WT_TREE); |
|
144 | + FlashMessages::addMessage(/* I18N: %s is the name of a family group, e.g. “Husband name + Wife name” */ I18N::translate('The family “%s” has been deleted because it only has one member.', $family->getFullName())); |
|
145 | + $family->deleteRecord(); |
|
146 | + // Delete any remaining link to this family |
|
147 | + if ($match) { |
|
148 | + $relict = GedcomRecord::getInstance($match[2][0], $WT_TREE); |
|
149 | + $new_gedcom = $relict->getGedcom(); |
|
150 | + $new_gedcom = FunctionsEdit::removeLinks($new_gedcom, $linker->getXref()); |
|
151 | + $relict->updateRecord($new_gedcom, false); |
|
152 | + FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $relict->getFullName(), $family->getFullName())); |
|
153 | + } |
|
154 | + } else { |
|
155 | + // Remove links from $linker to $record |
|
156 | + FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $linker->getFullName(), $record->getFullName())); |
|
157 | + $linker->updateRecord($new_gedcom, false); |
|
153 | 158 | } |
154 | - } else { |
|
155 | - // Remove links from $linker to $record |
|
156 | - FlashMessages::addMessage(/* I18N: %s are names of records, such as sources, repositories or individuals */ I18N::translate('The link from “%1$s” to “%2$s” has been deleted.', $linker->getFullName(), $record->getFullName())); |
|
157 | - $linker->updateRecord($new_gedcom, false); |
|
158 | 159 | } |
159 | 160 | } |
161 | + // Delete the record itself |
|
162 | + $record->deleteRecord(); |
|
163 | + } else { |
|
164 | + http_response_code(406); |
|
160 | 165 | } |
161 | - // Delete the record itself |
|
162 | - $record->deleteRecord(); |
|
163 | - } else { |
|
164 | - http_response_code(406); |
|
165 | - } |
|
166 | - break; |
|
167 | - |
|
168 | - case 'delete-user': |
|
169 | - $user = User::find(Filter::postInteger('user_id')); |
|
166 | + break; |
|
170 | 167 | |
171 | - if ($user && Auth::isAdmin() && Auth::user() !== $user) { |
|
172 | - Log::addAuthenticationLog('Deleted user: ' . $user->getUserName()); |
|
173 | - $user->delete(); |
|
174 | - } |
|
175 | - break; |
|
168 | + case 'delete-user': |
|
169 | + $user = User::find(Filter::postInteger('user_id')); |
|
176 | 170 | |
177 | - case 'language': |
|
178 | - // Change the current language |
|
179 | - $language = Filter::post('language'); |
|
180 | - try { |
|
181 | - I18N::init($language); |
|
182 | - Session::put('locale', $language); |
|
183 | - // Remember our selection |
|
184 | - Auth::user()->setPreference('language', $language); |
|
185 | - } catch (\Exception $ex) { |
|
186 | - // Request for a non-existant language. |
|
187 | - http_response_code(406); |
|
188 | - } |
|
189 | - break; |
|
190 | - |
|
191 | - case 'masquerade': |
|
192 | - $user = User::find(Filter::postInteger('user_id')); |
|
171 | + if ($user && Auth::isAdmin() && Auth::user() !== $user) { |
|
172 | + Log::addAuthenticationLog('Deleted user: ' . $user->getUserName()); |
|
173 | + $user->delete(); |
|
174 | + } |
|
175 | + break; |
|
176 | + |
|
177 | + case 'language': |
|
178 | + // Change the current language |
|
179 | + $language = Filter::post('language'); |
|
180 | + try { |
|
181 | + I18N::init($language); |
|
182 | + Session::put('locale', $language); |
|
183 | + // Remember our selection |
|
184 | + Auth::user()->setPreference('language', $language); |
|
185 | + } catch (\Exception $ex) { |
|
186 | + // Request for a non-existant language. |
|
187 | + http_response_code(406); |
|
188 | + } |
|
189 | + break; |
|
193 | 190 | |
194 | - if ($user && Auth::isAdmin() && Auth::user() !== $user) { |
|
195 | - Log::addAuthenticationLog('Masquerade as user: ' . $user->getUserName()); |
|
196 | - Auth::login($user); |
|
197 | - Session::put('masquerade', '1'); |
|
198 | - } else { |
|
199 | - http_response_code(406); |
|
200 | - } |
|
201 | - break; |
|
191 | + case 'masquerade': |
|
192 | + $user = User::find(Filter::postInteger('user_id')); |
|
202 | 193 | |
203 | - case 'unlink-media': |
|
204 | - // Remove links from an individual and their spouse-family records to a media object. |
|
205 | - // Used by the "unlink" option on the album (lightbox) tab. |
|
206 | - $source = Individual::getInstance(Filter::post('source', WT_REGEX_XREF), $WT_TREE); |
|
207 | - $target = Filter::post('target', WT_REGEX_XREF); |
|
208 | - if ($source && $source->canShow() && $source->canEdit() && $target) { |
|
209 | - // Consider the individual and their spouse-family records |
|
210 | - $sources = $source->getSpouseFamilies(); |
|
211 | - $sources[] = $source; |
|
212 | - foreach ($sources as $source) { |
|
213 | - foreach ($source->getFacts() as $fact) { |
|
214 | - if (!$fact->isPendingDeletion()) { |
|
215 | - if ($fact->getValue() == '@' . $target . '@') { |
|
216 | - // Level 1 links |
|
217 | - $source->deleteFact($fact->getFactId(), true); |
|
218 | - } elseif (strpos($fact->getGedcom(), ' @' . $target . '@')) { |
|
219 | - // Level 2-3 links |
|
220 | - $source->updateFact($fact->getFactId(), preg_replace(array('/\n2 OBJE @' . $target . '@(\n[3-9].*)*/', '/\n3 OBJE @' . $target . '@(\n[4-9].*)*/'), '', $fact->getGedcom()), true); |
|
194 | + if ($user && Auth::isAdmin() && Auth::user() !== $user) { |
|
195 | + Log::addAuthenticationLog('Masquerade as user: ' . $user->getUserName()); |
|
196 | + Auth::login($user); |
|
197 | + Session::put('masquerade', '1'); |
|
198 | + } else { |
|
199 | + http_response_code(406); |
|
200 | + } |
|
201 | + break; |
|
202 | + |
|
203 | + case 'unlink-media': |
|
204 | + // Remove links from an individual and their spouse-family records to a media object. |
|
205 | + // Used by the "unlink" option on the album (lightbox) tab. |
|
206 | + $source = Individual::getInstance(Filter::post('source', WT_REGEX_XREF), $WT_TREE); |
|
207 | + $target = Filter::post('target', WT_REGEX_XREF); |
|
208 | + if ($source && $source->canShow() && $source->canEdit() && $target) { |
|
209 | + // Consider the individual and their spouse-family records |
|
210 | + $sources = $source->getSpouseFamilies(); |
|
211 | + $sources[] = $source; |
|
212 | + foreach ($sources as $source) { |
|
213 | + foreach ($source->getFacts() as $fact) { |
|
214 | + if (!$fact->isPendingDeletion()) { |
|
215 | + if ($fact->getValue() == '@' . $target . '@') { |
|
216 | + // Level 1 links |
|
217 | + $source->deleteFact($fact->getFactId(), true); |
|
218 | + } elseif (strpos($fact->getGedcom(), ' @' . $target . '@')) { |
|
219 | + // Level 2-3 links |
|
220 | + $source->updateFact($fact->getFactId(), preg_replace(array('/\n2 OBJE @' . $target . '@(\n[3-9].*)*/', '/\n3 OBJE @' . $target . '@(\n[4-9].*)*/'), '', $fact->getGedcom()), true); |
|
221 | + } |
|
221 | 222 | } |
222 | 223 | } |
223 | 224 | } |
225 | + } else { |
|
226 | + http_response_code(406); |
|
224 | 227 | } |
225 | - } else { |
|
226 | - http_response_code(406); |
|
227 | - } |
|
228 | - break; |
|
229 | - |
|
230 | - case 'reject-changes': |
|
231 | - // Reject all the pending changes for a record |
|
232 | - $record = GedcomRecord::getInstance(Filter::post('xref', WT_REGEX_XREF), $WT_TREE); |
|
233 | - if ($record && $record->canEdit() && Auth::isModerator($record->getTree())) { |
|
234 | - FlashMessages::addMessage(/* I18N: %s is the name of an individual, source or other record */ I18N::translate('The changes to “%s” have been rejected.', $record->getFullName())); |
|
235 | - FunctionsImport::rejectAllChanges($record); |
|
236 | - } else { |
|
237 | - http_response_code(406); |
|
238 | - } |
|
239 | - break; |
|
240 | - |
|
241 | - case 'theme': |
|
242 | - // Change the current theme |
|
243 | - $theme = Filter::post('theme'); |
|
244 | - if (Site::getPreference('ALLOW_USER_THEMES') && array_key_exists($theme, Theme::themeNames())) { |
|
245 | - Session::put('theme_id', $theme); |
|
246 | - // Remember our selection |
|
247 | - Auth::user()->setPreference('theme', $theme); |
|
248 | - } else { |
|
249 | - // Request for a non-existant theme. |
|
250 | - http_response_code(406); |
|
251 | - } |
|
252 | - break; |
|
228 | + break; |
|
229 | + |
|
230 | + case 'reject-changes': |
|
231 | + // Reject all the pending changes for a record |
|
232 | + $record = GedcomRecord::getInstance(Filter::post('xref', WT_REGEX_XREF), $WT_TREE); |
|
233 | + if ($record && $record->canEdit() && Auth::isModerator($record->getTree())) { |
|
234 | + FlashMessages::addMessage(/* I18N: %s is the name of an individual, source or other record */ I18N::translate('The changes to “%s” have been rejected.', $record->getFullName())); |
|
235 | + FunctionsImport::rejectAllChanges($record); |
|
236 | + } else { |
|
237 | + http_response_code(406); |
|
238 | + } |
|
239 | + break; |
|
240 | + |
|
241 | + case 'theme': |
|
242 | + // Change the current theme |
|
243 | + $theme = Filter::post('theme'); |
|
244 | + if (Site::getPreference('ALLOW_USER_THEMES') && array_key_exists($theme, Theme::themeNames())) { |
|
245 | + Session::put('theme_id', $theme); |
|
246 | + // Remember our selection |
|
247 | + Auth::user()->setPreference('theme', $theme); |
|
248 | + } else { |
|
249 | + // Request for a non-existant theme. |
|
250 | + http_response_code(406); |
|
251 | + } |
|
252 | + break; |
|
253 | 253 | } |
@@ -177,8 +177,11 @@ |
||
177 | 177 | </li> |
178 | 178 | <?php endforeach; ?> |
179 | 179 | </ul> |
180 | -<?php else: ?> |
|
181 | -<p><?php echo I18N::translate('No duplicates have been found.'); ?></p> |
|
180 | +<?php else { |
|
181 | + : ?> |
|
182 | +<p><?php echo I18N::translate('No duplicates have been found.'); |
|
183 | +} |
|
184 | +?></p> |
|
182 | 185 | <?php endif; ?> |
183 | 186 | |
184 | 187 | <?php endforeach; ?> |
@@ -436,8 +436,11 @@ |
||
436 | 436 | <i class="fa fa-li fa-star"></i> |
437 | 437 | <?php if ($tree->getName() == Site::getPreference('DEFAULT_GEDCOM')): ?> |
438 | 438 | <?php echo I18N::translate('Default family tree'); ?> |
439 | - <?php else: ?> |
|
440 | - <a href="#" onclick="document.defaultform<?php echo $tree->getTreeId(); ?>.submit();"> |
|
439 | + <?php else { |
|
440 | + : ?> |
|
441 | + <a href="#" onclick="document.defaultform<?php echo $tree->getTreeId(); |
|
442 | +} |
|
443 | +?>.submit();"> |
|
441 | 444 | <?php echo I18N::translate('Set as default'); ?> |
442 | 445 | <span class="sr-only"> |
443 | 446 | <?php echo $tree->getTitleHtml(); ?> |