summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2025-12-12 09:28:29 +0000
committerGreg Roach <greg@subaqua.co.uk>2025-12-12 18:36:58 +0000
commit3dec74da01d80d4b66bfb3935ff097ba3662c443 (patch)
treea7a82edd8089d7ca298137e8c4945d2f86494549
parentc71f8c66ed90cbc9fbc0cde9b40f6719531d5341 (diff)
downloadwebtrees-3dec74da01d80d4b66bfb3935ff097ba3662c443.tar.gz
webtrees-3dec74da01d80d4b66bfb3935ff097ba3662c443.tar.bz2
webtrees-3dec74da01d80d4b66bfb3935ff097ba3662c443.zip
Remove unused code
-rw-r--r--app/GedcomRecord.php27
1 files changed, 0 insertions, 27 deletions
diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php
index beaf4a6bfd..a515c6718c 100644
--- a/app/GedcomRecord.php
+++ b/app/GedcomRecord.php
@@ -934,33 +934,6 @@ class GedcomRecord
}
/**
- * Remove all links from this record to $xref
- *
- * @param string $xref
- * @param bool $update_chan
- *
- * @return void
- */
- public function removeLinks(string $xref, bool $update_chan): void
- {
- $value = '@' . $xref . '@';
-
- foreach ($this->facts() as $fact) {
- if ($fact->value() === $value) {
- $this->deleteFact($fact->id(), $update_chan);
- } elseif (preg_match_all('/\n(\d) ' . Gedcom::REGEX_TAG . ' ' . $value . '/', $fact->gedcom(), $matches, PREG_SET_ORDER)) {
- $gedcom = $fact->gedcom();
- foreach ($matches as $match) {
- $next_level = 1 + (int) $match[1];
- $next_levels = '[' . $next_level . '-9]';
- $gedcom = preg_replace('/' . $match[0] . '(\n' . $next_levels . '.*)*/', '', $gedcom);
- }
- $this->updateFact($fact->id(), $gedcom, $update_chan);
- }
- }
- }
-
- /**
* Each object type may have its own special rules, and re-implement this function.
*
* @param int $access_level