@@ -770,13 +770,15 @@ |
||
770 | 770 | <p> |
771 | 771 | <?php if ($ucnt): ?> |
772 | 772 | <input type="submit" value="<?= I18N::translate('delete') ?>"> |
773 | - <?php else: ?> |
|
773 | + <?php else { |
|
774 | + : ?> |
|
774 | 775 | <?= I18N::translate('Nothing found to cleanup') ?> |
775 | 776 | <?php endif ?> |
776 | 777 | </p> |
777 | 778 | </form> |
778 | 779 | <?php |
779 | 780 | break; |
781 | +} |
|
780 | 782 | |
781 | 783 | case 'cleanup2': |
782 | 784 | foreach (User::all() as $user) { |
@@ -235,7 +235,8 @@ discard block |
||
235 | 235 | <?php // Reset - otherwise we might "undo all changes", which refreshes the ?> |
236 | 236 | <?php // page, which makes them all again! ?> |
237 | 237 | <script>reset_reload();</script> |
238 | - <?php else: ?> |
|
238 | + <?php else { |
|
239 | + : ?> |
|
239 | 240 | <hr> |
240 | 241 | <div id="batch_update2" class="col-sm-12"> |
241 | 242 | <?php if ($this->curr_xref): ?> |
@@ -273,6 +274,7 @@ discard block |
||
273 | 274 | foreach (array_keys($this->all_xrefs) as $key) { |
274 | 275 | if ($key > $xref) { |
275 | 276 | $record = self::getLatestRecord($key, $this->all_xrefs[$key]); |
277 | +} |
|
276 | 278 | if ($this->PLUGIN->doesRecordNeedUpdate($key, $record)) { |
277 | 279 | return $key; |
278 | 280 | } |
@@ -381,7 +381,8 @@ discard block |
||
381 | 381 | <a href="<?= $individual->getHtmlUrl() ?>#tab-stories"> |
382 | 382 | <?= $individual->getFullName() ?> |
383 | 383 | </a> |
384 | - <?php else: ?> |
|
384 | + <?php else { |
|
385 | + : ?> |
|
385 | 386 | <?= $story->xref ?> |
386 | 387 | <?php endif ?> |
387 | 388 | </td> |
@@ -410,6 +411,7 @@ discard block |
||
410 | 411 | */ |
411 | 412 | private function showList() { |
412 | 413 | global $controller, $WT_TREE; |
414 | +} |
|
413 | 415 | |
414 | 416 | $controller = new PageController; |
415 | 417 | $controller |
@@ -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 | <?= FunctionsPrintLists::individualTable($myindilist) ?> |
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); |
@@ -146,7 +146,8 @@ discard block |
||
146 | 146 | value="<?= Html::escape($controller->getValue($i)) ?>"> |
147 | 147 | <?php if (preg_match('/^NAME:/', $currentFieldSearch) > 0): ?> |
148 | 148 | <select class="form-control form-control-sm col-3" name="fields[<?= $i ?>]"> |
149 | - <option value="<?= $currentField ?>:EXACT" <?php if (preg_match('/:EXACT$/', $currentFieldSearch) > 0) echo 'selected' ?>> |
|
149 | + <option value="<?= $currentField ?>:EXACT" <?php if (preg_match('/:EXACT$/', $currentFieldSearch) > 0) { |
|
150 | + echo 'selected' ?>> |
|
150 | 151 | <?= I18N::translate('Exact') ?> |
151 | 152 | </option> |
152 | 153 | <option value="<?= $currentField ?>:BEGINS" <?php if (preg_match('/:BEGINS$/', $currentFieldSearch) > 0) echo 'selected' ?>> |
@@ -161,13 +162,15 @@ discard block |
||
161 | 162 | <?php else: ?> |
162 | 163 | <input type="hidden" name="fields[<?= $i ?>]" value="<?= $controller->getField($i) ?>"> |
163 | 164 | <?php endif; |
165 | +} |
|
164 | 166 | if (preg_match('/:DATE$/', $currentFieldSearch) > 0) { |
165 | 167 | ?> |
166 | 168 | <select class="form-control form-control-sm col-3" name="plusminus[<?= $i ?>]"> |
167 | 169 | <option value=""> |
168 | 170 | <?= I18N::translate('Exact date') ?> |
169 | 171 | </option> |
170 | - <option value="2" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 2) echo 'selected' ?>> |
|
172 | + <option value="2" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 2) { |
|
173 | + echo 'selected' ?>> |
|
171 | 174 | <?= I18N::plural('±%s year', '±%s years', 2, I18N::number(2)) ?> |
172 | 175 | </option> |
173 | 176 | <option value="5" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 5) echo 'selected' ?>> |
@@ -183,6 +186,7 @@ discard block |
||
183 | 186 | //-- relative fields |
184 | 187 | if ($i == 0 && $fct > 4) { |
185 | 188 | $j = $fct; |
189 | +} |
|
186 | 190 | // Get the current options for Father’s and Mother’s name searches |
187 | 191 | $fatherGivnOption = 'SDX'; |
188 | 192 | $fatherSurnOption = 'SDX'; |
@@ -191,7 +191,8 @@ discard block |
||
191 | 191 | <div class="editfacts"> |
192 | 192 | <?php if ($fact->getTag() === 'FILE' && $fact->getParent() instanceof Media): ?> |
193 | 193 | <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => 'edit_interface.php?action=media-edit&xref=' . $parent->getXref() . '&fact_id=' . $fact->getFactId() . '&ged=' . $parent->getTree()->getNameHtml()]) ?> |
194 | - <?php else: ?> |
|
194 | + <?php else { |
|
195 | + : ?> |
|
195 | 196 | <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => 'edit_interface.php?action=edit&xref=' . $parent->getXref() . '&fact_id=' . $fact->getFactId() . '&ged=' . $parent->getTree()->getNameHtml()]) ?> |
196 | 197 | <?= FontAwesome::linkIcon('copy', I18N::translate('Copy'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return copy_fact("' . $parent->getXref() . '", "' . $fact->getFactId() . '");']) ?> |
197 | 198 | <?= FontAwesome::linkIcon('delete', I18N::translate('Delete'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return delete_fact("' . I18N::translate('Are you sure you want to delete this fact?') . '", "' . $parent->getXref() . '", "' . $fact->getFactId() . '");']) ?> |
@@ -200,6 +201,7 @@ discard block |
||
200 | 201 | <?php |
201 | 202 | } else { |
202 | 203 | echo $label; |
204 | +} |
|
203 | 205 | } |
204 | 206 | |
205 | 207 | echo '</th>'; |
@@ -141,7 +141,8 @@ discard block |
||
141 | 141 | <div class="small"> |
142 | 142 | <?= $spouse->getLifeSpan() ?> |
143 | 143 | </div> |
144 | - <?php else: ?> |
|
144 | + <?php else { |
|
145 | + : ?> |
|
145 | 146 | <?= $spouse->getFullName() ?> |
146 | 147 | <?php endif ?> |
147 | 148 | </td> |
@@ -151,6 +152,7 @@ discard block |
||
151 | 152 | |
152 | 153 | foreach ($family->getChildren() as $child) { |
153 | 154 | $icon = $controller->record === $child ? '<i class="icon-selected"></i>' : ''; |
155 | +} |
|
154 | 156 | $menu = new Menu($icon . Functions::getCloseRelationshipName($controller->record, $child)); |
155 | 157 | $menu->addSubmenu(new Menu($this->getFamily($child))); |
156 | 158 | ?> |
@@ -168,7 +170,8 @@ discard block |
||
168 | 170 | <div class="small"> |
169 | 171 | <?= $child->getLifeSpan() ?> |
170 | 172 | </div> |
171 | - <?php else: ?> |
|
173 | + <?php else { |
|
174 | + : ?> |
|
172 | 175 | <?= $child->getFullName() ?> |
173 | 176 | <?php endif ?> |
174 | 177 | </td> |
@@ -192,6 +195,7 @@ discard block |
||
192 | 195 | private function getHTML($person, $showUnknown = false) { |
193 | 196 | if ($person instanceof Individual) { |
194 | 197 | return sprintf(self::LNK, $person->getHtmlUrl(), $person->getFullName()); |
198 | +} |
|
195 | 199 | } elseif ($showUnknown) { |
196 | 200 | return sprintf(self::MSG, I18N::translate('unknown')); |
197 | 201 | } else { |
@@ -82,7 +82,8 @@ discard block |
||
82 | 82 | <?php if ($ancestors_only === '1'): ?> |
83 | 83 | <input type="hidden" name="ancestors" value="1"> |
84 | 84 | <?= I18N::translate('Find relationships via ancestors') ?> |
85 | - <?php else: ?> |
|
85 | + <?php else { |
|
86 | + : ?> |
|
86 | 87 | <?= Bootstrap4::radioButtons('ancestors', ['0' => I18N::translate('Find any relationship'), '1' => I18N::translate('Find relationships via ancestors')], $ancestors, false) ?> |
87 | 88 | <?php endif ?> |
88 | 89 | </div> |
@@ -116,6 +117,7 @@ discard block |
||
116 | 117 | if ($person1 && $person2) { |
117 | 118 | if (I18N::direction() === 'ltr') { |
118 | 119 | $diagonal1 = Theme::theme()->parameter('image-dline'); |
120 | +} |
|
119 | 121 | $diagonal2 = Theme::theme()->parameter('image-dline2'); |
120 | 122 | } else { |
121 | 123 | $diagonal1 = Theme::theme()->parameter('image-dline2'); |
@@ -123,7 +123,8 @@ discard block |
||
123 | 123 | <div class="form-control"><?= Html::escape(Auth::user()->getRealName()) ?></div> |
124 | 124 | </div> |
125 | 125 | </div> |
126 | - <?php else: ?> |
|
126 | + <?php else { |
|
127 | + : ?> |
|
127 | 128 | <div class="form-group row"> |
128 | 129 | <label class="col-sm-3 col-form-label" for="from-name"> |
129 | 130 | <?= I18N::translate('Your name') ?> |
@@ -181,6 +182,7 @@ discard block |
||
181 | 182 | function recipients($to) { |
182 | 183 | if ($to === 'all') { |
183 | 184 | $recipients = User::all(); |
185 | +} |
|
184 | 186 | } elseif ($to === 'last_6mo') { |
185 | 187 | $recipients = array_filter(User::all(), function(User $user) { |
186 | 188 | return $user->getPreference('sessiontime') > 0 && WT_TIMESTAMP - $user->getPreference('sessiontime') > 60 * 60 * 24 * 30 * 6; |