commit a1a85911d8bee57d161453fa440aabc4b12176a8
parent 765ee61c4c1e6073448e7ab4d7d07a0f50075e00
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 8 Aug 2009 17:54:40 +0000
Double-click on parent didn't open PDF child attachment according to hierarchy if PDF was a file attachment rather than a web attachment
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js
@@ -3057,14 +3057,14 @@ Zotero.Item.prototype.getBestSnapshot = function() {
}
var url = this.getField('url');
-
if (!url) {
return false;
}
var sql = "SELECT IA.itemID, value FROM itemAttachments IA NATURAL JOIN items I "
+ "LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=1) "
- + "NATURAL JOIN itemDataValues WHERE sourceItemID=? AND linkMode NOT IN (?) "
+ + "LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) "
+ + "WHERE sourceItemID=? AND linkMode NOT IN (?) "
+ "AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) "
+ "ORDER BY value=? DESC, mimeType='application/pdf' DESC, dateAdded ASC";