diff --git a/Template.php b/Template.php index d7744d302e..49ccefa46a 100644 --- a/Template.php +++ b/Template.php @@ -1626,6 +1626,14 @@ public function get_identifiers_from_url(?string $url_sent = NULL) : bool { if ($this->wikiname() === 'cite web') $this->change_name_to('cite journal'); return $this->add_if_new('pmid', $match[1]); + } elseif (preg_match('~^ncbi\.nlm\.nih\.gov/entrez/eutils/elink.fcgi\?.+tool=sumsearch\.org.+id=(\d+)$~', $url, $match)) { + if ($url_sent) return FALSE; // Many do not work + if ($this->blank(['doi', 'pmc'])) return FALSE; // This is a redirect to the publisher, not pubmed + if ($match[1] == $this->get('pmc') || $match[1] == $this->get('pmid')) { + $this->forget($url_type); + } + return FALSE; + } elseif (preg_match("~^https?://(?:www\.|)amazon(?P\.[\w\.]{1,7})/.*dp/(?P\d+X?)~i", $url, $match)) { if ($this->wikiname() === 'cite web') $this->change_name_to('cite book');