www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 110d6bac70e5c6c40d0fcca62387a9ea4f209da3
parent 9a39145a48c01714a1b3ce236adaaf0efdd9473e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 20 Sep 2009 04:55:26 +0000

Fix CrossRef translator to not pull XML into Date field if more than one date -- just use the first


Diffstat:
Mtranslators/CrossRef.js | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/translators/CrossRef.js b/translators/CrossRef.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":90, "inRepository":true, - "lastUpdated":"2009-09-20 02:00:00" + "lastUpdated":"2009-09-20 04:55:00" } function detectSearch(item) { @@ -119,9 +119,11 @@ function processCrossRef(xmlOutput) { item.creators.push(creator); } - item.date = refXML.publication_date.year.toString(); - if(refXML.publication_date.month.length()) { - item.date = refXML.publication_date.month.toString()+"/"+item.date; + if(refXML.publication_date.length()) { + item.date = refXML.publication_date[0].year.toString(); + if(refXML.publication_date[0].month.length()) { + item.date = refXML.publication_date[0].month.toString()+"/"+item.date; + } } if(refXML.pages.length()) {