www

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

commit 6fc6dbe4e504ab00150e00d5575f92352b39ff63
parent 7e544aecca53b1db651612a57acf4dd1d63d2e79
Author: Simon Kornblith <simon@simonster.com>
Date:   Sat, 19 Sep 2009 23:43:51 +0000

Fix missing item exception on documents being upgraded from 1.0 (see http://forums.zotero.org/discussion/8859/?Focus=41140#Comment_41140)


Diffstat:
Mchrome/content/zotero/xpcom/integration.js | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -180,7 +180,7 @@ Zotero.Integration = new function() { } } - if(!message && typeof(e) == "object" && e.message) message = "\n"+e.message; + if(!message && typeof(e) == "object" && e.message) message = "\n\n"+e.message; integration._doc.displayAlert(Zotero.getString("integration.error.generic")+message, Components.interfaces.zoteroIntegrationDocument.DIALOG_ICON_STOP, @@ -1048,10 +1048,10 @@ Zotero.Integration.Session.prototype.completeCitation = function(object) { var reselectKeys = citationItem.uri; var reselectKeyType = RESELECT_KEY_URI; } else if(citationItem.key) { - var reselectKeys = citationItem.key; + var reselectKeys = [citationItem.key]; var reselectKeyType = RESELECT_KEY_ITEM_KEY; } else { - var reselectKeys = citationItem.itemID; + var reselectKeys = [citationItem.itemID]; var reselectKeyType = RESELECT_KEY_ITEM_ID; } @@ -1059,6 +1059,7 @@ Zotero.Integration.Session.prototype.completeCitation = function(object) { for each(var reselectKey in reselectKeys) { if(this.reselectedItems[reselectKey]) { zoteroItem = Zotero.Items.get(this.reselectedItems[reselectKey]); + citationItem.itemID = zoteroItem.id; returnNeedUpdate = true; break; }