summaryrefslogtreecommitdiffstats
path: root/src/fetch/citebasefetcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fetch/citebasefetcher.cpp')
-rw-r--r--src/fetch/citebasefetcher.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fetch/citebasefetcher.cpp b/src/fetch/citebasefetcher.cpp
index f5e8cd6..2b5a8db 100644
--- a/src/fetch/citebasefetcher.cpp
+++ b/src/fetch/citebasefetcher.cpp
@@ -163,7 +163,15 @@ void CitebaseFetcher::slotComplete(TDEIO::Job* job_) {
}
Tellico::Data::EntryPtr CitebaseFetcher::fetchEntry(uint uid_) {
- return m_entries[uid_];
+ Data::EntryPtr entry = m_entries[uid_];
+ TQRegExp versionRx(TQString::fromLatin1("v\\d+$"));
+ // if the original search was not for a versioned ID, remove it
+ if(m_key != ArxivID || !m_value.contains(versionRx)) {
+ TQString arxiv = entry->field(TQString::fromLatin1("arxiv"));
+ arxiv.remove(versionRx);
+ entry->setField(TQString::fromLatin1("arxiv"), arxiv);
+ }
+ return entry;
}
KURL CitebaseFetcher::searchURL(FetchKey key_, const TQString& value_) const {