commit 7aa474e58445abd668b84c889f7e66df4a7a009e parent 45b5421941191669ae67233aa89479c777770477 Author: Simon Kornblith <simon@simonster.com> Date: Fri, 5 Aug 2011 03:00:24 +0000 Embed group relations in Word documents Diffstat:
| M | chrome/content/zotero/xpcom/integration.js | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -2054,6 +2054,17 @@ Zotero.Integration.URIMap.prototype.getURIsForItemID = function(id) { if(!this.itemIDURIs[id]) { this.itemIDURIs[id] = [Zotero.URI.getItemURI(Zotero.Items.get(id))]; } + + // Make sure that group relations are included + var uris = this.itemIDURIs[id]; + for(var i=0; i<uris.length; i++) { + var relations = Zotero.Relations.getByURIs(uris[i], Zotero.Item.linkedItemPredicate); + for(var j=0, n=relations.length; j<n; j++) { + var newUri = relations[j].object; + if(uris.indexOf(newUri) === -1) uris.push(newUri); + } + } + return this.itemIDURIs[id]; }