@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $action = Filter::post('action', null, Filter::get('action')); |
| 28 | 28 | |
| 29 | -$controller = new PageController; |
|
| 29 | +$controller = new PageController; |
|
| 30 | 30 | $controller |
| 31 | 31 | ->restrictAccess(Auth::isEditor($controller->tree())) |
| 32 | 32 | ->addInlineJavascript('var locale_date_format="' . preg_replace('/[^DMY]/', '', str_replace(['j', 'F'], ['D', 'M'], I18N::dateFormat())) . '";'); |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | //////////////////////////////////////////////////////////////////////////////// |
| 340 | 340 | case 'add': |
| 341 | 341 | $xref = Filter::get('xref', WT_REGEX_XREF); |
| 342 | - $fact = Filter::get('fact', WT_REGEX_TAG); |
|
| 342 | + $fact = Filter::get('fact', WT_REGEX_TAG); |
|
| 343 | 343 | |
| 344 | 344 | $record = GedcomRecord::getInstance($xref, $controller->tree()); |
| 345 | 345 | check_record_access($record); |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | |
| 439 | 439 | $newged = ''; |
| 440 | 440 | if (!empty($_POST['NAME'])) { |
| 441 | - $newged .= "\n1 NAME " . $_POST['NAME']; |
|
| 441 | + $newged .= "\n1 NAME " . $_POST['NAME']; |
|
| 442 | 442 | $name_facts = ['TYPE', 'NPFX', 'GIVN', 'NICK', 'SPFX', 'SURN', 'NSFX']; |
| 443 | 443 | foreach ($name_facts as $name_fact) { |
| 444 | 444 | if (!empty($_POST[$name_fact])) { |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | //////////////////////////////////////////////////////////////////////////////// |
| 1193 | 1193 | case 'linkspouse': |
| 1194 | 1194 | $famtag = Filter::get('famtag', 'HUSB|WIFE'); |
| 1195 | - $xref = Filter::get('xref', WT_REGEX_XREF); |
|
| 1195 | + $xref = Filter::get('xref', WT_REGEX_XREF); |
|
| 1196 | 1196 | |
| 1197 | 1197 | $person = Individual::getInstance($xref, $controller->tree()); |
| 1198 | 1198 | check_record_access($person); |
@@ -1440,7 +1440,7 @@ discard block |
||
| 1440 | 1440 | $TITL = Filter::post('TITL'); |
| 1441 | 1441 | if ($TITL) { |
| 1442 | 1442 | $newgedrec .= "\n1 TITL " . $TITL; |
| 1443 | - $_HEB = Filter::post('_HEB'); |
|
| 1443 | + $_HEB = Filter::post('_HEB'); |
|
| 1444 | 1444 | if ($_HEB) { |
| 1445 | 1445 | $newgedrec .= "\n2 _HEB " . $_HEB; |
| 1446 | 1446 | } |
@@ -1460,7 +1460,7 @@ discard block |
||
| 1460 | 1460 | $REPO = Filter::post('REPO', WT_REGEX_XREF); |
| 1461 | 1461 | if ($REPO) { |
| 1462 | 1462 | $newgedrec .= "\n1 REPO @" . $REPO . '@'; |
| 1463 | - $CALN = Filter::post('CALN'); |
|
| 1463 | + $CALN = Filter::post('CALN'); |
|
| 1464 | 1464 | if ($CALN) { |
| 1465 | 1465 | $newgedrec .= "\n2 CALN " . $CALN; |
| 1466 | 1466 | } |
@@ -1734,7 +1734,7 @@ discard block |
||
| 1734 | 1734 | $REPO_NAME = Filter::post('REPO_NAME'); |
| 1735 | 1735 | if ($REPO_NAME) { |
| 1736 | 1736 | $gedrec .= "\n1 NAME " . $REPO_NAME; |
| 1737 | - $_HEB = Filter::post('_HEB'); |
|
| 1737 | + $_HEB = Filter::post('_HEB'); |
|
| 1738 | 1738 | if ($_HEB) { |
| 1739 | 1739 | $gedrec .= "\n2 _HEB " . $_HEB; |
| 1740 | 1740 | } |
@@ -1944,7 +1944,7 @@ discard block |
||
| 1944 | 1944 | //////////////////////////////////////////////////////////////////////////////// |
| 1945 | 1945 | case 'reorder_children': |
| 1946 | 1946 | $xref = Filter::post('xref', WT_REGEX_XREF, Filter::get('xref', WT_REGEX_XREF)); |
| 1947 | - $option = Filter::post('option'); |
|
| 1947 | + $option = Filter::post('option'); |
|
| 1948 | 1948 | |
| 1949 | 1949 | $family = Family::getInstance($xref, $controller->tree()); |
| 1950 | 1950 | check_record_access($family); |
@@ -2342,7 +2342,7 @@ discard block |
||
| 2342 | 2342 | //////////////////////////////////////////////////////////////////////////////// |
| 2343 | 2343 | case 'reorder_fams': |
| 2344 | 2344 | $xref = Filter::post('xref', WT_REGEX_XREF, Filter::get('xref', WT_REGEX_XREF)); |
| 2345 | - $option = Filter::post('option'); |
|
| 2345 | + $option = Filter::post('option'); |
|
| 2346 | 2346 | |
| 2347 | 2347 | $person = Individual::getInstance($xref, $controller->tree()); |
| 2348 | 2348 | check_record_access($person); |
@@ -2460,7 +2460,7 @@ discard block |
||
| 2460 | 2460 | '<div class="form-group row"><label class="col-sm-3 col-form-label" for="keep_chan">' . |
| 2461 | 2461 | I18N::translate('Last change') . |
| 2462 | 2462 | '</label><div class="col-sm-9">' . |
| 2463 | - Bootstrap4::checkbox(I18N::translate('Keep the existing “last change” information'), true, ['name' => 'keep_chan', 'checked' => (bool)$controller->tree()->getPreference('NO_UPDATE_CHAN')]) . |
|
| 2463 | + Bootstrap4::checkbox(I18N::translate('Keep the existing “last change” information'), true, ['name' => 'keep_chan', 'checked' => (bool) $controller->tree()->getPreference('NO_UPDATE_CHAN')]) . |
|
| 2464 | 2464 | $details . |
| 2465 | 2465 | '</div></div>'; |
| 2466 | 2466 | } else { |
@@ -176,7 +176,8 @@ discard block |
||
| 176 | 176 | <div class="editfacts"> |
| 177 | 177 | <?php if ($fact->getTag() === 'FILE' && $fact->getParent() instanceof Media): ?> |
| 178 | 178 | <?= 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()]) ?> |
| 179 | - <?php else: ?> |
|
| 179 | + <?php else { |
|
| 180 | + : ?> |
|
| 180 | 181 | <?= 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()]) ?> |
| 181 | 182 | <?= FontAwesome::linkIcon('copy', I18N::translate('Copy'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return copy_fact("' . $parent->getXref() . '", "' . $fact->getFactId() . '");']) ?> |
| 182 | 183 | <?= 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() . '");']) ?> |
@@ -185,6 +186,7 @@ discard block |
||
| 185 | 186 | <?php |
| 186 | 187 | } else { |
| 187 | 188 | echo $label; |
| 189 | +} |
|
| 188 | 190 | } |
| 189 | 191 | |
| 190 | 192 | switch ($fact->getTag()) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | // Create a media object, and return parameters needed by Select2 |
| 97 | 97 | header('Content-type: application/json'); |
| 98 | - $filename = 'eek.jpg'; |
|
| 98 | + $filename = 'eek.jpg'; |
|
| 99 | 99 | $auto = Filter::post('auto'); |
| 100 | 100 | $folder = Filter::post('folder'); |
| 101 | 101 | $note = Filter::post('note'); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | break; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $gedcom = "0 @new@ OBJE\n1 FILE " . $folder . $file . "\n2 FORM " . $format; |
|
| 145 | + $gedcom = "0 @new@ OBJE\n1 FILE " . $folder . $file . "\n2 FORM " . $format; |
|
| 146 | 146 | if ($type !== '') { |
| 147 | 147 | $gedcom .= "\n3 TYPE " . $type; |
| 148 | 148 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $hfam = $husb->getPrimaryChildFamily(); |
| 113 | 113 | if ($hfam) { |
| 114 | 114 | // remove the|| test for $sosa |
| 115 | - echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight -14 ) . '"></td>'; |
|
| 115 | + echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight - 14) . '"></td>'; |
|
| 116 | 116 | echo '<td><img class="rap" src="' . Theme::theme()->parameter('image-hline') . '"></td><td>'; |
| 117 | 117 | // husband’s father |
| 118 | 118 | if ($hfam && $hfam->getHusband()) { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $hfam = $wife->getPrimaryChildFamily(); |
| 204 | 204 | |
| 205 | 205 | if ($hfam) { |
| 206 | - echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight -14 ) . '"></td>'; |
|
| 206 | + echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight - 14) . '"></td>'; |
|
| 207 | 207 | echo '<td><img class="rapS" src="' . Theme::theme()->parameter('image-hline') . '"></td><td>'; |
| 208 | 208 | // wife’s father |
| 209 | 209 | if ($hfam && $hfam->getHusband()) { |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | if ($sosa == 0 && Auth::isEditor($family->getTree())) { |
| 291 | 291 | echo '<br>'; |
| 292 | - echo '<a href="edit_interface.php?action=add_child_to_family&ged=' . $family->getTree()->getNameHtml() .'&xref=' . $family->getXref() . '&gender=U">' . I18N::translate('Add a child to this family') . '</a>'; |
|
| 293 | - echo ' <a class="icon-sex_m_15x15" href="edit_interface.php?action=add_child_to_family&ged=' . $family->getTree()->getNameHtml() .'&xref=' . $family->getXref() . '&gender=M" title="', I18N::translate('son'), '"></a>'; |
|
| 294 | - echo ' <a class="icon-sex_f_15x15" href="edit_interface.php?action=add_child_to_family&ged=' . $family->getTree()->getNameHtml() .'&xref=' . $family->getXref() . '&gender=F" title="', I18N::translate('daughter'), '"></a>'; |
|
| 292 | + echo '<a href="edit_interface.php?action=add_child_to_family&ged=' . $family->getTree()->getNameHtml() . '&xref=' . $family->getXref() . '&gender=U">' . I18N::translate('Add a child to this family') . '</a>'; |
|
| 293 | + echo ' <a class="icon-sex_m_15x15" href="edit_interface.php?action=add_child_to_family&ged=' . $family->getTree()->getNameHtml() . '&xref=' . $family->getXref() . '&gender=M" title="', I18N::translate('son'), '"></a>'; |
|
| 294 | + echo ' <a class="icon-sex_f_15x15" href="edit_interface.php?action=add_child_to_family&ged=' . $family->getTree()->getNameHtml() . '&xref=' . $family->getXref() . '&gender=F" title="', I18N::translate('daughter'), '"></a>'; |
|
| 295 | 295 | echo '<br><br>'; |
| 296 | 296 | } |
| 297 | 297 | echo '</td>'; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | if ($f == $maxfam) { |
| 349 | - echo '<img height="' . ((($bheight / 2)) ) . 'px"'; |
|
| 349 | + echo '<img height="' . ((($bheight / 2))) . 'px"'; |
|
| 350 | 350 | } else { |
| 351 | 351 | echo '<img height="' . $pbheight . 'px"'; |
| 352 | 352 | } |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | if ($kids) { |
| 462 | 462 | echo '<table cellspacing="0" cellpadding="0" border="0" ><tr>'; |
| 463 | 463 | if ($kids > 1) { |
| 464 | - echo '<td rowspan="', $kids, '"><img width="3px" height="', (($bheight) * ($kids -1)), 'px" src="', Theme::theme()->parameter('image-vline'), '"></td>'; |
|
| 464 | + echo '<td rowspan="', $kids, '"><img width="3px" height="', (($bheight) * ($kids - 1)), 'px" src="', Theme::theme()->parameter('image-vline'), '"></td>'; |
|
| 465 | 465 | } |
| 466 | 466 | $ctkids = count($fchildren); |
| 467 | 467 | $i = 1; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $h = ($kids - 1) * 4 + $h; |
| 118 | 118 | } |
| 119 | 119 | echo '<td class="tdbot">', |
| 120 | - '<img id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" width="3" height="', $h -4, '"></td>'; |
|
| 120 | + '<img id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" width="3" height="', $h - 4, '"></td>'; |
|
| 121 | 121 | } elseif ($i === count($children) - 1) { |
| 122 | 122 | // Adjust for the first column on left |
| 123 | 123 | $h = round(((($this->getBoxDimensions()->height) * $kids) + 8) / 2); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $h = ($kids - 1) * 4 + $h; |
| 127 | 127 | } |
| 128 | 128 | echo '<td class="tdtop">', |
| 129 | - '<img class="bvertline" width="3" id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" height="', $h -2, '"></td>'; |
|
| 129 | + '<img class="bvertline" width="3" id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" height="', $h - 2, '"></td>'; |
|
| 130 | 130 | } else { |
| 131 | 131 | echo '<td class="tdbot"style="background: url(', Theme::theme()->parameter('image-vline'), ');">', |
| 132 | 132 | '<img class="spacer" width="3" src="', Theme::theme()->parameter('image-spacer'), '"></td>'; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | } |
| 277 | 277 | } |
| 278 | 278 | echo '</tr><tr>', |
| 279 | - '<td class="tdtop"><img class="pvline" src="', Theme::theme()->parameter('image-vline'), '" width="3" height="', $lh-2, '"></td>', |
|
| 279 | + '<td class="tdtop"><img class="pvline" src="', Theme::theme()->parameter('image-vline'), '" width="3" height="', $lh - 2, '"></td>', |
|
| 280 | 280 | '<td><img class="line4" src="', Theme::theme()->parameter('image-hline'), '" height="3"></td>', |
| 281 | 281 | '<td>'; |
| 282 | 282 | //-- print the mother box |