diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2025-12-12 09:28:29 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2025-12-12 18:36:58 +0000 |
| commit | 3dec74da01d80d4b66bfb3935ff097ba3662c443 (patch) | |
| tree | a7a82edd8089d7ca298137e8c4945d2f86494549 | |
| parent | c71f8c66ed90cbc9fbc0cde9b40f6719531d5341 (diff) | |
| download | webtrees-3dec74da01d80d4b66bfb3935ff097ba3662c443.tar.gz webtrees-3dec74da01d80d4b66bfb3935ff097ba3662c443.tar.bz2 webtrees-3dec74da01d80d4b66bfb3935ff097ba3662c443.zip | |
Remove unused code
| -rw-r--r-- | app/GedcomRecord.php | 27 |
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 |
