From 3dec74da01d80d4b66bfb3935ff097ba3662c443 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Fri, 12 Dec 2025 09:28:29 +0000 Subject: Remove unused code --- app/GedcomRecord.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php index beaf4a6bfd..a515c6718c 100644 --- a/app/GedcomRecord.php +++ b/app/GedcomRecord.php @@ -933,33 +933,6 @@ class GedcomRecord Log::addEditLog('Delete: ' . static::RECORD_TYPE . ' ' . $this->xref, $this->tree); } - /** - * 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. * -- cgit v1.3