From c7f025519baa71a1bd4dc3857b15d7a51d753f42 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 26 Jul 2010 17:43:58 +0000 Subject: [PATCH] Fixes #1696, Group item reported missing from Zotero library on next citation edit Was breaking when libraryID!=groupID --- chrome/content/zotero/xpcom/uri.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/uri.js b/chrome/content/zotero/xpcom/uri.js index 6169c174dd..5ef7a09696 100644 --- a/chrome/content/zotero/xpcom/uri.js +++ b/chrome/content/zotero/xpcom/uri.js @@ -168,12 +168,12 @@ Zotero.URI = new function () { if (itemURI.indexOf(localUserURI) == 0) { itemURI = itemURI.substr(localUserURI.length); var libraryType = 'user'; - var libraryID = null; + var id = null; } } */ var libraryType = 'user'; - var libraryID = null; + var id = null; } // If not found, try global URI @@ -188,7 +188,7 @@ Zotero.URI = new function () { throw ("Invalid library URI '" + itemURI + "' in Zotero.URI.getURIItem()"); } var libraryType = matches[1].substr(0, matches[1].length-1); - var libraryID = matches[2]; + var id = matches[2]; itemURI = itemURI.replace(typeRE, ''); } @@ -204,10 +204,10 @@ Zotero.URI = new function () { } if (libraryType == 'group') { - if (!Zotero.Libraries.exists(libraryID)) { + if (!Zotero.Groups.get(id)) { return false; } - var libraryID = Zotero.Groups.getLibraryIDFromGroupID(libraryID); + var libraryID = Zotero.Groups.getLibraryIDFromGroupID(id); return Zotero.Items.getByLibraryAndKey(libraryID, itemKey); } }