From c6ae132bd3f2453a7b22260f66eca87085c00ccf Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 5 Oct 2006 06:23:44 +0000 Subject: [PATCH] Return itemID from linkFromURL() when it doesn't have to do a HEAD request; true otherwise --- chrome/content/zotero/xpcom/attachments.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 525d531f8..ac40c8cec 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -229,9 +229,8 @@ Zotero.Attachments = new function(){ // If we have the title and mime type, skip loading if (title && mimeType){ - _addToDB(null, url, title, this.LINK_MODE_LINKED_URL, mimeType, + return _addToDB(null, url, title, this.LINK_MODE_LINKED_URL, mimeType, null, sourceItemID); - return; } // Otherwise do a head request for the mime type @@ -239,6 +238,8 @@ Zotero.Attachments = new function(){ _addToDB(null, url, title, Zotero.Attachments.LINK_MODE_LINKED_URL, obj.channel.contentType, null, sourceItemID); }); + + return true; }