commit 47fa374b66afcff3fe21e1947714876810283342
parent 4a00bf1f74486f44ab149ebcc19d2f0922749af2
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 10 Aug 2011 07:02:31 +0000
Do very basic checking to make sure matching DOIs in duplicates are actually DOIs
Diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/duplicates.js b/chrome/content/zotero/xpcom/duplicates.js
@@ -196,8 +196,17 @@ Zotero.Duplicates.prototype._findDuplicates = function () {
);
processRows();
+ // DOI
+ var sql = "SELECT itemID, value FROM items JOIN itemData USING (itemID) "
+ + "JOIN itemDataValues USING (valueID) "
+ + "WHERE libraryID=? AND fieldID=? AND REGEXP('^10\.', value) "
+ + "AND itemID NOT IN (SELECT itemID FROM deletedItems) "
+ + "ORDER BY value";
+ var rows = Zotero.DB.query(sql, [this._libraryID, Zotero.ItemFields.getID('DOI')]);
+ processRows();
+
// Match on exact fields
- var fields = ['DOI'];
+ /*var fields = [''];
for each(var field in fields) {
var sql = "SELECT itemID, value FROM items JOIN itemData USING (itemID) "
+ "JOIN itemDataValues USING (valueID) "
@@ -206,7 +215,7 @@ Zotero.Duplicates.prototype._findDuplicates = function () {
+ "ORDER BY value";
var rows = Zotero.DB.query(sql, [this._libraryID, Zotero.ItemFields.getID(field)]);
processRows();
- }
+ }*/
}